コード例 #1
0
        protected override bool SetValid()
        {
            bool      flag    = RegisterManager.CheckRegFile("DKST");
            FpManager manager = new FpManager();

            return((((int)TaxCardFactory.CreateTaxCard().TaxMode == 2) && manager.IsSWDK()) & flag);
        }
コード例 #2
0
 private bool CheckData()
 {
     if (!RegisterManager.CheckRegFile("JS"))
     {
         MessageManager.ShowMsgBox("INP-111001", "提示", new string[] { "注册文件校验失败!" });
         return(false);
     }
     return(true);
 }
コード例 #3
0
        protected override bool SetValid()
        {
            TaxCard card = TaxCardFactory.CreateTaxCard();

            try
            {
                RegFlag_JT = RegisterManager.CheckRegFile("JIJT");
                RegFlag_JS = RegisterManager.CheckRegFile("JIJS");
                RegFlag_ST = RegisterManager.CheckRegFile("JIST");
                RegFlag_KT = RegisterManager.CheckRegFile("JIKT");
                return((card.get_TaxMode() == 2) && (((RegFlag_JT || RegFlag_JS) || RegFlag_ST) || RegFlag_KT));
            }
            catch (BaseException exception)
            {
                ExceptionHandler.HandleError(exception);
            }
            catch (Exception exception2)
            {
                ExceptionHandler.HandleError(exception2);
            }
            return(true);
        }
コード例 #4
0
 public Class85()
 {
     this.dateTime_0 = new DateTime(0x76c, 1, 1);
     this.list_0     = new List <XmlDocument>();
     this.list_1     = new List <XmlDocument>();
     this.list_2     = new List <XmlDocument>();
     this.list_3     = new List <XmlDocument>();
     this.list_4     = new List <XmlDocument>();
     this.dateTime_1 = new DateTime(0x76c, 1, 1);
     this.class90_0  = new Class90();
     this.class84_0  = new Class84();
     this.class100_0 = new Class100();
     this.class81_0  = new Class81();
     try
     {
         this.dateTime_1 = DateTime.Now;
         this.bool_1     = RegisterManager.CheckRegFile("JI");
     }
     catch
     {
     }
 }
コード例 #5
0
 internal void method_1(Fpxx fpxx_0)
 {
     if (RegisterManager.CheckRegFile("JCST") || RegisterManager.CheckRegFile("JCJS"))
     {
         string str12    = PropertyUtil.GetValue("MAIN_PATH");
         string xfsh     = fpxx_0.xfsh;
         string fpdm     = fpxx_0.fpdm;
         string fphm     = fpxx_0.fphm;
         string str16    = xfsh + "_" + fpdm + "_" + fphm + ".xml";
         string path     = str12 + @"\OutPutFile\" + str16;
         string filename = str12 + @"\OutPutFile\JdcBZGSFile\" + str16;
         path.Remove(path.LastIndexOf(@"\"));
         string str10 = filename.Remove(filename.LastIndexOf(@"\"));
         if (!Directory.Exists(str10))
         {
             Directory.CreateDirectory(str10);
         }
         double num  = Convert.ToDouble(fpxx_0.je);
         double num2 = Convert.ToDouble(fpxx_0.se);
         string str3 = (num + num2).ToString("F2");
         string kprq = fpxx_0.kprq;
         string str4 = "";
         string str5 = "";
         if ((kprq != null) && (kprq.Length >= 0x13))
         {
             str4 = kprq.Substring(0, 10);
             str5 = kprq.Substring(11, 8);
         }
         XmlDocument    document2 = new XmlDocument();
         XmlDeclaration newChild  = document2.CreateXmlDeclaration("1.0", "GBK", null);
         document2.AppendChild(newChild);
         XmlElement element50 = document2.CreateElement("business");
         document2.AppendChild(element50);
         XmlElement element2 = document2.CreateElement("body");
         element50.AppendChild(element2);
         XmlElement element51 = document2.CreateElement("fplx");
         element51.InnerText = "1";
         element2.AppendChild(element51);
         XmlElement element52 = document2.CreateElement("fpdm");
         element52.InnerText = fpxx_0.fpdm;
         element2.AppendChild(element52);
         XmlElement element53 = document2.CreateElement("fphm");
         element53.InnerText = fpxx_0.fphm;
         element2.AppendChild(element53);
         XmlElement element54 = document2.CreateElement("zfbz");
         element54.InnerText = fpxx_0.zfbz ? "1" : "0";
         element2.AppendChild(element54);
         XmlElement element55 = document2.CreateElement("kprq");
         element55.InnerText = str4;
         element2.AppendChild(element55);
         XmlElement element56 = document2.CreateElement("ghdw");
         element56.InnerText = fpxx_0.gfmc;
         element2.AppendChild(element56);
         XmlElement element57 = document2.CreateElement("gfsbh");
         element57.InnerText = "";
         element2.AppendChild(element57);
         XmlElement element58 = document2.CreateElement("sfzhm");
         element58.InnerText = fpxx_0.sfzhm;
         element2.AppendChild(element58);
         XmlElement element59 = document2.CreateElement("scqymc");
         element59.InnerText = fpxx_0.sccjmc;
         element2.AppendChild(element59);
         XmlElement element60 = document2.CreateElement("cllx");
         element60.InnerText = fpxx_0.cllx;
         element2.AppendChild(element60);
         XmlElement element61 = document2.CreateElement("cpxh");
         element61.InnerText = fpxx_0.cpxh;
         element2.AppendChild(element61);
         XmlElement element62 = document2.CreateElement("cd");
         element62.InnerText = fpxx_0.cd;
         element2.AppendChild(element62);
         XmlElement element63 = document2.CreateElement("hgzh");
         element63.InnerText = fpxx_0.hgzh;
         element2.AppendChild(element63);
         XmlElement element64 = document2.CreateElement("jkzmsh");
         element64.InnerText = fpxx_0.jkzmsh;
         element2.AppendChild(element64);
         XmlElement element65 = document2.CreateElement("sjdh");
         element65.InnerText = fpxx_0.sjdh;
         element2.AppendChild(element65);
         XmlElement element66 = document2.CreateElement("fdjhm");
         element66.InnerText = fpxx_0.fdjhm;
         element2.AppendChild(element66);
         XmlElement element67 = document2.CreateElement("cjhm");
         element67.InnerText = fpxx_0.clsbdh;
         element2.AppendChild(element67);
         XmlElement element68 = document2.CreateElement("je");
         element68.InnerText = fpxx_0.je;
         element2.AppendChild(element68);
         XmlElement element69 = document2.CreateElement("sl");
         element69.InnerText = fpxx_0.sLv;
         element2.AppendChild(element69);
         XmlElement element70 = document2.CreateElement("se");
         element70.InnerText = fpxx_0.se;
         element2.AppendChild(element70);
         XmlElement element71 = document2.CreateElement("jshj");
         element71.InnerText = str3;
         element2.AppendChild(element71);
         XmlElement element72 = document2.CreateElement("xfmc");
         element72.InnerText = fpxx_0.xfmc;
         element2.AppendChild(element72);
         XmlElement element73 = document2.CreateElement("xfsh");
         element73.InnerText = fpxx_0.xfsh;
         element2.AppendChild(element73);
         XmlElement element74 = document2.CreateElement("xfdz");
         element74.InnerText = fpxx_0.xfdz;
         element2.AppendChild(element74);
         XmlElement element75 = document2.CreateElement("xfdh");
         element75.InnerText = fpxx_0.xfdh;
         element2.AppendChild(element75);
         XmlElement element76 = document2.CreateElement("jxsswjgdm");
         element76.InnerText = fpxx_0.zgswjgdm;
         element2.AppendChild(element76);
         XmlElement element = document2.CreateElement("dw");
         if ((fpxx_0.dw != null) && (fpxx_0.dw.Length > 0))
         {
             element.InnerText = fpxx_0.dw;
         }
         element2.AppendChild(element);
         if (RegisterManager.CheckRegFile("JCJS"))
         {
             string str9  = "";
             byte[] bytes = ToolUtil.GetBytes(document2.InnerXml.ToString());
             if ((bytes != null) && (bytes.Length > 0))
             {
                 str9 = Convert.ToBase64String(bytes);
             }
             string[] contents = new string[] { str9 };
             File.WriteAllLines(path, contents, Encoding.Unicode);
         }
         string zfsj  = fpxx_0.zfsj;
         string str17 = "";
         string str18 = "";
         if ((zfsj != null) && (zfsj.Length >= 0x13))
         {
             str17 = zfsj.Substring(0, 10);
             str18 = zfsj.Substring(11, 8);
         }
         string str8 = "0";
         if (fpxx_0.zfbz)
         {
             str8 = "1";
         }
         else if (num < 0.0)
         {
             str8 = "2";
         }
         XmlDocument    document    = new XmlDocument();
         XmlDeclaration declaration = document.CreateXmlDeclaration("1.0", "GBK", null);
         document.AppendChild(declaration);
         XmlElement element8 = document.CreateElement("taxML");
         document.AppendChild(element8);
         XmlElement element3 = document.CreateElement("jdcxsfpMxxx");
         element8.AppendChild(element3);
         XmlElement element9 = document.CreateElement("fpdm");
         element9.InnerText = fpxx_0.fpdm;
         element3.AppendChild(element9);
         XmlElement element10 = document.CreateElement("fphm");
         element10.InnerText = fpxx_0.fphm;
         element3.AppendChild(element10);
         XmlElement element11 = document.CreateElement("jqbh");
         element11.InnerText = fpxx_0.jqbh;
         element3.AppendChild(element11);
         XmlElement element12 = document.CreateElement("kprq");
         element12.InnerText = str4;
         element3.AppendChild(element12);
         XmlElement element13 = document.CreateElement("kpsj");
         element13.InnerText = str5;
         element3.AppendChild(element13);
         XmlElement element14 = document.CreateElement("skm");
         element14.InnerText = "";
         element3.AppendChild(element14);
         XmlElement element15 = document.CreateElement("ghdw");
         element15.InnerText = fpxx_0.gfmc;
         element3.AppendChild(element15);
         XmlElement element16 = document.CreateElement("ghdwdm");
         element16.InnerText = "";
         element3.AppendChild(element16);
         XmlElement element17 = document.CreateElement("sfzhm");
         element17.InnerText = fpxx_0.sfzhm;
         element3.AppendChild(element17);
         XmlElement element18 = document.CreateElement("scqymc");
         element18.InnerText = fpxx_0.sccjmc;
         element3.AppendChild(element18);
         XmlElement element19 = document.CreateElement("cllx");
         element19.InnerText = fpxx_0.cllx;
         element3.AppendChild(element19);
         XmlElement element20 = document.CreateElement("cpxh");
         element20.InnerText = fpxx_0.cpxh;
         element3.AppendChild(element20);
         XmlElement element21 = document.CreateElement("cd");
         element21.InnerText = fpxx_0.cd;
         element3.AppendChild(element21);
         XmlElement element22 = document.CreateElement("hgzs");
         element22.InnerText = fpxx_0.hgzh;
         element3.AppendChild(element22);
         XmlElement element23 = document.CreateElement("jkzmsh");
         element23.InnerText = fpxx_0.jkzmsh;
         element3.AppendChild(element23);
         XmlElement element24 = document.CreateElement("sjdh");
         element24.InnerText = fpxx_0.sjdh;
         element3.AppendChild(element24);
         XmlElement element25 = document.CreateElement("fdjhm");
         element25.InnerText = fpxx_0.fdjhm;
         element3.AppendChild(element25);
         XmlElement element26 = document.CreateElement("clsbdh");
         element26.InnerText = fpxx_0.clsbdh;
         element3.AppendChild(element26);
         XmlElement element27 = document.CreateElement("jshj");
         element27.InnerText = str3;
         element3.AppendChild(element27);
         XmlElement element28 = document.CreateElement("xhdwmc");
         element28.InnerText = fpxx_0.xfmc;
         element3.AppendChild(element28);
         XmlElement element29 = document.CreateElement("nsrsbh");
         element29.InnerText = fpxx_0.xfsh;
         element3.AppendChild(element29);
         XmlElement element30 = document.CreateElement("dh");
         element30.InnerText = fpxx_0.xfdh;
         element3.AppendChild(element30);
         XmlElement element31 = document.CreateElement("zh");
         element31.InnerText = fpxx_0.xfzh;
         element3.AppendChild(element31);
         XmlElement element32 = document.CreateElement("dz");
         element32.InnerText = fpxx_0.xfdz;
         element3.AppendChild(element32);
         XmlElement element33 = document.CreateElement("khyh");
         element33.InnerText = fpxx_0.xfyh;
         element3.AppendChild(element33);
         XmlElement element34 = document.CreateElement("zzssl");
         element34.InnerText = fpxx_0.sLv;
         element3.AppendChild(element34);
         XmlElement element35 = document.CreateElement("zzsse");
         element35.InnerText = fpxx_0.se;
         element3.AppendChild(element35);
         XmlElement element36 = document.CreateElement("dkdw_mc");
         element36.InnerText = "";
         element3.AppendChild(element36);
         XmlElement element37 = document.CreateElement("dkdw_dm");
         element37.InnerText = "";
         element3.AppendChild(element37);
         XmlElement element38 = document.CreateElement("zgswjg_mc");
         element38.InnerText = fpxx_0.zgswjgmc;
         element3.AppendChild(element38);
         XmlElement element39 = document.CreateElement("zgswjg_dm");
         element39.InnerText = fpxx_0.zgswjgdm;
         element3.AppendChild(element39);
         XmlElement element40 = document.CreateElement("bhsj");
         element40.InnerText = fpxx_0.je;
         element3.AppendChild(element40);
         XmlElement element41 = document.CreateElement("dw");
         element41.InnerText = fpxx_0.dw;
         element3.AppendChild(element41);
         XmlElement element42 = document.CreateElement("xcrs");
         element42.InnerText = fpxx_0.xcrs;
         element3.AppendChild(element42);
         XmlElement element43 = document.CreateElement("bz");
         element43.InnerText = "一车一票";
         element3.AppendChild(element43);
         XmlElement element44 = document.CreateElement("kpr");
         element44.InnerText = fpxx_0.kpr;
         element3.AppendChild(element44);
         XmlElement element45 = document.CreateElement("kplx");
         element45.InnerText = "1";
         element3.AppendChild(element45);
         XmlElement element46 = document.CreateElement("dkbz");
         element46.InnerText = "0";
         element3.AppendChild(element46);
         XmlElement element47 = document.CreateElement("fpbz");
         element47.InnerText = str8;
         element3.AppendChild(element47);
         XmlElement element48 = document.CreateElement("zfrq");
         element48.InnerText = str17;
         element3.AppendChild(element48);
         XmlElement element49 = document.CreateElement("zfsj");
         element49.InnerText = str18;
         element3.AppendChild(element49);
         XmlElement element4 = document.CreateElement("zfr");
         element4.InnerText = fpxx_0.zfbz ? UserInfo.Yhmc : "";
         element3.AppendChild(element4);
         XmlElement element5 = document.CreateElement("tpdm");
         element5.InnerText = fpxx_0.blueFpdm;
         element3.AppendChild(element5);
         XmlElement element6 = document.CreateElement("tphm");
         element6.InnerText = fpxx_0.blueFphm;
         element3.AppendChild(element6);
         XmlElement element7 = document.CreateElement("lgrq");
         element7.InnerText = "";
         element3.AppendChild(element7);
         if (RegisterManager.CheckRegFile("JCST"))
         {
             TaxCard card    = TaxCardFactory.CreateTaxCard();
             byte[]  buffer2 = ToolUtil.GetBytes(fpxx_0.xfsh + card.Machine.ToString());
             document.Save(filename);
             byte[] buffer3 = ToolUtil.GetBytes(filename);
             byte[] buffer4 = new byte[0x400];
             byte[] buffer5 = new byte[100];
             EncodeFile(buffer3, buffer2, buffer4, buffer5);
             File.Delete(filename);
         }
     }
 }
コード例 #6
0
ファイル: DanJuTxtCR.cs プロジェクト: SoL-Alucard-Git/HX-Base
        private void DanJuTxtCR_Load(object sender, EventArgs e)
        {
            try
            {
                TaxCard card = TaxCardFactory.CreateTaxCard();
                bool    flag = false;
                if (PropValue.TxtInvType == "Special")
                {
                    if (!card.get_QYLX().ISZYFP)
                    {
                        flag = true;
                    }
                }
                else if (PropValue.TxtInvType == "Common")
                {
                    if (!card.get_QYLX().ISPTFP)
                    {
                        flag = true;
                    }
                }
                else if (PropValue.TxtInvType == "transportation")
                {
                    if (!card.get_QYLX().ISHY)
                    {
                        flag = true;
                    }
                }
                else if ((PropValue.TxtInvType == "vehiclesales") && !card.get_QYLX().ISJDC)
                {
                    flag = true;
                }
                if (flag)
                {
                    if (card.get_QYLX().ISPTFP)
                    {
                        PropValue.TxtInvType = "Common";
                    }
                    else if (card.get_QYLX().ISZYFP)
                    {
                        PropValue.TxtInvType = "Special";
                    }
                    else if (card.get_QYLX().ISHY)
                    {
                        PropValue.TxtInvType = "transportation";
                    }
                    else if (card.get_QYLX().ISJDC)
                    {
                        PropValue.TxtInvType = "vehiclesales";
                    }
                }
                this.fileControl1.set_FileFilter(FatchSaleBill.FileFilterTxt);
                this.fileControl1.get_TextBoxFile().Text = PropValue.TxtPath;
                this.comboBoxJESM.SelectedValue          = PropValue.TxtAmountType;
                this.radioBtnZYFP.Checked  = PropValue.TxtInvType == "Special";
                this.radioBtnPTFP.Checked  = PropValue.TxtInvType == "Common";
                this.radioBtnHYFP.Checked  = PropValue.TxtInvType == "transportation";
                this.radioBtnJDCFP.Checked = PropValue.TxtInvType == "vehiclesales";
                this.radioBtnPTFP.Visible  = false;
                this.radioBtnZYFP.Visible  = false;
                this.radioBtnHYFP.Visible  = false;
                this.radioBtnJDCFP.Visible = false;
                int num = 0;
                if (card.get_QYLX().ISZYFP)
                {
                    this.radioBtnZYFP.Visible = true;
                    num++;
                }
                if (card.get_QYLX().ISPTFP)
                {
                    this.radioBtnPTFP.Visible = true;
                    if (num == 0)
                    {
                        this.radioBtnPTFP.Location = new Point(8, 20);
                    }
                    num++;
                }
                if (card.get_QYLX().ISHY)
                {
                    this.radioBtnHYFP.Visible = true;
                    if (num == 0)
                    {
                        this.radioBtnHYFP.Location = new Point(8, 20);
                    }
                    else if (num == 1)
                    {
                        this.radioBtnHYFP.Location = new Point(8, 50);
                    }
                    num++;
                }
                if (card.get_QYLX().ISJDC)
                {
                    this.radioBtnJDCFP.Visible = true;
                    switch (num)
                    {
                    case 0:
                        this.radioBtnJDCFP.Location = new Point(8, 20);
                        break;

                    case 1:
                        this.radioBtnJDCFP.Location = new Point(8, 50);
                        break;

                    case 2:
                        this.radioBtnJDCFP.Location = new Point(120, 20);
                        break;
                    }
                }
                if (this.radioBtnJDCFP.Checked)
                {
                    this.comboBoxJESM.SelectedIndex = 0;
                    this.comboBoxJESM.Enabled       = false;
                }
                if (RegisterManager.CheckRegFile("JIJS"))
                {
                    this.radioBtnPTFP.Visible  = false;
                    this.radioBtnHYFP.Visible  = false;
                    this.radioBtnJDCFP.Visible = false;
                    this.radioBtnZYFP.Checked  = true;
                }
            }
            catch (Exception exception)
            {
                HandleException.HandleError(exception);
            }
        }
コード例 #7
0
ファイル: XSDJLR.cs プロジェクト: SoL-Alucard-Git/HX-Base
 private void XSDJLR_Load(object sender, EventArgs e)
 {
     try
     {
         if (this.UseYear)
         {
             this.comboBoxDJZL.SelectedIndexChanged -= new EventHandler(this.comboBoxDJZL_SelectedIndexChanged);
         }
         this.comboBoxYF.Items.AddRange(this.billBL.SaleBillMonth());
         this.comboBoxYF.SelectedIndex   = 0;
         this.comboBoxDJZL.DataSource    = CbbXmlBind.ReadXmlNode("InvType", true);
         this.comboBoxDJZL.DisplayMember = "Value";
         this.comboBoxDJZL.ValueMember   = "Key";
         this.checkBox_JiaoYan.Checked   = PropValue.IsJiaoYan;
         if (this.UseYear)
         {
             string str  = "";
             string str2 = "";
             string str3 = this.comboBoxDJZL.SelectedValue.ToString();
             if (str3 == "a")
             {
                 str  = "s";
                 str2 = "c";
             }
             else
             {
                 str = str3;
             }
             this.comboBoxYF.Items.Clear();
             this.comboBoxYF.Items.AddRange(this.billBL.SaleBillYearMonth(str, str2));
         }
         if (RegisterManager.CheckRegFile("JIJS"))
         {
             TaxCard card = TaxCardFactory.CreateTaxCard();
             if (card.get_QYLX().ISPTFP&& card.get_QYLX().ISZYFP)
             {
                 this.comboBoxDJZL.SelectedIndex = 2;
                 this.comboBoxDJZL.Enabled       = false;
             }
             else if (card.get_QYLX().ISPTFP)
             {
                 this.btnOK.Enabled = false;
             }
             else if (card.get_QYLX().ISZYFP)
             {
                 this.comboBoxDJZL.SelectedIndex = 1;
                 this.comboBoxDJZL.Enabled       = false;
             }
             else
             {
                 this.btnOK.Enabled = false;
             }
         }
     }
     catch (Exception exception)
     {
         HandleException.HandleError(exception);
     }
     finally
     {
         if (this.UseYear)
         {
             this.comboBoxDJZL.SelectedIndexChanged += new EventHandler(this.comboBoxDJZL_SelectedIndexChanged);
         }
     }
 }
コード例 #8
0
ファイル: FPCX.cs プロジェクト: SoL-Alucard-Git/HX-Base
 private void FPCX_Load(object sender, EventArgs e)
 {
     try
     {
         TaxCard card = TaxCardFactory.CreateTaxCard();
         Dictionary <string, string> item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "销售单据编号");
         item.Add("Property", "XSDJBH");
         item.Add("Type", "Text");
         item.Add("Width", "120");
         item.Add("Align", "MiddleLeft");
         item.Add("HeadAlign", "MiddleCenter");
         this.list.Add(item);
         item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "发票种类");
         item.Add("Property", "FPZL");
         item.Add("Type", "Text");
         this.list.Add(item);
         item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "发票代码");
         item.Add("Property", "FPDM");
         item.Add("Type", "Text");
         this.list.Add(item);
         item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "发票号码");
         item.Add("Property", "FPHM");
         item.Add("Type", "Text");
         this.list.Add(item);
         item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "开票机号");
         item.Add("Property", "KPJH");
         item.Add("Type", "Text");
         item.Add("Align", "MiddleCenter");
         item.Add("Width", "80");
         this.list.Add(item);
         item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "购方名称");
         item.Add("Property", "GFMC");
         item.Add("Type", "Text");
         item.Add("Width", "100");
         this.list.Add(item);
         item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "购方税号");
         item.Add("Property", "GFSH");
         item.Add("Type", "Text");
         item.Add("Width", "100");
         this.list.Add(item);
         item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "购方地址电话");
         item.Add("Property", "GFDZDH");
         item.Add("Type", "Text");
         item.Add("Width", "120");
         item.Add("HeadAlign", "MiddleLeft");
         this.list.Add(item);
         item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "购方银行账号");
         item.Add("Property", "GFYHZH");
         item.Add("Type", "Text");
         item.Add("Width", "120");
         item.Add("HeadAlign", "MiddleLeft");
         this.list.Add(item);
         item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "身份证号码/组织机构代码");
         item.Add("Property", "XSBM");
         item.Add("Type", "Text");
         item.Add("Width", "120");
         item.Add("HeadAlign", "MiddleLeft");
         this.list.Add(item);
         item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "开票日期");
         item.Add("Property", "KPRQ");
         item.Add("Type", "Text");
         item.Add("Align", "MiddleLeft");
         item.Add("HeadAlign", "MiddleLeft");
         this.list.Add(item);
         item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "合计金额");
         item.Add("Property", "HJJE");
         item.Add("Type", "Text");
         item.Add("Width", "60");
         item.Add("Align", "MiddleRight");
         item.Add("HeadAlign", "MiddleLeft");
         this.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", "MiddleLeft");
         item.Add("HeadAlign", "MiddleLeft");
         this.list.Add(item);
         item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "合计税额");
         item.Add("Property", "HJSE");
         item.Add("Type", "Text");
         item.Add("Width", "60");
         item.Add("Align", "MiddleRight");
         item.Add("HeadAlign", "MiddleLeft");
         this.list.Add(item);
         item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "主要商品名称");
         item.Add("Property", "ZYSPMC");
         item.Add("Type", "Text");
         item.Add("Width", "160");
         item.Add("Align", "MiddleLeft");
         item.Add("HeadAlign", "MiddleLeft");
         this.list.Add(item);
         item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "商品税目");
         item.Add("Property", "SPSM");
         item.Add("Type", "Text");
         item.Add("Width", "100");
         item.Add("Align", "MiddleLeft");
         item.Add("HeadAlign", "MiddleLeft");
         this.list.Add(item);
         item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "备注");
         item.Add("Property", "BZ");
         item.Add("Type", "Text");
         item.Add("Visible", "False");
         this.list.Add(item);
         item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "开票人");
         item.Add("Property", "KPR");
         item.Add("Type", "Text");
         item.Add("Width", "80");
         this.list.Add(item);
         item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "收款人");
         item.Add("Property", "SKR");
         item.Add("Type", "Text");
         item.Add("Width", "80");
         this.list.Add(item);
         item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "复核人");
         item.Add("Property", "FHR");
         item.Add("Type", "Text");
         item.Add("Width", "80");
         this.list.Add(item);
         item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "作废标志");
         item.Add("Property", "ZFBZ");
         item.Add("Type", "Text");
         item.Add("Width", "80");
         this.list.Add(item);
         item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "清单标志");
         item.Add("Property", "QDBZ");
         item.Add("Type", "Text");
         item.Add("Width", "80");
         this.list.Add(item);
         item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "分页序号");
         item.Add("Property", "ROWNUMBER");
         item.Add("Type", "Text");
         item.Add("Visible", "False");
         this.list.Add(item);
         item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "销方名称");
         item.Add("Property", "XFMC");
         item.Add("Type", "Text");
         this.list.Add(item);
         item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "销方税号");
         item.Add("Property", "XFSH");
         item.Add("Type", "Text");
         this.list.Add(item);
         item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "销方地址电话");
         item.Add("Property", "XFDZDH");
         item.Add("Type", "Text");
         this.list.Add(item);
         item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "销方银行账号");
         item.Add("Property", "XFYHZH");
         item.Add("Type", "Text");
         this.list.Add(item);
         item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "报送状态");
         item.Add("Property", "BSZT");
         item.Add("Type", "Text");
         item.Add("Width", "100");
         if (card.get_QYLX().ISTDQY)
         {
             item.Add("Visible", "False");
         }
         this.list.Add(item);
         item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "作废日期");
         item.Add("Property", "ZFRQ");
         item.Add("Type", "Text");
         item.Add("Width", "100");
         this.list.Add(item);
         item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "营业税标志");
         item.Add("Property", "YYSBZ");
         item.Add("Type", "Text");
         item.Add("Visible", "False");
         this.list.Add(item);
         this.aisinoDataGrid1.set_ColumeHead(this.list);
         this.aisinoDataGrid1.get_Columns()["KPRQ"].DefaultCellStyle.Format = "yyyy-MM-dd";
         this.aisinoDataGrid1.get_Columns()["HJJE"].DefaultCellStyle.Format = "0.00";
         this.aisinoDataGrid1.get_Columns()["HJSE"].DefaultCellStyle.Format = "0.00";
         this.aisinoDataGrid1.get_Columns()["FPHM"].DefaultCellStyle.Format = new string('0', 8);
         this.aisinoDataGrid1.set_DataSource(new AisinoDataSet());
         this.comboBoxFPZL.DropDownStyle = ComboBoxStyle.DropDownList;
         this.comboBoxFPZL.DataSource    = CbbXmlBind.ReadXmlNode("InvType_1", true);
         this.comboBoxFPZL.DisplayMember = "Value";
         this.comboBoxFPZL.ValueMember   = "Key";
         if (RegisterManager.CheckRegFile("JIJS"))
         {
             this.comboBoxFPZL.SelectedIndex = 2;
             this.comboBoxFPZL.Enabled       = false;
         }
         DataTable table = new DataTable();
         table.Columns.Add("Display");
         table.Columns.Add("Value");
         table.Rows.Add(new object[] { "否", "0" });
         table.Rows.Add(new object[] { "是", "1" });
         table.Rows.Add(new object[] { "全部", "both" });
         this.comboBoxZFBZ.DropDownStyle = ComboBoxStyle.DropDownList;
         this.comboBoxZFBZ.DataSource    = table;
         this.comboBoxZFBZ.DisplayMember = "Display";
         this.comboBoxZFBZ.ValueMember   = "Value";
         this.ckbAllDate.Checked         = PropValue.AllDate;
         this.ckbContainTadayS.Checked   = PropValue.ContainStartDay;
         this.ckbContainTadayE.Checked   = PropValue.ContainEndDay;
         this.dTPStart.Value             = this.dTPStart.Value.Date.AddDays((double)((-1 * this.dTPStart.Value.Day) + 1));
         this.dTPEnd.Value = this.dTPEnd.Value.Date;
         if (!RegisterManager.CheckRegFile("JIJT"))
         {
             this.toolStripButtonExcel.Visible = false;
             this.toolStripButtonXML.Visible   = false;
         }
     }
     catch (Exception exception)
     {
         ExceptionHandler.HandleError(exception);
     }
 }
コード例 #9
0
ファイル: FaPiaoCC.cs プロジェクト: SoL-Alucard-Git/HX-Base
 private void FaPiaoCC_Load(object sender, EventArgs e)
 {
     try
     {
         int num;
         this.fileControl1.set_FileFilter("文本文件(*.txt)|*.txt");
         this.fileControl1.get_TextBoxFile().Text = PropValue.InvExportTxtPath;
         this.fileControl1.set_CheckFileExists(false);
         this.checkBox1.Checked          = PropValue.CheckBoxKqd;
         this.comboBoxDJZL.DataSource    = CbbXmlBind.ReadXmlNode("InvType", true);
         this.comboBoxDJZL.DisplayMember = "Value";
         this.comboBoxDJZL.ValueMember   = "Key";
         if (RegisterManager.CheckRegFile("JIJS"))
         {
             TaxCard card = TaxCardFactory.CreateTaxCard();
             if (card.get_QYLX().ISPTFP&& card.get_QYLX().ISZYFP)
             {
                 this.comboBoxDJZL.SelectedIndex = 2;
                 this.comboBoxDJZL.Enabled       = false;
             }
             else if (card.get_QYLX().ISPTFP)
             {
                 this.btnOK.Enabled = false;
             }
             else if (card.get_QYLX().ISZYFP)
             {
                 this.comboBoxDJZL.SelectedIndex = 1;
                 this.comboBoxDJZL.Enabled       = false;
             }
             else
             {
                 this.btnOK.Enabled = false;
             }
         }
         if ((base.TaxCardInstance.get_QYLX().ISPTFP || base.TaxCardInstance.get_QYLX().ISZYFP) && (this.nMonth != this.m_dtLastRepDate.Month))
         {
             this.nYear  = this.m_dtLastRepDate.Year;
             this.nMonth = this.m_dtLastRepDate.Month;
         }
         this.dateTimePicker1.Text = this.nYear.ToString() + "-" + this.nMonth.ToString() + "-01";
         if (this.nMonth == 12)
         {
             num = this.nYear + 1;
             this.dateTimePicker2.Text = Convert.ToDateTime(num.ToString() + "-01-01").AddDays(-1.0).ToShortDateString();
         }
         else
         {
             num = this.nMonth + 1;
             this.dateTimePicker2.Text = Convert.ToString(Convert.ToDateTime(this.nYear.ToString() + "-" + num.ToString() + "-01").AddDays(-1.0));
         }
         List <Dictionary <string, string> > list = new List <Dictionary <string, string> >();
         Dictionary <string, string>         item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "单据编号");
         item.Add("Property", "XSDJBH");
         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", "FPZL");
         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", "FPDM");
         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", "FPHM");
         item.Add("Type", "Text");
         item.Add("Width", "150");
         item.Add("Align", "MiddleRight");
         item.Add("HeadAlign", "MiddleLeft");
         list.Add(item);
         item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "作废标志");
         item.Add("Property", "ZFBZ");
         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", "QDBZ");
         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", "SLV");
         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", "HJJE");
         item.Add("Type", "Text");
         item.Add("Width", "100");
         item.Add("Align", "MiddleCenter");
         item.Add("HeadAlign", "MiddleCenter");
         list.Add(item);
         item = new Dictionary <string, string>();
         item.Add("AisinoLBL", "开票日期");
         item.Add("Property", "KPRQ");
         item.Add("Type", "Text");
         item.Add("Width", "100");
         item.Add("Align", "MiddleLeft");
         item.Add("HeadAlign", "MiddleLeft");
         list.Add(item);
         this.aisinoDataGrid1.set_ColumeHead(list);
         this.aisinoDataGrid1.get_Columns()["KPRQ"].DefaultCellStyle.Format = "yyyy-MM-dd";
         this.aisinoDataGrid1.get_Columns()["HJJE"].DefaultCellStyle.Format = "0.00";
         DataGridViewColumn column = this.aisinoDataGrid1.get_Columns()["FPHM"];
         if (null != column)
         {
             column.DefaultCellStyle.Format = new string('0', 8);
         }
         this.dateTimePicker1_CloseUp(sender, e);
         this.toolStripButtonPrint.Visible = false;
     }
     catch (Exception exception)
     {
         if (exception.ToString().Contains("超时"))
         {
             this.log.Error(exception.ToString());
         }
         else
         {
             HandleException.HandleError(exception);
         }
     }
 }