diff --git a/Stone.WinForm/Stone.Common.Dlls/Stone.Entity.dll b/Stone.WinForm/Stone.Common.Dlls/Stone.Entity.dll
index b4e8c47..8be8a34 100644
Binary files a/Stone.WinForm/Stone.Common.Dlls/Stone.Entity.dll and b/Stone.WinForm/Stone.Common.Dlls/Stone.Entity.dll differ
diff --git a/Stone.WinForm/Stone.WinModule/Standard/frmJISVDA.cs b/Stone.WinForm/Stone.WinModule/Standard/frmJISVDA.cs
index b49ec89..a1a39d2 100644
--- a/Stone.WinForm/Stone.WinModule/Standard/frmJISVDA.cs
+++ b/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;
+ }
}
}
diff --git a/Stone.WinForm/Stone.WinModule/Standard/frmJISVDA.resx b/Stone.WinForm/Stone.WinModule/Standard/frmJISVDA.resx
index 7487b59..2c47763 100644
--- a/Stone.WinForm/Stone.WinModule/Standard/frmJISVDA.resx
+++ b/Stone.WinForm/Stone.WinModule/Standard/frmJISVDA.resx
@@ -118,17 +118,17 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- 227, 17
+ 301, 17
- 317, 17
+ 420, 17
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAA8
- CQAAAk1TRnQBSQFMAgEBAgEAATgBAAE4AQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
+ CQAAAk1TRnQBSQFMAgEBAgEAAUABAAFAAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
@@ -171,6 +171,6 @@
- 432, 17
+ 577, 17
\ No newline at end of file
diff --git a/Stone.WinForm/Stone.WinModule/Standard/frmJISVDAASN.cs b/Stone.WinForm/Stone.WinModule/Standard/frmJISVDAASN.cs
index de1ecfc..854bf6d 100644
--- a/Stone.WinForm/Stone.WinModule/Standard/frmJISVDAASN.cs
+++ b/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";
diff --git a/Stone.WinForm/Stone.WinModule/Standard/frmMessageQuestion.cs b/Stone.WinForm/Stone.WinModule/Standard/frmMessageQuestion.cs
index 051adfb..397ed5b 100644
--- a/Stone.WinForm/Stone.WinModule/Standard/frmMessageQuestion.cs
+++ b/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();
}
}