From 572e47cf1bee07e543aa58576e9d75c09edc8002 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期一, 25 四月 2022 09:37:18 +0800
Subject: [PATCH] 修改位置
---
BaseSet/公用资料/其他基础资料/Gy_StdWorkTimes.cs | 116 ++++++++++++++++++++++-----------------------------------
1 files changed, 45 insertions(+), 71 deletions(-)
diff --git "a/BaseSet/\345\205\254\347\224\250\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StdWorkTimes.cs" "b/BaseSet/\345\205\254\347\224\250\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StdWorkTimes.cs"
index 1df1c1a..2be03b4 100644
--- "a/BaseSet/\345\205\254\347\224\250\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StdWorkTimes.cs"
+++ "b/BaseSet/\345\205\254\347\224\250\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StdWorkTimes.cs"
@@ -32,6 +32,8 @@
public const Int16 HLowerlimit = 11;
public const Int16 HUSEORGID = 12;
public const Int16 HRemarkCol = 13;
+ public const Int16 HStdPiece = 14;
+ public const Int16 HStdPric = 15;
public bool BillChange; //
public DBUtility.ClsPub.Enum_OKTag OkTag;
public DBUtility.ClsPub.Enum_BillStatus BillStatus;
@@ -242,29 +244,44 @@
{
try
{
- if (int.Parse(txtHStdWorkTimes.Text)<=0)
+ if (Convert.ToDecimal(txtHStdWorkTimes.Text.ToString())<=0)
{
MessageBox.Show("鏍囧噯宸ユ椂蹇呴』澶т簬0", "鎻愮ず");
+ return;
}
- if (int.Parse(txtHUpperlimit.Text) <= 0)
+ if (Convert.ToDecimal(txtHUpperlimit.Text) <= 0)
{
MessageBox.Show("涓婇檺姣斾緥蹇呴』澶т簬0", "鎻愮ず");
+ return;
}
- if (int.Parse(txtHLowerlimit.Text) <= 0)
+ if (Convert.ToDecimal(txtHLowerlimit.Text) <= 0)
{
MessageBox.Show("涓嬬嚎姣斾緥蹇呴』澶т簬0", "鎻愮ず");
+ return;
}
- oCn.BeginTran();
+ if (Convert.ToDecimal(txtHStdPiece.Text) <= 0)
+ {
+ MessageBox.Show("鏍囧噯璁′欢蹇呴』澶т簬0", "鎻愮ず");
+ return;
+ }
+ if (Convert.ToDecimal(txtHStdPric.Text) <= 0)
+ {
+ MessageBox.Show("鏍囧噯璁′环蹇呴』澶т簬0", "鎻愮ず");
+ return;
+ }
string sql = string.Format(@"Update Gy_StdWorkTimes set" +
" HMaterID=" + textBox1.Text +
",HProcID=" + textBox2.Text +
",HStdWorkTimes=" + txtHStdWorkTimes.Text +
",HUpperlimit=" + txtHUpperlimit.Text +
",HLowerlimit=" + txtHLowerlimit.Text +
+ ",HStdPiece=" + txtHStdPiece.Text +
+ ",HStdPric=" + txtHStdPric.Text +
",HMaker='" + DBUtility.ClsPub.CurUserName + "'" +
",HMakeDate='" + DateTime.Now + "'" +
",HUSEORGID=" + DBUtility.ClsPub.HOrgID +
" where HItemID=" + BillOld.HItemID);
+ oCn.BeginTran();
oCn.RunProc(sql);
oCn.Commit();
MessageBox.Show("淇敼鎴愬姛,璇烽��鍑哄苟鍒锋柊", "鎻愮ず");
@@ -334,7 +351,7 @@
{
timer1.Enabled = false;
Sub_ControlLocation();
- if (BillOld.HItemID.ToString()!=null)//|| BillStatus == DBUtility.ClsPub.Enum_BillStatus.BillStatus_Viewonly
+ if (BillOld.HItemID.ToString()!=null&& BillOld.HItemID.ToString() !="0")//|| BillStatus == DBUtility.ClsPub.Enum_BillStatus.BillStatus_Viewonly
{
this.Sub_ShowBill();
}
@@ -365,37 +382,27 @@
{
switch (BillStatus)
{
- case DBUtility.ClsPub.Enum_BillStatus.BillStatus_View:
- //case DBUtility.ClsPub.Enum_BillStatus.BillStatus_Viewonly:
- //娴忚鐘舵��
- yl.Enabled = true;
- xz.Enabled = true;
+ case 0:
xg.Enabled = true;
- sc.Enabled = true;
AddRow.Enabled = false;
DelRow.Enabled = false;
bc.Enabled = false;
tc.Enabled = true;
- //鏈鏍�
- if (txtHChecker.Text.Trim() == "")
- {
- xg.Enabled = true;
- sc.Enabled = true;
- }
- else
- {
- xg.Enabled = false;
- sc.Enabled = false;
- }
+ Sub_LrtextStatus(true);
+ grdStatus = true;
+ break;
+ case DBUtility.ClsPub.Enum_BillStatus.BillStatus_View:
+ xg.Enabled = true;
+ AddRow.Enabled = false;
+ DelRow.Enabled = false;
+ bc.Enabled = false;
+ tc.Enabled = true;
Sub_LrtextStatus(false);
grdStatus = false;
break;
case DBUtility.ClsPub.Enum_BillStatus.BillStatus_AddNew:
//鏂板鐘舵��
- yl.Enabled = false;
- xz.Enabled = false;
xg.Enabled = false;
- sc.Enabled = false;
AddRow.Enabled = true;
DelRow.Enabled = true;
bc.Enabled = true;
@@ -405,10 +412,7 @@
break;
case DBUtility.ClsPub.Enum_BillStatus.BillStatus_Modify:
//淇敼鐘舵��
- yl.Enabled = false;
- xz.Enabled = false;
xg.Enabled = false;
- sc.Enabled = false;
AddRow.Enabled = true;
DelRow.Enabled = true;
bc.Enabled = true;
@@ -416,6 +420,7 @@
Sub_LrtextStatus(true);
grdStatus = true;
break;
+
}
}
@@ -445,48 +450,10 @@
this.txtHStdWorkTimes.Text = dr["鏍囧噯宸ユ椂"].ToString();
this.txtHUpperlimit.Text = dr["涓婄嚎姣斾緥"].ToString();
this.txtHLowerlimit.Text = dr["涓嬬嚎姣斾緥"].ToString();
+ this.txtHStdPiece.Text = dr["鏍囧噯璁′欢"].ToString();
+ this.txtHStdPric.Text = dr["鏍囧噯璁′环"].ToString();
- //鍔犺浇琛ㄤ綋
- //initGrid();
- //int i = 0;
- //foreach (Model.ClsGy_StdWorkTimes_Model oSub in BillNew.DetailColl)
- //{
- // //
- // if (i >= grdMain1.RowCount - 1)
- // grdMain1.Rows.Add();
- // grdMain1.Rows[i].Cells[HTagCol].Value = "*";
- // grdMain1.Rows[i].Cells[HMaterIDCol].Value = oSub.HMaterID.ToString();
- // if (oMater.GetInfoByID(oSub.HMaterID))
- // {
- // grdMain1.Rows[i].Cells[HMaterNumberCol].Value = oMater.omodel.HNumber;
- // grdMain1.Rows[i].Cells[HMaterNameCol].Value = oMater.omodel.HName;
- // grdMain1.Rows[i].Cells[HMaterModelCol].Value = oMater.omodel.HModel;
- // }
- // else
- // {
- // grdMain1.Rows[i].Cells[HMaterNumberCol].Value = "";
- // grdMain1.Rows[i].Cells[HMaterNameCol].Value = "";
- // grdMain1.Rows[i].Cells[HMaterModelCol].Value = "";
- // }
- // grdMain1.Rows[i].Cells[HProcIDCol].Value = oSub.HProcID.ToString();
- // if (oProc.GetInfoByID(oSub.HProcID))
- // {
- // grdMain1.Rows[i].Cells[HProcNumberCol].Value = oProc.omodel.HNumber;
- // grdMain1.Rows[i].Cells[HProcNameCol].Value = oProc.omodel.HName;
- // }
- // else
- // {
- // grdMain1.Rows[i].Cells[HProcNumberCol].Value = "";
- // grdMain1.Rows[i].Cells[HProcNameCol].Value = "";
- // }
-
- // grdMain1.Rows[i].Cells[HStdWorkTimes].Value = oSub.HStdWorkTimes.ToString();
- // grdMain1.Rows[i].Cells[HUpperlimit].Value = oSub.HUpperlimit.ToString();
- // grdMain1.Rows[i].Cells[HLowerlimit].Value = oSub.HLowerlimit.ToString();
- // grdMain1.Rows[i].Cells[HUSEORGID].Value = oSub.HUSEORGID.ToString();
- // grdMain1.Rows[i].Cells[HRemarkCol].Value = oSub.HRemark;
- // i = i + 1;
- //}
+
//GRID鍏佽鍒锋柊
DBUtility.Xt_BaseBillFun.SetSumGrid(oSumGrid);
//鍚堣
@@ -544,7 +511,7 @@
{
if (DBUtility.ClsPub.isLong(grdMain1.Rows[i].Cells[HMaterIDCol].Value) != 0 && DBUtility.ClsPub.isLong(grdMain1.Rows[i].Cells[HProcIDCol].Value) != 0)
{
- if (DBUtility.ClsPub.isLong(grdMain1.Rows[i].Cells[HStdWorkTimes].Value)>0&& DBUtility.ClsPub.isLong(grdMain1.Rows[i].Cells[HUpperlimit].Value) > 0&& DBUtility.ClsPub.isLong(grdMain1.Rows[i].Cells[HLowerlimit].Value) > 0)
+ if (DBUtility.ClsPub.isLong(grdMain1.Rows[i].Cells[HStdWorkTimes].Value)>0&& DBUtility.ClsPub.isLong(grdMain1.Rows[i].Cells[HUpperlimit].Value) > 0&& DBUtility.ClsPub.isLong(grdMain1.Rows[i].Cells[HLowerlimit].Value) > 0 && DBUtility.ClsPub.isLong(grdMain1.Rows[i].Cells[HStdPiece].Value) > 0 && DBUtility.ClsPub.isLong(grdMain1.Rows[i].Cells[HStdPric].Value) > 0)
{
Model.ClsGy_StdWorkTimes_Model oSub = new Model.ClsGy_StdWorkTimes_Model();
oSub.HMaterID = ClsPub.isLong(grdMain1.Rows[i].Cells[HMaterIDCol].Value);
@@ -552,6 +519,8 @@
oSub.HStdWorkTimes = ClsPub.isDoule(grdMain1.Rows[i].Cells[HStdWorkTimes].Value);
oSub.HUpperlimit = ClsPub.isDoule(grdMain1.Rows[i].Cells[HUpperlimit].Value);
oSub.HLowerlimit = ClsPub.isDoule(grdMain1.Rows[i].Cells[HLowerlimit].Value);
+ oSub.HStdPiece = ClsPub.isDoule(grdMain1.Rows[i].Cells[HStdPiece].Value);
+ oSub.HStdPric = ClsPub.isDoule(grdMain1.Rows[i].Cells[HStdPric].Value);
oSub.HUSEORGID = ClsPub.HOrgID;
oSub.HStopflag = false;
oSub.HMaker = ClsPub.CurUserName;
@@ -561,7 +530,7 @@
}
else
{
- MessageBox.Show("绗�" + (i+1) + "琛�,鏍囧噯宸ユ椂,涓婇檺姣斾緥鍜屼笅闄愭瘮渚嬮兘搴斿ぇ浜�0", "鎻愮ず");
+ MessageBox.Show("绗�" + (i+1) + "琛�,鏍囧噯宸ユ椂,涓婇檺姣斾緥,涓嬮檺姣斾緥锛屾爣鍑嗚浠跺拰鏍囧噯璁′环閮藉簲澶т簬0", "鎻愮ず");
return false;
}
}
@@ -632,6 +601,9 @@
grdMain1.Columns[HStdWorkTimes].HeaderText = "鏍囧噯宸ユ椂";
grdMain1.Columns[HUpperlimit].HeaderText = "涓婇檺姣斾緥";
grdMain1.Columns[HLowerlimit].HeaderText = "涓嬮檺姣斾緥";
+ grdMain1.Columns[HStdPiece].HeaderText = "鏍囧噯璁′欢";
+ grdMain1.Columns[HStdPric].HeaderText = "鏍囧噯璁′环";
+
grdMain1.Columns[HUSEORGID].HeaderText = "缁勭粐ID";
grdMain1.Columns[HRemarkCol].HeaderText = "澶囨敞";
//
@@ -646,6 +618,8 @@
"," + HStdWorkTimes.ToString() +
"," + HUpperlimit.ToString() +
"," + HLowerlimit.ToString() +
+ "," + HStdPiece.ToString() +
+ "," + HStdPric.ToString() +
"," + HRemarkCol.ToString();
//鍚堣鍒�
string sTotalCol = "";
--
Gitblit v1.9.1