| BaseSet/Gy_ORGANIZATIONS.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| DAL/ClsGy_ORGANIZATIONS_Ctl.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| DAL/ClsGy_ORGANIZATIONS_View.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| NETSCM/ClsShowMod.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
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("上级代码不存在或被禁用!", "提示"); 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("上级代码不存在或被禁用!", "提示"); // 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; DAL/ClsGy_ORGANIZATIONS_Ctl.cs
@@ -11,6 +11,7 @@ //原代码 用于 替换子项目 public string HOldNumber; public Model.ClsGy_ORGANIZATIONS_Model oModel = new Model.ClsGy_ORGANIZATIONS_Model(); public WMSWeb.WebService1 oWeb = new WMSWeb.WebService1(); //新增 public override bool AddNew() { @@ -41,10 +42,10 @@ { try { oCn.BeginTran(); oCn.RunProc("Update " + MvarItemKey + " set " + oWeb.Url = SCM.ClsPub1.WEBSURL; oWeb.getRunProc("Update " + MvarItemKey + " set " + " HRemark= '" + oModel.HRemark + "' Where HItemID=" + sItemID, ref DBUtility.ClsPub.sExeReturnInfo); oCn.Commit(); return true; } catch (Exception e) @@ -76,7 +77,7 @@ //构造函数 public ClsGy_ORGANIZATIONS_Ctl() { MvarItemKey = "Gy_ORGANIZATIONS"; MvarItemKey = "xt_ORGANIZATIONS"; MvarReportTitle = "组织设置"; oModel = new Model.ClsGy_ORGANIZATIONS_Model(); } DAL/ClsGy_ORGANIZATIONS_View.cs
@@ -9,15 +9,15 @@ { // public Model.ClsGy_ORGANIZATIONS_Model omodel = new Model.ClsGy_ORGANIZATIONS_Model(); //SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); public WMSWeb.WebService1 oWeb = new WMSWeb.WebService1(); public ClsGy_ORGANIZATIONS_View() { base.ViewNameForWeb = "h_v_Gy_ORGANIZATIONS_ForWeb"; base.MvarReportTitle = "组织设置"; base.MvarItemKey = "Gy_ORGANIZATIONS"; base.SQLName = "Select HItemID,HNumber 组织代码,HName 组织,HRemark 生产基地 from Gy_ORGANIZATIONS where HStopflag=0 Order by HItemID "; base.MvarItemKey = "xt_ORGANIZATIONS"; base.SQLName = "Select HItemID,HNumber 组织代码,HName 组织,HRemark 生产基地 from xt_ORGANIZATIONS where HStopflag=0 Order by HItemID "; //下拉SQL base.SQLNameForDown = " Select top 30 HItemID,HNumber 组织代码,HName 组织,HRemark 生产基地 from Gy_ORGANIZATIONS "; base.SQLNameForDown = " Select top 30 HItemID,HNumber 组织代码,HName 组织,HRemark 生产基地 from xt_ORGANIZATIONS "; base.SQLOrderForDown = " Order by HNumber "; base.SQLWhereForDown = " where HStopflag=0 "; } @@ -35,13 +35,14 @@ DataSet DS ; try { //DS = oCn.RunProcReturn("Select * from " + MvarItemKey + " Where HItemID='" + sItemID + "'", MvarItemKey, ref DBUtility.ClsPub.sExeReturnInfo); //if (DS.Tables[0].Rows.Count == 0) oWeb.Url = SCM.ClsPub1.WEBSURL; DS = oWeb.getDataSetBySQL("Select * from " + MvarItemKey + " Where HItemID='" + sItemID + "'", MvarItemKey, ref DBUtility.ClsPub.sExeReturnInfo); if (DS.Tables[0].Rows.Count == 0) return false; //else //{ // return GetInfo(DS); //} else { return GetInfo(DS); } } catch (Exception e) { @@ -81,7 +82,7 @@ omodel.HParentID = Convert.ToInt64(DS.Tables[0].Rows[0]["HParentID"]); //omodel.HLevel = Convert.ToInt64(DS.Tables[0].Rows[0]["HLevel"]); //omodel.HEndFlag = (bool)DS.Tables[0].Rows[0]["HEndFlag"]; omodel.HStopflag = (bool)DS.Tables[0].Rows[0]["HStopflag"]; //omodel.HStopflag = (bool)DS.Tables[0].Rows[0]["HStopflag"]; omodel.HRemark = DS.Tables[0].Rows[0]["HRemark"].ToString().Trim(); //omodel.HUseFlag = DS.Tables[0].Rows[0]["HUseFlag"].ToString().Trim(); //20141020 return true; NETSCM/ClsShowMod.cs
@@ -6493,13 +6493,13 @@ oGy_CusNumberRelationList.Show(); oMainForm.AddTabPage(oGy_CusNumberRelationList); break; // case "gy_mouldware": // //权限 // Gy_MouldWare oGy_MouldWare = new Gy_MouldWare(); // oGy_MouldWare.MdiParent = oMain; // oGy_MouldWare.Show(); // oMainForm.AddTabPage(oGy_MouldWare); // break; case "gy_organizations": //权限 Gy_ORGANIZATIONS oGy_ORGANIZATIONS = new Gy_ORGANIZATIONS(); oGy_ORGANIZATIONS.MdiParent = oMain; oGy_ORGANIZATIONS.Show(); oMainForm.AddTabPage(oGy_ORGANIZATIONS); break; // case "gy_technologyparameter": // Gy_TechnologyParameter oGy_TechnologyParameter = new Gy_TechnologyParameter(); // oGy_TechnologyParameter.MdiParent = oMain;