예제 #1
0
 private void AdjustComboBoxYHZC()
 {
     if (Flbm.IsYM())
     {
         object[] objArray = ServiceFactory.InvokePubService("Aisino.Fwkp.Bmgl.GetSLV_BY_BM", new object[] { this.comBoxSPFL.Text.Trim() });
         if (((objArray == null) || ((objArray[0] as DataTable).Rows.Count <= 0)) || ((objArray[0] as DataTable).Rows[0]["ZZSTSGL"].ToString() == ""))
         {
             this.comboBoxYHZC.SelectedIndex = 1;
             this.comboBoxYHZC.Enabled       = false;
         }
         else
         {
             this.comboBoxYHZC.Enabled = true;
             if (!Flbm.IsDK())
             {
                 string[] strArray = (objArray[0] as DataTable).Rows[0]["ZZSTSGL"].ToString().Split(new char[] { ',', '、', ';', ',', ';' });
                 if ((strArray.Length == 1) && strArray[0].Contains("1.5%"))
                 {
                     this.comboBoxYHZC.SelectedIndex = 1;
                     this.comboBoxYHZC.Enabled       = false;
                 }
             }
         }
     }
     else
     {
         this.comboBoxYHZC.Text = "否";
         this.comboBoxYHZCMC.Items.Add("");
         this.comboBoxYHZCMC.Text    = "";
         this.comboBoxYHZCMC.Enabled = false;
     }
 }
예제 #2
0
 private void LoadData(string BM)
 {
     this.fyxmModel          = (BMFYXMModel)this.fyxmlogical.GetModel(BM);
     this.textBoxBM.Text     = this.fyxmModel.BM;
     this.textBoxWaitMC.Text = this.fyxmModel.MC;
     this.textBoxSJBM.Text   = this.fyxmModel.SJBM;
     this.textBoxJM.Text     = this.fyxmModel.JM;
     if (Flbm.IsYM())
     {
         this.comBoxSPFL.Text            = this.fyxmModel.SPFL;
         this.SPFLMC.Text                = this.fyxmModel.SPFLMC;
         this.comboBoxYHZC.SelectedIndex = ("是" == this.fyxmModel.YHZC) ? 0 : 1;
         if (this.comboBoxYHZCMC.Enabled)
         {
             try
             {
                 this.comboBoxYHZCMC.Text = this.fyxmModel.YHZCMC.ToString();
             }
             catch
             {
                 if (!this.comboBoxYHZCMC.Items.Contains(""))
                 {
                     this.comboBoxYHZCMC.Items.Add("");
                     this.comboBoxYHZCMC.Text = "";
                 }
             }
         }
     }
 }
예제 #3
0
        public string ExportData(string pathFile, string separator, DataTable khTable = null)
        {
            string path = pathFile.Remove(pathFile.LastIndexOf(@"\"));

            if (!Directory.Exists(path))
            {
                Directory.CreateDirectory(path);
            }
            DataTable exportData = this.bmfyxmDAL.GetExportData();

            if (exportData.Rows.Count == 0)
            {
                return("没有费用项目");
            }
            StringBuilder builder = new StringBuilder();

            using (StreamWriter writer = new StreamWriter(pathFile, false, ToolUtil.GetEncoding()))
            {
                writer.WriteLine("{费用项目编码}[分隔符]\"" + separator + "\"");
                writer.WriteLine("// 每行格式 :");
                string str2 = "";
                if (Flbm.IsYM())
                {
                    str2 = "// 编码~~名称~~简码~~商品分类~~是否享受优惠政策~~税收分类名称~~优惠政策类型~~编码版本号";
                }
                else
                {
                    str2 = "// 编码~~名称~~简码";
                }
                writer.WriteLine(str2.Replace(",", separator));
                string maxBMBBBH = new SPFLService().GetMaxBMBBBH();
                for (int i = 0; i < exportData.Rows.Count; i++)
                {
                    builder.Remove(0, builder.Length);
                    builder.Append(GetSafeData.ExportItem(exportData.Rows[i]["BM"].ToString(), separator));
                    builder.Append(separator);
                    builder.Append(GetSafeData.ExportItem(exportData.Rows[i]["MC"].ToString(), separator));
                    builder.Append(separator);
                    builder.Append(GetSafeData.ExportItem(exportData.Rows[i]["JM"].ToString(), separator));
                    if (Flbm.IsYM())
                    {
                        builder.Append(separator);
                        builder.Append(GetSafeData.ExportItem(exportData.Rows[i]["SPFL"].ToString(), separator));
                        builder.Append(separator);
                        builder.Append(GetSafeData.ExportItem(exportData.Rows[i]["YHZC"].ToString(), separator));
                        builder.Append(separator);
                        builder.Append(GetSafeData.ExportItem(exportData.Rows[i]["SPFLMC"].ToString(), separator));
                        builder.Append(separator);
                        builder.Append(GetSafeData.ExportItem(exportData.Rows[i]["YHZCMC"].ToString(), separator));
                        builder.Append(separator);
                        builder.Append(GetSafeData.ExportItem(maxBMBBBH, separator));
                    }
                    builder.Replace(",,", ",\"\",");
                    writer.WriteLine(builder.ToString());
                }
            }
            return("0");
        }
예제 #4
0
        private bool SimpleValidated()
        {
            bool flag = true;

            if (this.textBoxWaitMC.Text.Trim().Length == 0)
            {
                this.textBoxWaitMC.Focus();
                flag = false;
            }
            if (this.textBoxJM.Text.Trim().Trim().Length != 0)
            {
                string input = this.textBoxJM.Text.Trim();
                if ((input[0] < 'A') || (input[0] > 'Z'))
                {
                    this.textBoxJM.Focus();
                    flag = false;
                    MessageManager.ShowMsgBox("INP-235501");
                    return(flag);
                }
                string pattern = "^[A-Z0-9]+$";
                Regex  regex   = new Regex(pattern);
                if (!regex.IsMatch(input))
                {
                    this.textBoxJM.Focus();
                    flag = false;
                    MessageManager.ShowMsgBox("INP-235502");
                    return(flag);
                }
            }
            if (Flbm.IsYM())
            {
                DAL.BMSPFLManager manager = new DAL.BMSPFLManager();
                if (!manager.CanUseThisSPFLBM(this.comBoxSPFL.Text.Trim(), false, false))
                {
                    MessageBox.Show("查无此分类编码或此分类编码不可用,请重新输入!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Hand);
                    this.comBoxSPFL.Focus();
                    this.SPFLMC.Text = "";
                    return(false);
                }
                this.SPFLMC.Text = manager.GetSPFLMCBYBM(this.comBoxSPFL.Text.Trim());
                if (("是" == this.comboBoxYHZC.SelectedItem.ToString()) && (this.comboBoxYHZCMC.Text == ""))
                {
                    MessageBox.Show("优惠类型不能为空,请重新选择!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Hand);
                    this.comboBoxYHZCMC.Focus();
                    return(false);
                }
            }
            else
            {
                flag = true;
            }
            if (!flag)
            {
                MessageManager.ShowMsgBox("INP-235309");
            }
            return(flag);
        }
예제 #5
0
 private void AddShowColumn(AisinoDataSet dataSet)
 {
     dataSet.Data.Constraints.Clear();
     dataSet.Data.Columns.Add("SLVStr");
     dataSet.Data.Columns.Add("DJStr");
     dataSet.Data.Columns.Add("ISHIDEBOOL");
     dataSet.Data.Columns.Add("HSJBZSTR");
     for (int i = 0; i < dataSet.Data.Rows.Count; i++)
     {
         double num2  = (double)dataSet.Data.Rows[i]["SLV"];
         double num3  = (double)dataSet.Data.Rows[i]["DJ"];
         string str   = (string)dataSet.Data.Rows[i]["ISHIDE"];
         bool   flag  = (bool)dataSet.Data.Rows[i]["HSJBZ"];
         int    num4  = (int)dataSet.Data.Rows[i]["WJ"];
         bool   flag2 = (bool)dataSet.Data.Rows[i]["HYSY"];
         string str2  = dataSet.Data.Rows[i]["LSLVBS"].ToString();
         if ((num2 == 0.05) && flag2)
         {
             dataSet.Data.Rows[i]["SLVStr"] = "中外合作油气田";
         }
         else if ((("0.00" == num2.ToString("f2")) && (str2 == "1")) && Flbm.IsYM())
         {
             dataSet.Data.Rows[i]["SLVStr"] = "免税";
         }
         else if ((("0.00" == num2.ToString("f2")) && (str2 == "2")) && Flbm.IsYM())
         {
             dataSet.Data.Rows[i]["SLVStr"] = "不征税";
         }
         else if ((("0.00" == num2.ToString("f2")) && (num4 == 1)) && Flbm.IsYM())
         {
             dataSet.Data.Rows[i]["SLVStr"] = "0%";
         }
         else if ("0.015" == num2.ToString("f3"))
         {
             dataSet.Data.Rows[i]["SLVStr"] = "减按1.5%计算";
         }
         else if ((("0.00" == num2.ToString("f2")) && (num4 == 1)) && !Flbm.IsYM())
         {
             dataSet.Data.Rows[i]["SLVStr"] = "免税";
         }
         else
         {
             dataSet.Data.Rows[i]["SLVStr"] = (num2 == 0.0) ? "" : num2.ToString("P0");
         }
         dataSet.Data.Rows[i]["ISHIDEBOOL"] = (str == "0000000000") ? "否" : "是";
         if (num4 == 1)
         {
             dataSet.Data.Rows[i]["DJStr"]    = (num3 == 0.0) ? "" : num3.ToString("C");
             dataSet.Data.Rows[i]["HSJBZSTR"] = flag ? "是" : "否";
         }
     }
 }
예제 #6
0
 private void BMFYXM_Edit_Load(object sender, EventArgs e)
 {
     try
     {
         this.aisinoLBL1.Visible     = Flbm.IsYM();
         this.SPFLMC.Visible         = Flbm.IsYM();
         this.aisinoLBL4.Visible     = Flbm.IsYM();
         this.comboBoxYHZCMC.Visible = Flbm.IsYM();
         this.aisinoLBL2.Visible     = Flbm.IsYM();
         this.aisinoLBL3.Visible     = Flbm.IsYM();
         this.comboBoxYHZC.Visible   = Flbm.IsYM();
         this.comBoxSPFL.Visible     = Flbm.IsYM();
         if (this.isUpdate)
         {
             this.LoadData(this._bm);
             this._sjbm = this.fyxmModel.SJBM;
             this.textBoxSJBM.SelectBM         = this.fyxmModel.SJBM;
             this.toolStripBtnContinue.Visible = false;
         }
         else
         {
             this.textBoxSJBM.SelectBM = this._sjbm;
             this.SuggestBM            = this.fyxmlogical.TuiJianBM(this._sjbm);
             if (this.SuggestBM == "NoNode")
             {
                 MessageManager.ShowMsgBox("INP-235121");
                 base.Close();
                 return;
             }
             if (this.SuggestBM.Length > 0x10)
             {
                 MessageManager.ShowMsgBox("INP-235111");
                 base.Close();
                 return;
             }
             this.textBoxBM.Text     = this.SuggestBM;
             this.textBoxWaitMC.Text = this.SuggestMC;
         }
         this.textBoxBM.Select(this.textBoxBM.Text.Length, 0);
         this.textBoxSJBM.TreeLoad();
         if (Flbm.IsYM())
         {
             this.AdjustComboBoxYHZC();
             this.AdjustComboBoxYHZCMC();
         }
     }
     catch (Exception exception)
     {
         ExceptionHandler.HandleError(exception);
     }
 }
예제 #7
0
 private void InModel()
 {
     this.fyxmModel.BM   = this.textBoxBM.Text.Trim();
     this.fyxmModel.MC   = this.textBoxWaitMC.Text.Trim();
     this.fyxmModel.SJBM = this.textBoxSJBM.Text.Trim();
     this.fyxmModel.JM   = this.textBoxJM.Text.Trim();
     this.fyxmModel.KJM  = CommonFunc.GenerateKJM(this.textBoxWaitMC.Text.Trim());
     this.fyxmModel.WJ   = 1;
     if (Flbm.IsYM())
     {
         this.fyxmModel.SPFL   = this.comBoxSPFL.Text.Trim();
         this.fyxmModel.SPFLMC = this.SPFLMC.Text.Trim();
         this.fyxmModel.YHZC   = (this.comboBoxYHZC.SelectedIndex == 0) ? "是" : "否";
         this.fyxmModel.YHZCMC = this.comboBoxYHZCMC.Text.Trim();
     }
 }
예제 #8
0
 protected override bool SetValid()
 {
     if (!Flbm.IsYM())
     {
         return(false);
     }
     try
     {
         try
         {
             string str = "aisino.Fwkp.Bmgl.BMSPFL.BMSPFLISEMPTY";
             Dictionary <string, object> dictionary = new Dictionary <string, object>();
             if (this.baseDAO.queryValueSQL <int>(str, dictionary) == 0)
             {
                 string codeFile = Path.Combine(PropertyUtil.GetValue("MAIN_PATH") + @"\Bin", "spfwssflbm.xml");
                 new BMSPFLManager().AutoImportDatabase(codeFile);
             }
             this.baseDAO.未确认DAO方法2_疑似updateSQL("aisino.Fwkp.Bmgl.BMSP.ModifyBMSPLSLVBSbyYHZCMC", dictionary);
         }
         catch (Exception exception)
         {
             this._Loger.Debug(exception.ToString());
         }
         return(true);
     }
     catch (BaseException exception2)
     {
         this._Loger.Error(exception2.Message);
         ExceptionHandler.HandleError(exception2);
         return(false);
     }
     catch (Exception exception3)
     {
         this._Loger.Error(exception3.Message);
         ExceptionHandler.HandleError(exception3);
         return(false);
     }
 }
예제 #9
0
파일: BMSP.cs 프로젝트: hkloudou/HX-Base
        public BMSP()
        {
            this.InitializeComponent();
            List <Dictionary <string, string> > list = new List <Dictionary <string, string> >();
            Dictionary <string, string>         item = new Dictionary <string, string>();

            item.Add("AisinoLBL", "编码");
            item.Add("Property", "BM");
            item.Add("Type", "Text");
            item.Add("Width", "60");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", "True");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "名称");
            item.Add("Property", "MC");
            item.Add("Type", "Text");
            item.Add("Width", "200");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "简码");
            item.Add("Property", "JM");
            item.Add("Type", "Text");
            item.Add("Width", "60");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "商品税目");
            item.Add("Property", "SPSM");
            item.Add("Type", "Text");
            item.Add("Width", "80");
            item.Add("Align", "MiddleRight");
            item.Add("HeadAlign", "MiddleCenter");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "税率");
            item.Add("Property", "SLV");
            item.Add("Type", "Text");
            item.Add("Width", "60");
            item.Add("Align", "MiddleRight");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", "False");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "税率");
            item.Add("Property", "SLVStr");
            item.Add("Type", "Text");
            item.Add("Width", "60");
            item.Add("Align", "MiddleRight");
            item.Add("HeadAlign", "MiddleCenter");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "规格型号");
            item.Add("Property", "GGXH");
            item.Add("Type", "Text");
            item.Add("Width", "80");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "计量单位");
            item.Add("Property", "JLDW");
            item.Add("Type", "Text");
            item.Add("Width", "80");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "快捷码");
            item.Add("Property", "KJM");
            item.Add("Type", "Text");
            item.Add("Visible", "False");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "上级编码");
            item.Add("Property", "SJBM");
            item.Add("Type", "Text");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", "False");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "单价");
            item.Add("Property", "DJ");
            item.Add("Type", "Text");
            item.Add("Width", "60");
            item.Add("Align", "MiddleRight");
            item.Add("HeadAlign", "MiddleCenter");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "单价Double");
            item.Add("Property", "DJStr");
            item.Add("Type", "Text");
            item.Add("Width", "60");
            item.Add("Align", "MiddleRight");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", "False");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "含税价标志");
            item.Add("Property", "HSJBZ");
            item.Add("Type", "Text");
            item.Add("Width", "100");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", "False");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "含税价标志");
            item.Add("Property", "HSJBZSTR");
            item.Add("Type", "Text");
            item.Add("Width", "100");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", "True");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "销售收入科目");
            item.Add("Property", "XSSRKM");
            item.Add("Type", "Text");
            item.Add("Width", "80");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", "False");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "应缴增值税科目");
            item.Add("Property", "YJZZSKM");
            item.Add("Type", "Text");
            item.Add("Width", "80");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", "False");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "销售退回科目");
            item.Add("Property", "XSTHKM");
            item.Add("Type", "Text");
            item.Add("Width", "80");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", "False");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "中外合作油气田");
            item.Add("Property", "HYSY");
            item.Add("Type", "Text");
            item.Add("Width", "80");
            item.Add("Visible", "False");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "零税率标识");
            item.Add("Property", "LSLVBS");
            item.Add("Type", "Text");
            item.Add("Width", "80");
            item.Add("Visible", "False");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "Hash值");
            item.Add("Property", "XTHASH");
            item.Add("Type", "Text");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", "False");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "隐藏标志");
            item.Add("Property", "ISHIDE");
            item.Add("Type", "Text");
            item.Add("Width", "80");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", "False");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "隐藏标志");
            item.Add("Property", "ISHIDEBOOL");
            item.Add("Type", "ComboBox");
            DataTable table = new DataTable();

            table.Columns.Add("ISHIDE", Type.GetType("System.String"));
            DataRow row = table.NewRow();

            row["ISHIDE"] = "否";
            table.Rows.Add(row);
            DataRow row2 = table.NewRow();

            row2["ISHIDE"] = "是";
            table.Rows.Add(row2);
            base.aisinoDataGrid1.ComboBoxColumnDataSource.Add("IsHideSource", table);
            item.Add("DataSource", "IsHideSource");
            item.Add("DisplayMember", "ISHIDE");
            item.Add("ValueMember", "ISHIDE");
            item.Add("Width", "80");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", "True");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "稀土商品编码");
            item.Add("Property", "XTCODE");
            item.Add("Type", "Text");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", "False");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "税收分类编码");
            item.Add("Property", "SPFL");
            item.Add("Type", "Text");
            item.Add("Align", "MiddleLeft");
            item.Add("Width", "80");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", Flbm.IsYM().ToString());
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "税收分类名称");
            item.Add("Property", "SPFLMC");
            item.Add("Type", "Text");
            item.Add("Align", "MiddleLeft");
            item.Add("Width", "200");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", Flbm.IsYM().ToString());
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "享受优惠政策");
            item.Add("Property", "YHZC");
            item.Add("Type", "Text");
            item.Add("Width", "100");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", Flbm.IsYM().ToString());
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "优惠政策类型");
            item.Add("Property", "YHZCMC");
            item.Add("Type", "Text");
            item.Add("Align", "MiddleLeft");
            item.Add("Width", "200");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", Flbm.IsYM().ToString());
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "SPZL是啥?");
            item.Add("Property", "SPZL");
            item.Add("Type", "Text");
            item.Add("Width", "100");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", "False");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "SPSX是啥?");
            item.Add("Property", "SPSX");
            item.Add("Type", "Text");
            item.Add("Width", "100");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", "False");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "文件性质");
            item.Add("Property", "WJ");
            item.Add("Type", "Text");
            item.Add("RowStyleField", "WJ");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", "False");
            list.Add(item);
            base.aisinoDataGrid1.ColumeHead = list;
            this.ImportXTSPAuto();
            this.InitIsHideCell();
            if (Flbm.IsYM())
            {
                new DAL.BMSPManager().Update_SP();
            }
            base.aisinoDataGrid1.DataGrid.AllowUserToAddRows = false;
            base.log        = LogUtil.GetLogger <BMKH>();
            base.bllManager = this.spManager;
        }
예제 #10
0
        private void BMCLSelect_Load(object sender, EventArgs e)
        {
            List <Dictionary <string, string> > list = new List <Dictionary <string, string> >();
            Dictionary <string, string>         item = new Dictionary <string, string>();

            item.Add("AisinoLBL", "编码");
            item.Add("Property", "BM");
            item.Add("Type", "Text");
            item.Add("Width", "60");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", "True");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "车辆类型");
            item.Add("Property", "MC");
            item.Add("Type", "Text");
            item.Add("Width", "150");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "简码");
            item.Add("Property", "JM");
            item.Add("Type", "Text");
            item.Add("Width", "60");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "上级编码");
            item.Add("Property", "SJBM");
            item.Add("Type", "Text");
            item.Add("Width", "60");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", "False");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "厂牌型号");
            item.Add("Property", "CPXH");
            item.Add("Type", "Text");
            item.Add("Width", "100");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "产地");
            item.Add("Property", "CD");
            item.Add("Type", "Text");
            item.Add("Width", "100");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "生产企业名称");
            item.Add("Property", "SCCJMC");
            item.Add("Type", "Text");
            item.Add("Width", "130");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "税收分类编码");
            item.Add("Property", "SPFL");
            item.Add("Type", "Text");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", Flbm.IsYM().ToString());
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "税收分类名称");
            item.Add("Property", "SPFLMC");
            item.Add("Type", "Text");
            item.Add("Align", "MiddleLeft");
            item.Add("Width", "200");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", Flbm.IsYM().ToString());
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "享受优惠政策");
            item.Add("Property", "YHZC");
            item.Add("Type", "Text");
            item.Add("Width", "100");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", Flbm.IsYM().ToString());
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "优惠政策类型");
            item.Add("Property", "YHZCMC");
            item.Add("Type", "Text");
            item.Add("Align", "MiddleLeft");
            item.Add("Width", "200");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", Flbm.IsYM().ToString());
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "快捷码");
            item.Add("Property", "KJM");
            item.Add("Type", "Text");
            item.Add("Width", "100");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", "False");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "文件性质");
            item.Add("Property", "WJ");
            item.Add("Type", "Text");
            item.Add("RowStyleField", "WJ");
            item.Add("Visible", "False");
            list.Add(item);
            this.aisinoDataGrid1.ColumeHead       = list;
            this.aisinoDataGrid1.MultiSelect      = false;
            this.aisinoDataGrid1.AborCellPainting = true;
            this.aisinoDataGrid1.ReadOnly         = true;
            this.aisinoDataGrid1.DataGrid.AllowUserToDeleteRows = false;
            this.treeViewBM1.ReadOnly       = true;
            this.treeViewBM1.RootNodeString = "车辆大类";
            this.treeViewBM1.getListNodes  += new TreeViewBM.GetListNodes(this.treeViewBM1_getListNodes);
            this.treeViewBM1.TreeLoad();
        }
예제 #11
0
        public ImportResult ImportDataZC(string codeFile)
        {
            new Dictionary <string, object>();
            ImportResult result   = new ImportResult();
            XmlDocument  document = new XmlDocument();

            try
            {
                try
                {
                    document.Load(codeFile);
                }
                catch
                {
                    throw new Exception("不符合机动车编码格式");
                }
                XmlNode documentElement = document.DocumentElement;
                try
                {
                    if (documentElement.Attributes["TYPE"].Value != "JDCBIANMA")
                    {
                        throw new Exception("不符合机动车编码格式");
                    }
                }
                catch
                {
                    throw new Exception("不符合机动车编码格式");
                }
                XmlNodeList list = null;
                list = documentElement.SelectNodes("/Data/CLXX/Row");
                List <Dictionary <string, string> > list2 = new List <Dictionary <string, string> >();
                foreach (XmlNode node2 in list)
                {
                    Dictionary <string, string> item = new Dictionary <string, string>();
                    if (Flbm.IsYM())
                    {
                        if (node2.Attributes["SPFLBM"] == null)
                        {
                            item.Add("SPFLBM", "");
                        }
                        else
                        {
                            item.Add(node2.Attributes["SPFLBM"].Name, node2.Attributes["SPFLBM"].Value);
                        }
                    }
                    item.Add(node2.Attributes["SCQYMC"].Name, node2.Attributes["SCQYMC"].Value);
                    item.Add(node2.Attributes["DJ"].Name, node2.Attributes["DJ"].Value);
                    item.Add(node2.Attributes["CDMC"].Name, node2.Attributes["CDMC"].Value);
                    item.Add(node2.Attributes["CPXH"].Name, node2.Attributes["CPXH"].Value);
                    item.Add(node2.Attributes["CLLXMC"].Name, node2.Attributes["CLLXMC"].Value);
                    item.Add(node2.Attributes["CLDLMC"].Name, node2.Attributes["CLDLMC"].Value);
                    item.Add(node2.Attributes["CPBM"].Name, node2.Attributes["CPBM"].Value);
                    list2.Add(item);
                }
                DAL.BMSPFLManager manager = new DAL.BMSPFLManager();
                foreach (Dictionary <string, string> dictionary2 in list2)
                {
                    BMCLModel car      = new BMCLModel();
                    string    searchid = "";
                    searchid   = this.bmclDAL.AutoNodeLogic(dictionary2["CLDLMC"]);
                    car.SJBM   = searchid;
                    car.BM     = this.TuiJianBM(searchid);
                    car.MC     = dictionary2["CLLXMC"];
                    car.SCCJMC = dictionary2["SCQYMC"];
                    car.CPXH   = dictionary2["CPXH"];
                    car.CD     = dictionary2["CDMC"];
                    if (Flbm.IsYM() && manager.CanUseThisSPFLBM(dictionary2["SPFLBM"], false, false))
                    {
                        car.SPFL   = dictionary2["SPFLBM"];
                        car.SPFLMC = manager.GetSPFLMCBYBM(car.SPFL);
                        if (!manager.CanUseThisYHZC(car.SPFL))
                        {
                            car.YHZC   = "否";
                            car.YHZCMC = "";
                        }
                    }
                    car.KJM = CommonFunc.GenerateKJM(car.MC);
                    car.WJ  = 1;
                    string str2 = this.AddCustomerToAuto(car, car.SJBM);
                    if ("OverWrite" == str2)
                    {
                        result.Correct++;
                        result.DtResult.Rows.Add(new object[] { car.BM, car.MC, "正确传入", "覆盖记录:" + car.BM });
                    }
                    else if ("Insert" == str2)
                    {
                        result.Correct++;
                        result.DtResult.Rows.Add(new object[] { car.BM, car.MC, "正确传入", "插入成功:" + car.BM });
                    }
                    else
                    {
                        result.Failed++;
                        result.DtResult.Rows.Add(new object[] { car.BM, car.MC, "失败", "数据库读写错误" });
                    }
                }
            }
            catch
            {
                throw;
            }
            result.ImportTable = "车辆编码.DB";
            return(result);
        }
예제 #12
0
        public ImportResult ImportData(string codeFile)
        {
            ImportResult result2;

            try
            {
                string[] strArray = File.ReadAllLines(codeFile, ToolUtil.GetEncoding());
                if (strArray.Length == 0)
                {
                    throw new CustomException("此文件没有内容");
                }
                string str   = "";
                int    index = 0;
                bool   flag  = true;
                while (flag)
                {
                    if (strArray[index].StartsWith("{车辆编码}"))
                    {
                        string str2 = strArray[index];
                        if (!str2.Contains("\""))
                        {
                            throw new CustomException("此文件首行车辆编码没有指定分隔符,分隔符使用双引号标注");
                        }
                        str  = str2.Substring(str2.IndexOf("\"")).Trim().Trim(new char[] { '"' });
                        flag = false;
                        index++;
                    }
                    else
                    {
                        index++;
                        if (index == strArray.Length)
                        {
                            throw new CustomException("此文件不符合车辆编码文本格式");
                        }
                    }
                }
                ImportResult     result = new ImportResult();
                Stack <lastBMJG> stack  = new Stack <lastBMJG>();
                string           str4   = this.TuiJianBM("");
                string           str5   = "";
                bool             flag2  = false;
                for (int i = index; i < strArray.Length; i++)
                {
                    BMCLModel model;
                    string    lineText = strArray[i].Trim();
                    if (((lineText.Length == 0) || lineText.StartsWith("//")) || !lineText.Contains(str))
                    {
                        continue;
                    }
                    string[] strArray2 = GetSafeData.Split(lineText, str);
                    if (strArray2.Length < 3)
                    {
                        throw new CustomException("文本首行指定的分隔符与实际分隔符不一致,\n格式不正确等原因导致不能导入此文件!");
                    }
                    model = new BMCLModel {
                        BM = strArray2[0],
                        MC = strArray2[1],
                        JM = strArray2[2],
                    };
                    model.KJM = CommonFunc.GenerateKJM(model.MC);
                    string     str7 = "";
                    string     str8 = "";
                    ResultType none = ResultType.None;
                    if (strArray2.Length > 3)
                    {
                        if (strArray2.Length < 6)
                        {
                            throw new CustomException(string.Format("第{0}行数据不全", i));
                        }
                        model.WJ = 1;
                        string str9 = "";
                        if (str == "~~")
                        {
                            str9 = strArray2[3].Replace(",", "\r\n").Replace("#|#", "\r\n");
                        }
                        else if (str == " ")
                        {
                            str9 = strArray2[3].Replace("#|#", "\r\n");
                        }
                        else
                        {
                            str9 = strArray2[3];
                        }
                        model.CPXH = str9;
                        string str10 = "";
                        if (str == "~~")
                        {
                            str10 = strArray2[4].Replace(",", "\r\n").Replace("#|#", "\r\n");
                        }
                        else if (str == " ")
                        {
                            str10 = strArray2[4].Replace("#|#", "\r\n");
                        }
                        else
                        {
                            str10 = strArray2[4];
                        }
                        model.CD = str10;
                        string str11 = "";
                        if (str == "~~")
                        {
                            str11 = strArray2[5].Replace(",", "\r\n").Replace("#|#", "\r\n");
                        }
                        else if (str == " ")
                        {
                            str11 = strArray2[5].Replace("#|#", "\r\n");
                        }
                        else
                        {
                            str11 = strArray2[5];
                        }
                        model.SCCJMC = str11;
                        if (Flbm.IsYM() && (strArray2.Length > 6))
                        {
                            DAL.BMSPFLManager manager = new DAL.BMSPFLManager();
                            string            bm      = "";
                            if (str == "~~")
                            {
                                bm = strArray2[6].Replace(",", "\r\n").Replace("#|#", "\r\n");
                            }
                            else if (str == " ")
                            {
                                bm = strArray2[6].Replace("#|#", "\r\n");
                            }
                            else
                            {
                                bm = strArray2[6];
                            }
                            if (strArray2.Length > 7)
                            {
                                string str13 = "";
                                if (str == "~~")
                                {
                                    str13 = strArray2[7].Replace(",", "\r\n").Replace("#|#", "\r\n");
                                }
                                else if (str == " ")
                                {
                                    str13 = strArray2[7].Replace("#|#", "\r\n");
                                }
                                else
                                {
                                    str13 = strArray2[7];
                                }
                                if (manager.CanUseThisSPFLBM(bm, false, false))
                                {
                                    model.SPFL   = bm;
                                    model.SPFLMC = manager.GetSPFLMCBYBM(bm);
                                    if (manager.CanUseThisYHZC(bm))
                                    {
                                        if ((str13.Trim() == "是") || (str13.Trim() == "否"))
                                        {
                                            model.YHZC = str13;
                                            if (model.YHZC == "否")
                                            {
                                                model.YHZCMC = "";
                                            }
                                        }
                                        else
                                        {
                                            model.YHZC   = "否";
                                            model.YHZCMC = "";
                                        }
                                        if (strArray2.Length > 9)
                                        {
                                            bool flag3 = false;
                                            if (str13.Trim() == "是")
                                            {
                                                object[] objArray = ServiceFactory.InvokePubService("Aisino.Fwkp.Bmgl.GetSLV_BY_BM", new object[] { model.SPFL });
                                                if ((objArray != null) && (objArray.Length > 0))
                                                {
                                                    string[] strArray3 = (objArray[0] as DataTable).Rows[0]["ZZSTSGL"].ToString().Split(new char[] { ',', '、', ';', ',', ';' });
                                                    if (strArray3.Length > 0)
                                                    {
                                                        foreach (string str14 in strArray3)
                                                        {
                                                            if (strArray2[9].Trim() == str14)
                                                            {
                                                                model.YHZC = "是";
                                                                string str15 = "";
                                                                if (str == "~~")
                                                                {
                                                                    str15 = strArray2[9].Replace(",", "\r\n").Replace("#|#", "\r\n");
                                                                }
                                                                else if (str == " ")
                                                                {
                                                                    str15 = strArray2[9].Replace("#|#", "\r\n");
                                                                }
                                                                else
                                                                {
                                                                    str15 = strArray2[9];
                                                                }
                                                                model.YHZCMC = str15;
                                                                flag3        = true;
                                                            }
                                                            if (!Flbm.IsDK() && strArray2[9].Trim().Contains("1.5%"))
                                                            {
                                                                model.YHZC   = "否";
                                                                model.YHZCMC = "";
                                                            }
                                                        }
                                                    }
                                                }
                                                if (!flag3)
                                                {
                                                    model.YHZC   = "否";
                                                    model.YHZCMC = "";
                                                }
                                            }
                                            else if (str13.Trim() == "否")
                                            {
                                                model.YHZC   = "否";
                                                model.YHZCMC = "";
                                            }
                                            else
                                            {
                                                model.YHZC   = "否";
                                                model.YHZCMC = "";
                                            }
                                        }
                                    }
                                    else
                                    {
                                        model.YHZC   = "否";
                                        model.YHZCMC = "";
                                    }
                                }
                            }
                        }
                    }
                    while (stack.Count > 0)
                    {
                        flag2 = false;
                        if (model.BM.Length > stack.Peek().BM.Length)
                        {
                            if (!model.BM.StartsWith(stack.Peek().BM))
                            {
                                goto Label_07AE;
                            }
                            model.SJBM = stack.Peek().BM;
                            if (stack.Peek().Result == ResultType.Invalid)
                            {
                                str7 = "无效";
                                str8 = "上级编码无效";
                                none = ResultType.Invalid;
                                result.Invalid++;
                            }
                            else if (stack.Peek().Result == ResultType.Failed)
                            {
                                str7 = "失败";
                                str8 = "上级编码失败";
                                none = ResultType.Failed;
                                result.Failed++;
                            }
                            else
                            {
                                if (stack.Peek().Result != ResultType.Duplicated)
                                {
                                    goto Label_07AE;
                                }
                                str5 = this.TuiJianBM(stack.Peek().BM);
                                if (model.BM.Length == str5.Length)
                                {
                                    goto Label_07AE;
                                }
                                str7 = "无效";
                                str8 = "编码长度必须与原有同级编码长度一致";
                                result.Invalid++;
                                none = ResultType.Invalid;
                            }
                            goto Label_0940;
                        }
                        stack.Pop();
                    }
                    flag2 = true;
Label_07AE:
                    if ((flag2 && (str4 != "001")) && (model.BM.Length != str4.Length))
                    {
                        str7 = "无效";
                        str8 = "编码长度必须与原有同级编码长度一致";
                        result.Invalid++;
                        none = ResultType.Invalid;
                    }
                    else if ("0" != this.CheckCustomer(model))
                    {
                        str7 = "无效";
                        str8 = "编码或名称为空";
                        result.Invalid++;
                        none = ResultType.Invalid;
                    }
                    else if (!Regex.IsMatch(model.BM, "^[0-9a-z]{1,16}$"))
                    {
                        str7 = "无效";
                        str8 = "编码需小于16位,且仅由数字和小写字母组成";
                        result.Invalid++;
                        none = ResultType.Invalid;
                    }
                    else if (this.bmclDAL.ExistCustomer(model))
                    {
                        if (str7.Length == 0)
                        {
                            str7 = "重复";
                            result.Duplicated++;
                        }
                        if (str8.Length == 0)
                        {
                            str8 = "编码重复";
                            none = ResultType.Duplicated;
                        }
                        else
                        {
                            str8 = str8 + "且编码重复";
                            none = ResultType.Invalid;
                        }
                    }
                    else
                    {
                        string[] spellCode = StringUtils.GetSpellCode(model.MC);
                        for (int j = 0; j < spellCode.Length; j++)
                        {
                            string text1 = spellCode[j];
                        }
                        if (this.bmclDAL.AddCustomer(model) == "0")
                        {
                            str7 = "正确传入";
                            result.Correct++;
                            none = ResultType.Correct;
                        }
                        else
                        {
                            str7 = "失败";
                            result.Failed++;
                            none = ResultType.Failed;
                        }
                    }
                    Label_0940 :;
                    result.DtResult.Rows.Add(new object[] { model.BM, model.MC, str7, str8 });
                    stack.Push(new lastBMJG(model.BM, none));
                }
                result.ImportTable = "车辆编码.DB";
                result2            = result;
            }
            catch
            {
                throw;
            }
            return(result2);
        }
예제 #13
0
파일: BMCL.cs 프로젝트: hkloudou/HX-Base
        public BMCL()
        {
            this.InitializeComponent();
            List <Dictionary <string, string> > list = new List <Dictionary <string, string> >();
            Dictionary <string, string>         item = new Dictionary <string, string>();

            item.Add("AisinoLBL", "编码");
            item.Add("Property", "BM");
            item.Add("Type", "Text");
            item.Add("Width", "60");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", "True");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "车辆类型");
            item.Add("Property", "MC");
            item.Add("Type", "Text");
            item.Add("Width", "200");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "简码");
            item.Add("Property", "JM");
            item.Add("Type", "Text");
            item.Add("Width", "60");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "上级编码");
            item.Add("Property", "SJBM");
            item.Add("Type", "Text");
            item.Add("Width", "60");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", "False");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "厂牌型号");
            item.Add("Property", "CPXH");
            item.Add("Type", "Text");
            item.Add("Width", "100");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "产地");
            item.Add("Property", "CD");
            item.Add("Type", "Text");
            item.Add("Width", "100");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "生产企业名称");
            item.Add("Property", "SCCJMC");
            item.Add("Type", "Text");
            item.Add("Width", "130");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "税收分类编码");
            item.Add("Property", "SPFL");
            item.Add("Type", "Text");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", Flbm.IsYM().ToString());
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "税收分类名称");
            item.Add("Property", "SPFLMC");
            item.Add("Type", "Text");
            item.Add("Align", "MiddleLeft");
            item.Add("Width", "200");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", Flbm.IsYM().ToString());
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "享受优惠政策");
            item.Add("Property", "YHZC");
            item.Add("Type", "Text");
            item.Add("Width", "100");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", Flbm.IsYM().ToString());
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "优惠政策类型");
            item.Add("Property", "YHZCMC");
            item.Add("Type", "Text");
            item.Add("Align", "MiddleLeft");
            item.Add("Width", "200");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", Flbm.IsYM().ToString());
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "快捷码");
            item.Add("Property", "KJM");
            item.Add("Type", "Text");
            item.Add("Width", "100");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", "False");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "文件性质");
            item.Add("Property", "WJ");
            item.Add("Type", "Text");
            item.Add("RowStyleField", "WJ");
            item.Add("Visible", "False");
            list.Add(item);
            base.aisinoDataGrid1.ColumeHead = list;
            if (Flbm.IsYM())
            {
                new BMSPFLManager().ChooseYHZCMCForCL();
            }
            base.log        = LogUtil.GetLogger <BMCL>();
            base.bllManager = this.clManager;
        }
예제 #14
0
        public BMSPSelect(string keyWord, double selectSlv, int showCanselect, string specialSP, string specialFlag = "")
        {
            this.SelectSlv     = selectSlv;
            this.HiKeyWord     = keyWord;
            this.ShowCanselect = showCanselect;
            this.SpecialSP     = specialSP;
            this.SpecialFlag   = specialFlag;
            this.Initialize();
            List <Dictionary <string, string> > list = new List <Dictionary <string, string> >();
            Dictionary <string, string>         item = new Dictionary <string, string>();

            item.Add("AisinoLBL", "编码");
            item.Add("Property", "BM");
            item.Add("Type", "Text");
            item.Add("Width", "60");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", "True");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "名称");
            item.Add("Property", "MC");
            item.Add("Type", "Text");
            item.Add("Width", "100");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "简码");
            item.Add("Property", "JM");
            item.Add("Type", "Text");
            item.Add("Width", "60");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "商品税目");
            item.Add("Property", "SPSM");
            item.Add("Type", "Text");
            item.Add("Width", "60");
            item.Add("Align", "MiddleRight");
            item.Add("HeadAlign", "MiddleCenter");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "税率");
            item.Add("Property", "SLV");
            item.Add("Type", "Text");
            item.Add("Width", "60");
            item.Add("Align", "MiddleRight");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", "False");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "税率");
            item.Add("Property", "SLVStr");
            item.Add("Type", "Text");
            item.Add("Width", "60");
            item.Add("Align", "MiddleRight");
            item.Add("HeadAlign", "MiddleCenter");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "规格型号");
            item.Add("Property", "GGXH");
            item.Add("Type", "Text");
            item.Add("Width", "60");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "计量单位");
            item.Add("Property", "JLDW");
            item.Add("Type", "Text");
            item.Add("Width", "60");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "快捷码");
            item.Add("Property", "KJM");
            item.Add("Type", "Text");
            item.Add("Visible", "False");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "上级编码");
            item.Add("Property", "SJBM");
            item.Add("Type", "Text");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", "False");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "单价");
            item.Add("Property", "DJ");
            item.Add("Type", "Text");
            item.Add("Width", "60");
            item.Add("Align", "MiddleRight");
            item.Add("HeadAlign", "MiddleCenter");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "单价Double");
            item.Add("Property", "DJStr");
            item.Add("Type", "Text");
            item.Add("Width", "60");
            item.Add("Align", "MiddleRight");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", "False");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "含税价标志");
            item.Add("Property", "HSJBZ");
            item.Add("Type", "Text");
            item.Add("Width", "80");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", "False");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "含税价标志");
            item.Add("Property", "HSJBZSTR");
            item.Add("Type", "Text");
            item.Add("Width", "80");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", "True");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "销售收入科目");
            item.Add("Property", "XSSRKM");
            item.Add("Type", "Text");
            item.Add("Width", "80");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", "False");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "应缴增值税科目");
            item.Add("Property", "YJZZSKM");
            item.Add("Type", "Text");
            item.Add("Width", "80");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", "False");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "销售退回科目");
            item.Add("Property", "XSTHKM");
            item.Add("Type", "Text");
            item.Add("Width", "80");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", "False");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "中外合作油气田");
            item.Add("Property", "HYSY");
            item.Add("Type", "Text");
            item.Add("Width", "80");
            item.Add("Visible", "False");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "Hash值");
            item.Add("Property", "XTHASH");
            item.Add("Type", "Text");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", "False");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "隐藏标志");
            item.Add("Property", "ISHIDE");
            item.Add("Type", "Text");
            item.Add("Width", "60");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", "False");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "隐藏标志");
            item.Add("Property", "ISHIDEBOOL");
            item.Add("Type", "ComboBox");
            DataTable table = new DataTable();

            table.Columns.Add("ISHIDE", Type.GetType("System.String"));
            DataRow row = table.NewRow();

            row["ISHIDE"] = "否";
            table.Rows.Add(row);
            DataRow row2 = table.NewRow();

            row2["ISHIDE"] = "是";
            table.Rows.Add(row2);
            this.aisinoDataGrid1.ComboBoxColumnDataSource.Add("IsHideSource", table);
            item.Add("DataSource", "IsHideSource");
            item.Add("DisplayMember", "ISHIDE");
            item.Add("ValueMember", "ISHIDE");
            item.Add("Width", "60");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", "True");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "稀土商品编码");
            item.Add("Property", "XTCODE");
            item.Add("Type", "Text");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", "False");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "税收分类编码");
            item.Add("Property", "SPFL");
            item.Add("Type", "Text");
            item.Add("Align", "MiddleLeft");
            item.Add("Width", "80");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", Flbm.IsYM().ToString());
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "税收分类名称");
            item.Add("Property", "SPFLMC");
            item.Add("Type", "Text");
            item.Add("Align", "MiddleLeft");
            item.Add("Width", "200");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", Flbm.IsYM().ToString());
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "享受优惠政策");
            item.Add("Property", "YHZC");
            item.Add("Type", "Text");
            item.Add("Width", "100");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", Flbm.IsYM().ToString());
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "优惠政策类型");
            item.Add("Property", "YHZCMC");
            item.Add("Type", "Text");
            item.Add("Align", "MiddleLeft");
            item.Add("Width", "200");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", Flbm.IsYM().ToString());
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "零税率标识");
            item.Add("Property", "LSLVBS");
            item.Add("Type", "Text");
            item.Add("Align", "MiddleLeft");
            item.Add("Width", "200");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", "False");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "SPZL是啥?");
            item.Add("Property", "SPZL");
            item.Add("Type", "Text");
            item.Add("Width", "100");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", "False");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "SPSX是啥?");
            item.Add("Property", "SPSX");
            item.Add("Type", "Text");
            item.Add("Width", "100");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", "False");
            list.Add(item);
            item = new Dictionary <string, string>();
            item.Add("AisinoLBL", "文件性质");
            item.Add("Property", "WJ");
            item.Add("Type", "Text");
            item.Add("RowStyleField", "WJ");
            item.Add("Align", "MiddleLeft");
            item.Add("HeadAlign", "MiddleCenter");
            item.Add("Visible", "False");
            list.Add(item);
            this.aisinoDataGrid1.ColumeHead       = list;
            this.aisinoDataGrid1.MultiSelect      = false;
            this.aisinoDataGrid1.AborCellPainting = true;
            this.aisinoDataGrid1.ReadOnly         = true;
            this.aisinoDataGrid1.DataGrid.AllowUserToDeleteRows = false;
            this.treeViewBM1.ReadOnly       = true;
            this.treeViewBM1.RootNodeString = "商品编码";
            this.treeViewBM1.getListNodes  += new TreeViewBM.GetListNodes(this.treeViewBM1_getListNodes);
            this.treeViewBM1.TreeLoad();
        }