public void ChooseYHZCMCForFYXM() { DataTable table = new DAL.BMFYXMManager().QueryFYXMYHZCIsAndYHZCMCIsEmpty(); if (table != null) { DAL.BMSPFLManager manager2 = new DAL.BMSPFLManager(); List <string> sqlID = new List <string>(); List <Dictionary <string, object> > param = new List <Dictionary <string, object> >(); for (int i = 0; i < table.Rows.Count; i++) { Dictionary <string, object> item = new Dictionary <string, object>(); string str = GetSafeData.ValidateValue <string>(table.Rows[i], "BM"); string bm = GetSafeData.ValidateValue <string>(table.Rows[i], "SPFL"); string str3 = GetSafeData.ValidateValue <string>(table.Rows[i], "YHZC"); string sPFLMCBYBM = manager2.GetSPFLMCBYBM(bm); string str5 = ""; object[] objArray = ServiceFactory.InvokePubService("Aisino.Fwkp.Bmgl.GetSLV_BY_BM", new object[] { bm }); if ((objArray != null) && (objArray.Length > 0)) { string[] strArray = (objArray[0] as DataTable).Rows[0]["ZZSTSGL"].ToString().Split(new char[] { ',', '、', ';', ',', ';' }); if (strArray.Length > 0) { str5 = strArray[0]; if ((!Flbm.IsDK() && (strArray.Length == 1)) && strArray[0].Contains("1.5%")) { str3 = "否"; str5 = ""; } if ((!Flbm.IsDK() && (strArray.Length > 1)) && strArray[0].Contains("1.5%")) { str5 = strArray[1]; } } else { str3 = "否"; } } else { str3 = "否"; } item.Add("BM", str); item.Add("SPFL", bm); item.Add("SPFLMC", sPFLMCBYBM); item.Add("YHZC", str3); item.Add("YHZCMC", str5); sqlID.Add("aisino.Fwkp.Bmgl.BMSPFL.UpdateFYXMSPFL"); param.Add(item); } new DAL.BMSPFLManager().UpdateSPFLTable(sqlID, param, false); } }
public void checkfyxmspfl() { DataTable table = new DAL.BMFYXMManager().QueryFYXMSPFLLNotEmpty(); if (table != null) { DAL.BMSPFLManager manager2 = new DAL.BMSPFLManager(); List <string> sqlID = new List <string>(); List <Dictionary <string, object> > param = new List <Dictionary <string, object> >(); for (int i = 0; i < table.Rows.Count; i++) { Dictionary <string, object> item = new Dictionary <string, object>(); string str = GetSafeData.ValidateValue <string>(table.Rows[i], "BM"); string bm = GetSafeData.ValidateValue <string>(table.Rows[i], "SPFL"); string str3 = GetSafeData.ValidateValue <string>(table.Rows[i], "YHZC"); string str4 = GetSafeData.ValidateValue <string>(table.Rows[i], "YHZCMC"); item.Add("BM", str); string sPFLMCBYBM = string.Empty; if (manager2.CanUseThisSPFLBM(bm, false, false)) { item.Add("SPFL", bm); sPFLMCBYBM = manager2.GetSPFLMCBYBM(bm); item.Add("SPFLMC", sPFLMCBYBM); if (manager2.CanUseThisYHZC(bm)) { item.Add("YHZC", str3); item.Add("YHZCMC", str4); } else { item.Add("YHZC", "否"); item.Add("YHZCMC", ""); } } else { item.Add("SPFL", ""); item.Add("SPFLMC", ""); item.Add("YHZC", ""); item.Add("YHZCMC", ""); } sqlID.Add("aisino.Fwkp.Bmgl.BMSPFL.UpdateFYXMSPFL"); param.Add(item); } new DAL.BMSPFLManager().UpdateSPFLTable(sqlID, param, false); } }
private bool textBoxBM_Validating() { bool flag = true; string input = this.textBoxBM.Text.Trim(); string pattern = "^[a-z0-9]+$"; Regex regex = new Regex(pattern); if (!regex.IsMatch(input)) { MessageManager.ShowMsgBox("INP-235506"); return(false); } if (!this.isUpdate) { if (!this.textBoxBM.Text.StartsWith(this._sjbm)) { this.textBoxBM.Text = this.SuggestBM; this.textBoxBM.Select(this.textBoxBM.Text.Length, 0); MessageManager.ShowMsgBox("INP-235306"); return(false); } if (!("NoXJBM" != this.fyxmlogical.ChildDetermine(this.textBoxBM.Text.Trim(), this._sjbm)) || (this.textBoxBM.Text.Length == this.fyxmlogical.GetSuggestBMLen(this._sjbm))) { return(flag); } this.textBoxBM.Text = this.SuggestBM; this.textBoxBM.Select(this.textBoxBM.Text.Length, 0); MessageManager.ShowMsgBox("INP-235305"); return(false); } if (this.textBoxBM.Text.Length > this.yuanBM.Length) { DAL.BMFYXMManager manager = new DAL.BMFYXMManager(); int num = manager.BmMaxLenth(this.yuanBM) + Math.Abs((int)(this.yuanBM.Length - this.textBoxBM.Text.Length)); if (num > 0x10) { MessageBoxHelper.Show("修改之后将导致其下级编码过长\n请重新录入编码", "错误", MessageBoxButtons.OK, MessageBoxIcon.Hand); return(false); } } if (!this.textBoxBM.Text.StartsWith(this._sjbm)) { if (this.textBoxSJBM.Text != this.fyxmModel.SJBM) { this.textBoxBM.Text = this.SuggestBM; } else { this.textBoxBM.Text = this.yuanBM; } this.textBoxBM.Select(this.textBoxBM.Text.Length, 0); MessageManager.ShowMsgBox("INP-235306"); return(false); } if (!("OnlyBMAndIsSelf" != this.fyxmlogical.ChildDetermine(this.yuanBM, this._sjbm)) || (this.textBoxBM.Text.Length == this.fyxmlogical.GetSuggestBMLen(this._sjbm))) { return(flag); } if (this.textBoxSJBM.Text != this.fyxmModel.SJBM) { this.textBoxBM.Text = this.SuggestBM; } else { this.textBoxBM.Text = this.yuanBM; } this.textBoxBM.Select(this.textBoxBM.Text.Length, 0); MessageManager.ShowMsgBox("INP-235305"); return(false); }