Browse Source

Merge branch 'master' of https://e.coding.net/ccwin-in/JBLEAR-STD/jbLear-STD

# Conflicts:
#	Stone.WinForm/Stone.WinModule/BasicData/frmBaseMain.cs
master
JinH 2 years ago
parent
commit
8758bcca3e
  1. BIN
      Stone.WinForm/Stone.Common.Dlls/Stone.Entity.dll
  2. 47
      Stone.WinForm/Stone.WinModule/Standard/frmJISVDA.cs
  3. 8
      Stone.WinForm/Stone.WinModule/Standard/frmJISVDA.resx
  4. 8
      Stone.WinForm/Stone.WinModule/Standard/frmJISVDAASN.cs
  5. 23
      Stone.WinForm/Stone.WinModule/Standard/frmMessageQuestion.cs

BIN
Stone.WinForm/Stone.Common.Dlls/Stone.Entity.dll

Binary file not shown.

47
Stone.WinForm/Stone.WinModule/Standard/frmJISVDA.cs

@ -56,12 +56,11 @@ namespace Stone.WinModule.Standard
strWhere += " [filename] like '%" + code + "%' ";
}
strWhere = "[IsStandard]=1 and [startDate]>='" + d1 + "' and [startDate]<='" + d2 + "' and (" + strWhere + ")";
if (cbIsDiff.Checked)
{
strWhere += " and quantity > quantity_print ";
}
strWhere = "[IsStandard]=1 and [startDate]>='" + d1 + "' and [startDate]<='" + d2 + "' and (" + strWhere + ")";
}
private void frmJISLog_Load(object sender, EventArgs e)
@ -256,9 +255,9 @@ namespace Stone.WinModule.Standard
);
}
string PartNumber = dtData.Rows[0]["PartNumber"].ToString();
int quantity = Convert.ToInt32(dtData.Rows[0]["quantity"]); //本次需求货数量
int quantity_transit = Convert.ToInt32(dtData.Rows[0]["quantity_transit"]); //在途数量
string PartNumber = drData["PartNumber"].ToString();
int quantity = Convert.ToInt32(drData["quantity"]); //本次需求货数量
int quantity_transit = Convert.ToInt32(drData["quantity_transit"]); //在途数量
if (quantity_transit > 0)
{
@ -290,10 +289,17 @@ namespace Stone.WinModule.Standard
bool quantity_new = false; //是否采用新的数量来计算
if (msg2 != "")
{
if (MyMessageBox.ShowQuestionPop("以下询问是否继续?\r\n" + msg2))
var dr = ShowQuestionPopDr("以下询问是否继续?\r\n" + msg2);
if(dr == DialogResult.Cancel)
return;
if (dr==DialogResult.OK)
{
quantity_new = true;
}
else
{
quantity_new = false;
}
}
CreateVDA(dtData, quantity_new);
@ -378,6 +384,14 @@ namespace Stone.WinModule.Standard
Odd = Convert.ToInt32(drData["quantity"]) -
Convert.ToInt32(PageQty * Convert.ToInt32(drData["PackNumer"])); //计算零头
}
else
{
PageQty = Convert.ToInt32(Math.Floor(Convert.ToDecimal(drData["quantity_new"]) /
Convert.ToDecimal(drData["PackNumer"])));
Odd = Convert.ToInt32(drData["quantity_new"]) -
Convert.ToInt32(PageQty * Convert.ToInt32(drData["PackNumer"])); //计算零头
}
for (int i = 1; i <= PageQty; i++)
@ -499,6 +513,17 @@ namespace Stone.WinModule.Standard
}
}
// public virtual void UpdateGridView()
// {
//
// string code = this.txtCode.Text.Trim();
// Search(code);
//
// m_Base.BindPageData(strWhere);
// m_Base.GetView(this.dgrdView);
// tlbAllCount.Text = "记录数:" + m_Base.dsMain.Tables["Data"].Rows.Count;
// }
private void chkAuto_CheckedChanged(object sender, EventArgs e)
{
@ -714,5 +739,15 @@ namespace Stone.WinModule.Standard
string partcode;
int qty;
}
public static DialogResult ShowQuestionPopDr(string MessageInfo)
{
var dr = new DialogResult();
frmMessageQuestion frm = new frmMessageQuestion(1);
frm.ShowQuestion(MessageInfo);
dr = frm.DialogResult;
return dr;
}
}
}

8
Stone.WinForm/Stone.WinModule/Standard/frmJISVDA.resx

@ -118,17 +118,17 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>227, 17</value>
<value>301, 17</value>
</metadata>
<metadata name="imageList1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>317, 17</value>
<value>420, 17</value>
</metadata>
<data name="imageList1.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAA8
CQAAAk1TRnQBSQFMAgEBAgEAATgBAAE4AQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
CQAAAk1TRnQBSQFMAgEBAgEAAUABAAFAAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
@ -171,6 +171,6 @@
</value>
</data>
<metadata name="timer2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>432, 17</value>
<value>577, 17</value>
</metadata>
</root>

8
Stone.WinForm/Stone.WinModule/Standard/frmJISVDAASN.cs

@ -239,7 +239,7 @@ namespace Stone.WinModule.Standard
var code = drData["PartNumber"].ToString();
var outQty = decimal.Parse(drData["Qty"].ToString());
var asnNum = drData["AsnNumber"].ToString();
strsql = CreatePartOutSql(code, outQty, dtPartOutQty, asnNum,out dtPartOutQty);
strsql = CreatePartOutSql(db,code, outQty, dtPartOutQty, asnNum,out dtPartOutQty);
if (!string.IsNullOrEmpty(strsql))
{
db.Exec_NonQuery(strsql);
@ -789,14 +789,14 @@ namespace Stone.WinModule.Standard
}
}
private static string CreatePartOutSql(string PartCode, decimal outQty, DataTable dt, string asnNum,out DataTable dtPartOutQty)
private static string CreatePartOutSql(LocalDBService db,string PartCode, decimal outQty, DataTable dt, string asnNum,out DataTable dtPartOutQty)
{
dtPartOutQty = dt;
string strsql = "";
if (dtPartOutQty.Select(" Code = '" + PartCode + "'").Length > 0)
{
//继续校验该ASN是否维护累计发货数量信息
if (dtPartOutQty.Select(" AsnNum = '" + asnNum + "'").Length > 0)
if (dtPartOutQty.Select(" Code = '" + PartCode + "' and AsnNum = '" + asnNum + "'").Length > 0)
{
strsql = "Update t_PartOutQty" +
" set PartOutQty += " + outQty + "," +
@ -812,7 +812,6 @@ namespace Stone.WinModule.Standard
" LastOutTime = getdate()," +
" AsnNum = '" + asnNum + "'" +
" where Code = '" + PartCode + "'";
var db = new LocalDBService();
db.Exec_NonQuery(strsql);
//DT重新赋值
strsql = "select * from t_PartOutQty";
@ -825,7 +824,6 @@ namespace Stone.WinModule.Standard
{
//该零件未维护累计发货数量信息
strsql = "Insert into t_PartOutQty(Code,PartOutQty,LastOutQty,LastOutTime,AsnNum) values ('" + PartCode + "'," + outQty + "," + outQty + ",getdate(),'"+ asnNum + "')";
var db = new LocalDBService();
db.Exec_NonQuery(strsql);
//DT重新赋值
strsql = "select * from t_PartOutQty";

23
Stone.WinForm/Stone.WinModule/Standard/frmMessageQuestion.cs

@ -10,31 +10,46 @@ namespace Stone.WinModule.Standard
{
public partial class frmMessageQuestion : Form
{
private int BillType = 0;
public frmMessageQuestion()
{
InitializeComponent();
}
public frmMessageQuestion(int billType)
{
InitializeComponent();
BillType = billType;
}
public DialogResult ShowQuestion(string msg)
{
this.lblMessage.Text = msg;
this.DialogResult = DialogResult.None;
return this.ShowDialog();
}
private void btnOK_Click(object sender, EventArgs e)
{
frmPasswordVerify frm = new frmPasswordVerify();
frm.UserName = User.UserInfo.UserName;
if (frm.ShowDialog() == DialogResult.OK)
if (BillType == 0)
{
frmPasswordVerify frm = new frmPasswordVerify();
frm.UserName = User.UserInfo.UserName;
if (frm.ShowDialog() == DialogResult.OK)
{
this.DialogResult = DialogResult.OK;
this.Close();
}
}
else
{
this.DialogResult = DialogResult.OK;
this.Close();
}
}
private void btnCancel_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.No;
this.Close();
}
}

Loading…
Cancel
Save