From d9d128f6c823954edcdefc3af81d6bca0b3c6bb6 Mon Sep 17 00:00:00 2001
From: jinghuanzhang <jinghz@oceic.com>
Date: 星期三, 05 四月 2023 12:00:06 +0800
Subject: [PATCH] 33

---
 BaseSet/Gy_ORGANIZATIONS.cs |  104 ++++++++++++++++++++++------------------------------
 1 files changed, 44 insertions(+), 60 deletions(-)

diff --git a/BaseSet/Gy_ORGANIZATIONS.cs b/BaseSet/Gy_ORGANIZATIONS.cs
index 7b85f4d..c42debe 100644
--- a/BaseSet/Gy_ORGANIZATIONS.cs
+++ b/BaseSet/Gy_ORGANIZATIONS.cs
@@ -459,31 +459,15 @@
         //璇诲彇绫� 鍒� 鎺т欢
         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;
-            //}
+            DAL.ClsGy_ORGANIZATIONS_View oORGANIZATIONS = new DAL.ClsGy_ORGANIZATIONS_View();
+            if (oORGANIZATIONS.GetInfoByID(sItemID))
+            {
+                txtHNumber.Text = oORGANIZATIONS.omodel.HNumber.ToString(); 
+                txtHName.Text = oORGANIZATIONS.omodel.HName.ToString(); 
+                txtHNumber.Text = oORGANIZATIONS.omodel.HNumber.ToString();
+                txtHRemark.Text = oORGANIZATIONS.omodel.HRemark;  
+                HItemID = oORGANIZATIONS.omodel.HItemID;
+            }
         }
         //鍐欏叆绫� 浠庢帶浠�
         private bool WriteClass()
@@ -494,24 +478,24 @@
                 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());
@@ -520,23 +504,23 @@
                 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 = "";
-            }
+            //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;

--
Gitblit v1.9.1