From c7c3b98e2bbcf7ee5b892df6cc984bbde7581540 Mon Sep 17 00:00:00 2001
From: jinghuanzhang <jinghz@oceic.com>
Date: 星期三, 05 四月 2023 13:59:57 +0800
Subject: [PATCH] 组织
---
BaseSet/Gy_ORGANIZATIONS.cs | 226 ++++++++++++++++++++++++++++----------------------------
1 files changed, 114 insertions(+), 112 deletions(-)
diff --git a/BaseSet/Gy_ORGANIZATIONS.cs b/BaseSet/Gy_ORGANIZATIONS.cs
index 7b85f4d..b33bbe3 100644
--- a/BaseSet/Gy_ORGANIZATIONS.cs
+++ b/BaseSet/Gy_ORGANIZATIONS.cs
@@ -301,21 +301,21 @@
private bool Save()
{
//鍒ゆ柇鏉冮檺
- if (!ClsPub.Security_Log(ModRightNameEdit, 1, true, DBUtility.ClsPub.CurUserName))
- {
- return false;
- }
+ //if (!ClsPub.Security_Log(ModRightNameEdit, 1, true, DBUtility.ClsPub.CurUserName))
+ //{
+ // return false;
+ //}
//
if (InputMode == DBUtility.ClsPub.Enum_InputMode.InputMode_AddNew)
{
- if (oDept.AddNew())
- {
- Init();
- }
- else
- {
- return false;
- }
+ //if (oDept.AddNew())
+ //{
+ // Init();
+ //}
+ //else
+ //{
+ // return false;
+ //}
Display();
}
if (InputMode == DBUtility.ClsPub.Enum_InputMode.InputMode_Modify)
@@ -425,65 +425,52 @@
private bool AllowSave()
{
- if (txtHNumber.Text.Trim() == "")
- {
- MessageBox.Show("浠g爜涓嶈兘涓虹┖!", "鎻愮ず");
- return false;
- }
- if (txtHName.Text.Trim() == "")
- {
- MessageBox.Show("鍚嶇О涓嶈兘涓虹┖!", "鎻愮ず");
- return false;
- }
- //if (DBUtility.ClsPub.isLong(txtHEmpID.Tag) == 0)
+ //if (txtHNumber.Text.Trim() == "")
//{
- // MessageBox.Show("璐熻矗浜轰笉鑳戒负绌�!", "鎻愮ず");
+ // MessageBox.Show("浠g爜涓嶈兘涓虹┖!", "鎻愮ず");
// return false;
//}
- //瀹℃牳浠g爜鏄惁鍚堢悊
- if (!DBUtility.ClsPub.AllowNumber(txtHNumber.Text.Trim()))
- {
- MessageBox.Show("浠g爜涓笉鑳藉嚭鐜拌繛缁��.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒", "鎻愮ず");
- return false;
- }
+ //if (txtHName.Text.Trim() == "")
+ //{
+ // MessageBox.Show("鍚嶇О涓嶈兘涓虹┖!", "鎻愮ず");
+ // return false;
+ //}
+ ////if (DBUtility.ClsPub.isLong(txtHEmpID.Tag) == 0)
+ ////{
+ //// MessageBox.Show("璐熻矗浜轰笉鑳戒负绌�!", "鎻愮ず");
+ //// return false;
+ ////}
+ ////瀹℃牳浠g爜鏄惁鍚堢悊
+ //if (!DBUtility.ClsPub.AllowNumber(txtHNumber.Text.Trim()))
+ //{
+ // MessageBox.Show("浠g爜涓笉鑳藉嚭鐜拌繛缁��.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒", "鎻愮ず");
+ // return false;
+ //}
- //鏄惁閲嶅浠g爜
- if (oDept.HavSameNumber(HItemID, txtHNumber.Text.Trim()))
- {
- MessageBox.Show("浠g爜閲嶅锛�", "鎻愮ず");
- return false;
- }
+ ////鏄惁閲嶅浠g爜
+ //if (oDept.HavSameNumber(HItemID, txtHNumber.Text.Trim()))
+ //{
+ // MessageBox.Show("浠g爜閲嶅锛�", "鎻愮ず");
+ // return false;
+ //}
return true;
}
//璇诲彇绫� 鍒� 鎺т欢
private void ShowData(long sItemID)
- {
- //DAL.ClsK3_Employee_View oEmp = new DAL.ClsK3_Employee_View();
- //if (oDeptHlp.GetInfoByID(sItemID))
- //{
- // txtHNumber.Text = oDeptHlp.omodel.HNumber.ToString();
- // txtHHelpCode.Text = oDeptHlp.omodel.HHelpCode.ToString();
- // txtHName.Text = oDeptHlp.omodel.HName.ToString();
- // txtHEmpID.Tag = Convert.ToInt64(oDeptHlp.omodel.HEmpID.ToString());
- // if (oEmp.GetInfoByID(oDeptHlp.omodel.HEmpID))
- // {
- // txtHEmpID.Text = oEmp.omodel.HName;
- // txtHEmpID.Tag = oEmp.omodel.HItemID.ToString();
- // }
- // else
- // {
- // txtHEmpID.Text = "";
- // }
- // txtHNumber.Text = oDeptHlp.omodel.HNumber.ToString();
- // txtHRemark.Text = oDeptHlp.omodel.HRemark;
- // txtHBarCode.Text = oDeptHlp.omodel.HBarCode;
- // if (oDeptHlp.omodel.HStopflag)
- // chkHStopflag.Checked = true;
- // else
- // chkHStopflag.Checked = false;
- // HItemID = oDeptHlp.omodel.HItemID;
- //}
+ {
+ if (oDeptHlp.GetInfoByID(sItemID))
+ {
+ txtHNumber.Text = oDeptHlp.omodel.HNumber.ToString();
+ txtHName.Text = oDeptHlp.omodel.HName.ToString();
+ txtHNumber.Text = oDeptHlp.omodel.HNumber.ToString();
+ txtHRemark.Text = oDeptHlp.omodel.HRemark;
+ if (oDeptHlp.omodel.HStopflag)
+ chkHStopflag.Checked = true;
+ else
+ chkHStopflag.Checked = false;
+ HItemID = oDeptHlp.omodel.HItemID;
+ }
}
//鍐欏叆绫� 浠庢帶浠�
private bool WriteClass()
@@ -494,56 +481,56 @@
return false;
}
//妫�鏌ョ埗绾ф槸鍚﹀瓨鍦�
- string sParent;
- sParent = DBUtility.ClsPub.GetParentCode(txtHNumber.Text.Trim());
- if (sParent.Trim() == "")
- {
- oDept.oModel.HParentID = 0;
- }
- else
- {
- if (oDept.HavParentCode(sParent.Trim(), HItemID))
- {
- oDept.oModel.HParentID = oDept.oModel.HItemID;
- }
- else
- {
- MessageBox.Show("涓婄骇浠g爜涓嶅瓨鍦ㄦ垨琚鐢紒", "鎻愮ず");
- return false;
- }
- }
+ //string sParent;
+ //sParent = DBUtility.ClsPub.GetParentCode(txtHNumber.Text.Trim());
+ //if (sParent.Trim() == "")
+ //{
+ // oDept.oModel.HParentID = 0;
+ //}
+ //else
+ //{
+ // if (oDept.HavParentCode(sParent.Trim(), HItemID))
+ // {
+ // oDept.oModel.HParentID = oDept.oModel.HItemID;
+ // }
+ // else
+ // {
+ // MessageBox.Show("涓婄骇浠g爜涓嶅瓨鍦ㄦ垨琚鐢紒", "鎻愮ず");
+ // return false;
+ // }
+ //}
//寰楀埌鐭唬鐮�
- string sShortNumber;
- sShortNumber = DBUtility.ClsPub.GetShortNumber(txtHNumber.Text.Trim());
- if (sShortNumber.Trim() == "")
- {
- return false;
- }
- //淇濆瓨鍘熶唬鐮�
- if (oDeptHlp.GetInfoByID(HItemID))
- {
- oDept.HOldNumber = oDeptHlp.omodel.HNumber;
- //鏄惁鏂颁唬鐮佹槸鑷繁瀛愰」鐩殑銆�瀛愰」鐩�
- if (sParent.Length >= oDept.HOldNumber.Length)
- {
- if (sParent.Substring(0, oDept.HOldNumber.ToString().Length) == oDept.HOldNumber.Trim())
- {
- MessageBox.Show("鏂颁唬鐮佷笉鑳芥槸鑷繁鐨勪笅绾х殑瀛愰」鐩紒", "鎻愮ず");
- return false;
- }
- }
- }
- else
- {
- oDept.HOldNumber = "";
- }
+ //string sShortNumber;
+ //sShortNumber = DBUtility.ClsPub.GetShortNumber(txtHNumber.Text.Trim());
+ //if (sShortNumber.Trim() == "")
+ //{
+ // return false;
+ //}
+ ////淇濆瓨鍘熶唬鐮�
+ //if (oDeptHlp.GetInfoByID(HItemID))
+ //{
+ // oDept.HOldNumber = oDeptHlp.omodel.HNumber;
+ // //鏄惁鏂颁唬鐮佹槸鑷繁瀛愰」鐩殑銆�瀛愰」鐩�
+ // if (sParent.Length >= oDept.HOldNumber.Length)
+ // {
+ // if (sParent.Substring(0, oDept.HOldNumber.ToString().Length) == oDept.HOldNumber.Trim())
+ // {
+ // MessageBox.Show("鏂颁唬鐮佷笉鑳芥槸鑷繁鐨勪笅绾х殑瀛愰」鐩紒", "鎻愮ず");
+ // return false;
+ // }
+ // }
+ //}
+ //else
+ //{
+ // oDept.HOldNumber = "";
+ //}
//鍐欏叆淇℃伅
- oDept.oModel.HShortNumber = sShortNumber;
- oDept.oModel.HEndFlag = true;
- oDept.oModel.HLevel = DBUtility.ClsPub.GetLevel(txtHNumber.Text.Trim());
- oDept.oModel.HNumber = txtHNumber.Text.Trim();
- oDept.oModel.HName = txtHName.Text.Trim();
- oDept.oModel.HStopflag = chkHStopflag.Checked;
+ //oDept.oModel.HShortNumber = "";
+ //oDept.oModel.HEndFlag = true;
+ ////oDept.oModel.HLevel = DBUtility.ClsPub.GetLevel(txtHNumber.Text.Trim());
+ //oDept.oModel.HNumber = txtHNumber.Text.Trim();
+ //oDept.oModel.HName = txtHName.Text.Trim();
+ //oDept.oModel.HStopflag = chkHStopflag.Checked;
oDept.oModel.HRemark = txtHRemark.Text.Trim();
return true;
}
@@ -672,7 +659,22 @@
BLL.ClsPub_BLL.Sub_ShowStopFlag(grdMain, Fun_GetCol("绂佺敤鏍囪"));
}
-
-
+ private void button1_Click(object sender, EventArgs e)
+ {
+ oDept.oModel.HRemark = txtHRemark.Text.Trim();
+ if (Save())
+ {
+ MessageBox.Show("淇濆瓨瀹屾瘯锛�", "鎻愮ず");
+ }
+ else
+ {
+ MessageBox.Show("淇濆瓨澶辫触锛佸師鍥狅細" + DBUtility.ClsPub.sExeReturnInfo, "鎻愮ず");
+ }
+ if (InputMode == DBUtility.ClsPub.Enum_InputMode.InputMode_Modify)
+ {
+ InputMode = DBUtility.ClsPub.Enum_InputMode.InputMode_View;
+ RefreshTool();
+ }
+ }
}
}
\ No newline at end of file
--
Gitblit v1.9.1