From f5e447f7bdcab43a2a05d8d1cc12d1cece39328b Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期日, 18 十二月 2022 23:58:20 +0800
Subject: [PATCH] 业务员
---
BaseSet/公用资料/其他基础资料/Gy_StdWorkTimes.cs | 52 ++++++++++++++++++++++++----------------------------
1 files changed, 24 insertions(+), 28 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 2be03b4..757f566 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"
@@ -8,7 +8,7 @@
using System.Text;
using System.Windows.Forms;
-namespace BaseSet.鍏敤璧勬枡.鍏朵粬鍩虹璧勬枡
+namespace BaseSet
{
public partial class Gy_StdWorkTimes : Form
{
@@ -466,16 +466,6 @@
//鍗曟嵁瀹屾暣鎬у垽鏂� 鏈畬鎴�
private bool Sub_AllowSave()
{
- //蹇呰緭椤圭洰鏄惁涓虹┖
- //ClsK3_DepartmentHlp oDept = new ClsK3_DepartmentHlp();
- //if(!oDept.GetInfoByID(ClsPub.isLong(txtHDeptID.Tag)))
- //{
- // MessageBox.Show("閮ㄩ棬涓嶅瓨鍦紒");
- // return false;
- //}
-
- //鏄庣粏琛ㄦ槸鍚︿负闆惰
-
if (!IsNullRow(0))
{
MessageBox.Show("琛ㄤ綋鏄庣粏琛屼笉瀛樺湪锛佽褰曞叆锛�", "鎻愮ず");
@@ -483,8 +473,18 @@
}
else
{
+
return true;
}
+ }
+ //鏄惁鏄┖琛�
+ private bool IsNullRow(int Row)
+ {
+ if (ClsPub.isInt(grdMain1.Rows[Row].Cells[HMaterIDCol].Value) == 0&& ClsPub.isInt(grdMain1.Rows[Row].Cells[HProcIDCol].Value) == 0&& ClsPub.isDoule( grdMain1.Rows[Row].Cells[HStdWorkTimes].Value )== 0&& ClsPub.isDoule(grdMain1.Rows[Row].Cells[HUpperlimit].Value) == 0&& ClsPub.isDoule(grdMain1.Rows[Row].Cells[HLowerlimit].Value) == 0&& ClsPub.isStrNull(grdMain1.Rows[Row].Cells[HRemarkCol].Value) == ""&& ClsPub.isDoule(grdMain1.Rows[Row].Cells[HStdPiece].Value) == 0&& ClsPub.isDoule(grdMain1.Rows[Row].Cells[HStdPiece].Value) == 0)
+ {
+ return true;
+ }
+ return false;
}
//淇濆瓨鍗曟嵁
private bool Sub_SaveBill()
@@ -493,11 +493,7 @@
Int32 i;
bool bResult;
BillNew = new DAL.ClsGy_StdWorkTimes_Ctl();
- //缂栬緫鏉冮檺
- //if (!ClsPub.Security_Log(ModRightNameEdit, 1, true, DBUtility.ClsPub.CurUserName))
- //{
- // return false;
- //}
+
//澶卞幓鐒︾偣
lblCaption.Focus();
//
@@ -509,9 +505,13 @@
BillNew.DetailColl = new List<Model.ClsGy_StdWorkTimes_Model>();
for (i = 0; i <= grdMain1.RowCount - 1; i++)
{
- if (DBUtility.ClsPub.isLong(grdMain1.Rows[i].Cells[HMaterIDCol].Value) != 0 && DBUtility.ClsPub.isLong(grdMain1.Rows[i].Cells[HProcIDCol].Value) != 0)
+ if (IsNullRow(i))
{
- 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)
+ break;
+ }
+ if (DBUtility.ClsPub.isStrNull(grdMain1.Rows[i].Cells[HMaterIDCol].Value) != "" && DBUtility.ClsPub.isStrNull(grdMain1.Rows[i].Cells[HProcIDCol].Value) != "" && DBUtility.ClsPub.isStrNull(grdMain1.Rows[i].Cells[HStdWorkTimes].Value) != "")
+ {
+ if (DBUtility.ClsPub.isDoule(grdMain1.Rows[i].Cells[HStdWorkTimes].Value) > 0 && DBUtility.ClsPub.isDoule(grdMain1.Rows[i].Cells[HUpperlimit].Value) > 0 && DBUtility.ClsPub.isDoule(grdMain1.Rows[i].Cells[HLowerlimit].Value) > 0 && DBUtility.ClsPub.isDoule(grdMain1.Rows[i].Cells[HStdPiece].Value) > 0 && DBUtility.ClsPub.isDoule(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);
@@ -530,9 +530,14 @@
}
else
{
- MessageBox.Show("绗�" + (i+1) + "琛�,鏍囧噯宸ユ椂,涓婇檺姣斾緥,涓嬮檺姣斾緥锛屾爣鍑嗚浠跺拰鏍囧噯璁′环閮藉簲澶т簬0", "鎻愮ず");
+ MessageBox.Show("绗�" + (i + 1) + "琛�,鏍囧噯宸ユ椂,涓婇檺姣斾緥,涓嬮檺姣斾緥锛屾爣鍑嗚浠跺拰鏍囧噯璁′环閮藉簲澶т簬0", "鎻愮ず");
return false;
}
+ }
+ else
+ {
+ MessageBox.Show("绗�" + (i + 1) + "琛�,鐗╂枡銆佸伐搴忓拰鏍囧噯宸ユ椂涓嶈兘涓虹┖", "鎻愮ず");
+ return false;
}
}
//淇濆瓨瀹屾瘯鍚庡鐞�
@@ -684,15 +689,6 @@
//
oSumGrid.EditStatus = false;
return true;
- }
- //鏄惁鏄┖琛�
- private bool IsNullRow(int Row)
- {
- if (ClsPub.isInt(grdMain1.Rows[Row].Cells[HMaterIDCol].Value) == 0)
- {
- return true;
- }
- return false;
}
//'鍒ゆ柇缃戞牸琛岀殑褰曞叆鏄惁姝g‘
private bool CheckGridRow(int Row)
--
Gitblit v1.9.1