Exemple #1
0
        private void aisinoDataGrid1_DataGridCellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
        {
            switch (this.aisinoDataGrid1.get_Columns()[e.ColumnIndex].Name)
            {
            case "KPZT":
                e.Value = ShowString.ShowKPZT(e.Value.ToString());
                break;

            case "DJZT":
                e.Value = ShowString.ShowDJZT(e.Value.ToString());
                break;

            case "DJZL":
                e.Value = ShowString.ShowFPZL(e.Value.ToString());
                break;

            case "SFZJY":
                e.Value = ShowString.ShowBool(e.Value.ToString());
                break;

            case "HYSY":
                e.Value = ShowString.ShowBool(e.Value.ToString());
                break;

            case "HSJBZ":
                e.Value = ShowString.ShowBool(e.Value.ToString());
                break;
            }
        }
Exemple #2
0
        private void aisinoDataGrid1_DataGridCellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
        {
            string name = this.aisinoDataGrid1.get_Columns()[e.ColumnIndex].Name;

            if (name != null)
            {
                if (!(name == "KPZT"))
                {
                    if (name == "DJZT")
                    {
                        e.Value = ShowString.ShowDJZT(e.Value.ToString());
                    }
                    else if (name == "DJZL")
                    {
                        e.Value = ShowString.ShowFPZL(e.Value.ToString());
                    }
                    else if (name == "SFZJY")
                    {
                        e.Value = ShowString.ShowBool(e.Value.ToString());
                    }
                    else if (name == "HYSY")
                    {
                        e.Value = ShowString.ShowBool(e.Value.ToString());
                    }
                }
                else
                {
                    e.Value = ShowString.ShowKPZT(e.Value.ToString());
                }
            }
        }
Exemple #3
0
        private void AutoSplitView_Load(object sender, EventArgs e)
        {
            this.dgvOriginalHead.Columns.Clear();
            this.dgvOriginalHead.ColumnCount     = 5;
            this.dgvOriginalHead.Columns[0].Name = "单据号";
            this.dgvOriginalHead.Columns[1].Name = "单据种类";
            this.dgvOriginalHead.Columns[2].Name = "购方名称";
            this.dgvOriginalHead.Columns[3].Name = "购方税号";
            this.dgvOriginalHead.Columns[4].Name = "金额合计";
            string str = ShowString.ShowFPZL(this.bill.DJZL);

            this.dgvOriginalHead.Rows.Add(new object[] { this.bill.BH, str, this.bill.GFMC, this.bill.GFSH, this.bill.JEHJ });
            this.dgvOriginalHead.Columns[4].DefaultCellStyle = this.dgvOriginalHead.styleMoney;
            this.dgvOriginalHead.ClearSelection();
        }
Exemple #4
0
        private void DanJuBeforeCF()
        {
            this.dataGridMX1.Columns.Clear();
            this.dataGridMX1.ColumnCount     = 5;
            this.dataGridMX1.Columns[0].Name = "单据号";
            this.dataGridMX1.Columns[1].Name = "单据种类";
            this.dataGridMX1.Columns[2].Name = "购方名称";
            this.dataGridMX1.Columns[3].Name = "购方税号";
            this.dataGridMX1.Columns[4].Name = "金额合计";
            string str = ShowString.ShowFPZL(this.bill.DJZL);

            this.dataGridMX1.Rows.Add(new object[] { this.bill.BH, str, this.bill.GFMC, this.bill.GFSH, this.bill.JEHJ });
            this.dataGridMX1.Columns[4].DefaultCellStyle = this.dataGridMX1.styleMoney;
            this.dataGridMX1.ClearSelection();
        }
Exemple #5
0
 public GenerateFP(InvType typeFP)
 {
     this.log        = LogUtil.GetLogger <GenerateFP>();
     this.fptkBLL    = new FPTKdal();
     this.billBL     = SaleBillCtrl.Instance;
     this.generBL    = GenerateInvoice.Instance;
     this.taxCard    = TaxCardFactory.CreateTaxCard();
     this.IsNewJDC   = false;
     this.NPCType    = 0;
     this.components = null;
     this.FPleftnum  = 0;
     this.Initialize();
     base.StartPosition  = FormStartPosition.CenterScreen;
     this.fpType         = typeFP;
     this.FPType_Card    = (InvoiceType)this.fpType;
     this.djType         = CommonTool.GetInvTypeStr(typeFP);
     this.lableFPZL.Text = ShowString.ShowFPZL(this.djType);
     this.FPleftnum      = (int)this.taxCard.GetInvNumber(this.FPType_Card);
 }
Exemple #6
0
 private void DJHBYL_Load(object sender, EventArgs e)
 {
     try
     {
         int num;
         List <Dictionary <string, string> > list = new List <Dictionary <string, string> >();
         Dictionary <string, string>         item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "序号");
         item.Add("Property", "XH");
         item.Add("Type", "Text");
         list.Add(item);
         item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "商品名称");
         item.Add("Property", "SPMC");
         item.Add("Type", "Text");
         item.Add("Width", "120");
         item.Add("Align", "MiddleLeft");
         item.Add("HeadAlign", "MiddleLeft");
         list.Add(item);
         item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "规格型号");
         item.Add("Property", "GGXH");
         item.Add("Type", "Text");
         item.Add("Width", "100");
         item.Add("Align", "MiddleLeft");
         item.Add("HeadAlign", "MiddleLeft");
         list.Add(item);
         item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "数量");
         item.Add("Property", "SL");
         item.Add("Type", "Text");
         item.Add("Width", "60");
         item.Add("Align", "MiddleRight");
         item.Add("HeadAlign", "MiddleRight");
         list.Add(item);
         item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "单价");
         item.Add("Property", "DJ");
         item.Add("Type", "Text");
         item.Add("Width", "80");
         item.Add("Align", "MiddleRight");
         item.Add("HeadAlign", "MiddleRight");
         list.Add(item);
         item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "金额");
         item.Add("Property", "JE");
         item.Add("Type", "Text");
         item.Add("Width", "100");
         item.Add("Align", "MiddleRight");
         item.Add("HeadAlign", "MiddleRight");
         list.Add(item);
         item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "税率");
         item.Add("Property", "SLV");
         item.Add("Type", "Text");
         item.Add("Width", "50");
         item.Add("Align", "MiddleLeft");
         item.Add("HeadAlign", "MiddleLeft");
         list.Add(item);
         item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "税额");
         item.Add("Property", "SE");
         item.Add("Type", "Text");
         item.Add("Width", "100");
         item.Add("Align", "MiddleRight");
         item.Add("HeadAlign", "MiddleRight");
         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", "MiddleLeft");
         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", "MiddleLeft");
         list.Add(item);
         item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "单据行性质");
         item.Add("Property", "DJHXZ");
         item.Add("Type", "Text");
         item.Add("RowStyleField", "DJHXZ");
         item.Add("Visible", "False");
         list.Add(item);
         this.aisinoDataGridq.set_ColumeHead(list);
         this.aisinoDataGridq.get_Columns()["JE"].DefaultCellStyle.Format = "0.00";
         this.aisinoDataGridq.get_Columns()["SE"].DefaultCellStyle.Format = "0.00";
         this.aisinoDataGridq.set_DataSource(new AisinoDataSet());
         this.dataGridMXDJHBQ.Columns.Clear();
         this.dataGridMXDJHBQ.get_NewColumns().Add("单据号;BH");
         this.dataGridMXDJHBQ.get_NewColumns().Add("单据种类;DJZL;;80");
         this.dataGridMXDJHBQ.get_NewColumns().Add("购方名称;GFMC;;130");
         this.dataGridMXDJHBQ.get_NewColumns().Add("购方税号;GFSH;;100");
         this.dataGridMXDJHBQ.get_NewColumns().Add("金额合计;JEHJ;;100;money");
         this.dataGridMXDJHBQ.get_NewColumns().Add("单据日期;DJRQ;;100");
         this.dataGridMXDJHBQ.get_NewColumns().Add("备注;BZ;;80");
         this.dataGridMXDJHBQ.Bind();
         for (num = 0; num < this.listBill.Count; num++)
         {
             this.dataGridMXDJHBQ.Rows.Add(new object[] { this.listBill[num].BH, ShowString.ShowFPZL(this.listBill[num].DJZL), this.listBill[num].GFMC, this.listBill[num].GFSH, this.listBill[num].JEHJ, this.listBill[num].DJRQ, this.listBill[num].BZ });
         }
         this.dataGridMXDJHBQ.Columns["DJRQ"].DefaultCellStyle.Format = "yyyy-MM-dd";
         this.dataGridMXDJHBH.Columns.Clear();
         this.dataGridMXDJHBH.get_NewColumns().Add("单据号;BH");
         this.dataGridMXDJHBH.get_NewColumns().Add("单据种类;DJZL");
         this.dataGridMXDJHBH.get_NewColumns().Add("购方名称;GFMC;;130");
         this.dataGridMXDJHBH.get_NewColumns().Add("购方税号;GFSH;;130");
         this.dataGridMXDJHBH.get_NewColumns().Add("金额合计;JEHJ;;100;money");
         this.dataGridMXDJHBH.get_NewColumns().Add("单据日期;DJRQ");
         this.dataGridMXDJHBH.get_NewColumns().Add("备注;BZ;;150");
         this.dataGridMXDJHBH.Bind();
         this.dataGridMXDJHBH.Rows.Add(new object[] { this.mergedBill.BH, ShowString.ShowFPZL(this.mergedBill.DJZL), this.mergedBill.GFMC, this.mergedBill.GFSH, this.mergedBill.JEHJ, this.mergedBill.DJRQ, this.mergedBill.BZ });
         this.dataGridMXDJHBH.Columns["DJRQ"].DefaultCellStyle.Format = "yyyy-MM-dd";
         list = new List <Dictionary <string, string> >();
         item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "序号");
         item.Add("Property", "XH");
         item.Add("Type", "Text");
         list.Add(item);
         item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "商品名称");
         item.Add("Property", "SPMC");
         item.Add("Type", "Text");
         item.Add("Width", "120");
         item.Add("Align", "MiddleLeft");
         item.Add("HeadAlign", "MiddleLeft");
         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", "MiddleLeft");
         list.Add(item);
         item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "数量");
         item.Add("Property", "SL");
         item.Add("Type", "Text");
         item.Add("Width", "80");
         item.Add("Align", "MiddleRight");
         item.Add("HeadAlign", "MiddleRight");
         list.Add(item);
         item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "单价");
         item.Add("Property", "DJ");
         item.Add("Type", "Text");
         item.Add("Width", "100");
         item.Add("Align", "MiddleRight");
         item.Add("HeadAlign", "MiddleRight");
         list.Add(item);
         item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "金额");
         item.Add("Property", "JE");
         item.Add("Type", "Text");
         item.Add("Width", "100");
         item.Add("Align", "MiddleRight");
         item.Add("HeadAlign", "MiddleRight");
         list.Add(item);
         item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "税率");
         item.Add("Property", "SLV");
         item.Add("Type", "Text");
         item.Add("Width", "50");
         item.Add("Align", "MiddleLeft");
         item.Add("HeadAlign", "MiddleLeft");
         list.Add(item);
         item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "税额");
         item.Add("Property", "SE");
         item.Add("Type", "Text");
         item.Add("Width", "100");
         item.Add("Align", "MiddleRight");
         item.Add("HeadAlign", "MiddleRight");
         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", "MiddleLeft");
         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", "MiddleLeft");
         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", "MiddleLeft");
         item.Add("HeadAlign", "MiddleLeft");
         list.Add(item);
         item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "单据行性质");
         item.Add("Property", "DJHXZ");
         item.Add("Type", "Text");
         item.Add("RowStyleField", "DJHXZ");
         item.Add("Visible", "False");
         list.Add(item);
         this.aisinoDataGridh.set_ColumeHead(list);
         this.aisinoDataGridh.get_Columns()["JE"].DefaultCellStyle.Format = "0.00";
         this.aisinoDataGridh.get_Columns()["SE"].DefaultCellStyle.Format = "0.00";
         this.aisinoDataGridh.set_DataSource(new AisinoDataSet());
         string s      = PropertyUtil.GetValue("WBJK_DJHB_DATAGRID_HBMX");
         int    result = 1;
         int.TryParse(s, out result);
         this.aisinoDataGridh.set_DataSource(this.djhbBLL.GetMingXi(20, result));
         this.dataGridMXDJHBH.SelectionMode = DataGridViewSelectionMode.CellSelect;
         this.dataGridMXDJHBQ.SelectionMode = DataGridViewSelectionMode.CellSelect;
         this.aisinoDataGridq.set_SelectionMode(DataGridViewSelectionMode.CellSelect);
         this.aisinoDataGridh.set_SelectionMode(DataGridViewSelectionMode.CellSelect);
         int count = this.aisinoDataGridh.get_Rows().Count;
         for (num = 0; num < count; num++)
         {
             string str2 = this.aisinoDataGridh.get_Rows()[num].Cells["SLV"].Value.ToString();
             string str3 = this.aisinoDataGridh.get_Rows()[num].Cells["XH"].Value.ToString();
             if (((str2 != null) && (str2 != "")) && (str2 != "中外合作油气田"))
             {
                 string str4 = this.billBL.ShowSLV(this.mergedBill, str3, str2);
                 if (str4 != "")
                 {
                     this.aisinoDataGridh.get_Rows()[num].Cells["SLV"].Value = str4;
                 }
             }
         }
     }
     catch (Exception exception)
     {
         HandleException.HandleError(exception);
     }
 }