Esempio n. 1
0
 public bool Insert(Aisino.Fwkp.Hzfp.Model.HZFP_SQD model)
 {
     try
     {
         this.dict.Clear();
         this.dict.Add("FLBMBBBH", model.FLBMBBBH);
         this.dict.Add("SQDH", model.SQDH);
         this.dict.Add("FPZL", model.FPZL);
         this.dict.Add("FPDM", model.FPDM);
         this.dict.Add("FPHM", model.FPHM);
         this.dict.Add("KPJH", model.KPJH);
         this.dict.Add("GFMC", model.GFMC);
         this.dict.Add("GFSH", model.GFSH);
         this.dict.Add("XFMC", model.XFMC);
         this.dict.Add("XFSH", model.XFSH);
         string str = ToolUtil.FormatDateTimeEx(model.TKRQ.ToString("yyyy-MM-dd"));
         this.dict.Add("TKRQ", str);
         this.dict.Add("SSYF", model.SSYF);
         this.dict.Add("HJJE", model.HJJE);
         if (model.SL == -1.0)
         {
             this.dict.Add("SL", null);
         }
         else
         {
             this.dict.Add("SL", model.SL);
         }
         this.dict.Add("HJSE", model.HJSE);
         this.dict.Add("JBR", model.JBR);
         this.dict.Add("SQXZ", model.SQXZ);
         this.dict.Add("SQLY", model.SQLY);
         this.dict.Add("SQRDH", model.SQRDH);
         this.dict.Add("BBBZ", model.BBBZ);
         this.dict.Add("YYSBZ", model.YYSBZ);
         this.dict.Add("REQNSRSBH", model.REQNSRSBH);
         this.dict.Add("JSPH", model.JSPH);
         this.dict.Add("XXBBH", model.XXBBH);
         this.dict.Add("XXBZT", model.XXBZT);
         this.dict.Add("XXBMS", model.XXBMS);
         if (this.baseDao.未确认DAO方法2_疑似updateSQL("aisino.Fwkp.Hzfp.InsertSQD", this.dict) <= 0)
         {
             return(false);
         }
         return(true);
     }
     catch (BaseException exception)
     {
         ExceptionHandler.HandleError(exception);
     }
     catch (Exception exception2)
     {
         ExceptionHandler.HandleError(exception2);
     }
     return(false);
 }
Esempio n. 2
0
        protected DataDict DictCreate_JP(params object[] args)
        {
            Fpxx dyfp = base.dyfp;

            dyfp         = new InvoiceHandler().ConvertInvoiceToZH(dyfp);
            base._isZYPT = true;
            if (dyfp != null)
            {
                Dictionary <string, object> dict = new Dictionary <string, object>();
                dict.Add("fpdm", dyfp.fpdm);
                dict.Add("fphm", dyfp.fphm);
                dict.Add("xfmc", dyfp.xfmc);
                dict.Add("xfsh", dyfp.xfsh);
                dict.Add("jqbh", dyfp.jqbh);
                string str3 = ToolUtil.FormatDateTimeEx(dyfp.kprq);
                dyfp.kprq = Aisino.Fwkp.Print.Common.ObjectToDateTime(str3).Date.ToString("yyyy-MM-dd");
                dict.Add("kprq", dyfp.kprq);
                dict.Add("skr", dyfp.skr);
                dict.Add("gfmc", dyfp.gfmc);
                dict.Add("gfsh", dyfp.gfsh);
                dict.Add("hjje", ((char)0xffe5) + dyfp.je);
                dict.Add("hjse", ((char)0xffe5) + dyfp.se);
                decimal num2 = Convert.ToDecimal(dyfp.je) + Convert.ToDecimal(dyfp.se);
                dict.Add("jshjxx", ((char)0xffe5) + num2.ToString());
                dict.Add("jshjdx", ToolUtil.RMBToDaXie(num2));
                dict.Add("jym", dyfp.jym);
                base.Id = "";
                int    num  = Convert.ToInt32(dyfp.yysbz.Substring(6, 2), 0x10) - 1;
                string str2 = "NEW76mmX177mm";
                Dictionary <string, int> jsPrintTemplate = ToolUtil.GetJsPrintTemplate();
                if (jsPrintTemplate.Count > 0)
                {
                    foreach (string str in jsPrintTemplate.Keys)
                    {
                        if (jsPrintTemplate[str] == num)
                        {
                            str2 = str;
                        }
                    }
                    if ((num >= 0) && (num <= 10))
                    {
                        string    str5   = this.method_9(dyfp);
                        DataTable table3 = this.method_8(dyfp, 0);
                        if (str5 == "H")
                        {
                            dict.Add("list", table3);
                            base.Id = str2 + "H";
                        }
                        else
                        {
                            dict.Add("hwmc", table3.Rows[0]["hwmc"]);
                            dict.Add("dj", table3.Rows[0]["dj"]);
                            dict.Add("sl", table3.Rows[0]["sl"]);
                            dict.Add("je", table3.Rows[0]["je"]);
                            base.Id = str2 + "V";
                        }
                    }
                    else
                    {
                        DataTable table2 = this.method_8(dyfp, 0);
                        dict.Add("list", table2);
                        base.Id = str2;
                    }
                }
                else
                {
                    string    str6  = this.method_9(dyfp);
                    DataTable table = this.method_8(dyfp, 0);
                    if (str6 == "H")
                    {
                        dict.Add("list", table);
                        base.Id = PrintTemplate.NEW76mmX177mm.ToString() + "H";
                    }
                    else
                    {
                        dict.Add("hwmc", table.Rows[0]["hwmc"]);
                        dict.Add("dj", table.Rows[0]["dj"]);
                        dict.Add("sl", table.Rows[0]["sl"]);
                        dict.Add("je", table.Rows[0]["je"]);
                        base.Id = PrintTemplate.NEW76mmX177mm.ToString() + "V";
                    }
                }
                return(new DataDict(dict));
            }
            base._isPrint = "0006";
            return(null);
        }
Esempio n. 3
0
        protected DataDict DictCreate_ZYAndPT(params object[] args)
        {
            Fpxx dyfp = base.dyfp;

            dyfp         = new InvoiceHandler().ConvertInvoiceToZH(dyfp);
            base._isZYPT = true;
            if (dyfp == null)
            {
                base._isPrint = "0006";
                return(null);
            }
            Dictionary <string, object> dict = new Dictionary <string, object>();

            if (dyfp.fplx == FPLX.PTFP)
            {
                base.ZYFPLX = "c";
            }
            else
            {
                base.ZYFPLX = "s";
            }
            dict.Add("lbdm", dyfp.fpdm);
            dict.Add("fphm", dyfp.fphm);
            string str3 = ToolUtil.FormatDateTimeEx(dyfp.kprq);

            dyfp.kprq = Aisino.Fwkp.Print.Common.ObjectToDateTime(str3).Date.ToString("yyyy年MM月dd日");
            dict.Add("kprq", dyfp.kprq);
            DateTime time3 = new DateTime(0x7dd, 9, 10, 8, 0x22, 30);
            TimeSpan span  = (TimeSpan)(DateTime.Now - time3);

            byte[] buffer = AES_Crypt.Encrypt(ToolUtil.GetBytes(span.TotalSeconds.ToString("F1")), new byte[] {
                0xff, 0x42, 0xae, 0x95, 11, 0x51, 0xca, 0x15, 0x21, 140, 0x4f, 170, 220, 0x92, 170, 0xed,
                0xfd, 0xeb, 0x4e, 13, 0xac, 0x80, 0x52, 0xff, 0x45, 0x90, 0x85, 0xca, 0xcb, 0x9f, 0xaf, 0xbd
            }, new byte[] { 0xf2, 0x1f, 0xac, 0x5b, 0x2c, 0xc0, 0xa9, 0xd0, 0xbc, 0xaf, 0x86, 0x99, 0xad, 170, 0xfb, 0x60 });
            if (!base.IsFirstCreate)
            {
                dyfp.Get_Print_Dj(null, 0, buffer);
                base.IsFirstCreate = true;
            }
            if (dyfp.hzfw)
            {
                dict.Add("hxm", dyfp.hxm);
                base._IsHZFW = true;
            }
            else
            {
                dict.Add("mw", dyfp.mw);
                base._IsHZFW = false;
            }
            dict.Add("bz", dyfp.bz);
            dict.Add("hjje", dyfp.je);
            Aisino.Fwkp.Print.Common.GetYYSBZ(ref dyfp);
            if (dyfp.sLv == "0")
            {
                dict.Add("hjse", "***");
            }
            else
            {
                string str2 = ((char)0xffe5) + dyfp.se;
                dict.Add("hjse", str2);
            }
            decimal num2 = Convert.ToDecimal(dyfp.je) + Convert.ToDecimal(dyfp.se);

            dict.Add("jshjxx", num2);
            dict.Add("jshjdx", ToolUtil.RMBToDaXie(num2));
            dict.Add("kpr", dyfp.kpr);
            dict.Add("fhr", dyfp.fhr);
            dict.Add("skr", dyfp.skr);
            dict.Add("jmbb", "加密版本:");
            dict.Add("jmbbh", dyfp.jmbbh);
            dict.Add("list", this.method_7(dyfp));
            dict.Add("gfmc", dyfp.gfmc);
            dict.Add("gfsh", dyfp.gfsh);
            dict.Add("gfdzdh", dyfp.gfdzdh);
            dict.Add("gfyhzh", dyfp.gfyhzh);
            dict.Add("xfmc", dyfp.xfmc);
            dict.Add("xfsh", dyfp.xfsh);
            dict.Add("xfdzdh", dyfp.xfdzdh);
            dict.Add("xfyhzh", dyfp.xfyhzh);
            if (dyfp.isRed)
            {
                dict.Add("xxfs", "销项负数");
            }
            if (dyfp.zfbz)
            {
                dict.Add("zfbz", "作废");
            }
            string yysbz = dyfp.yysbz;
            bool   flag  = false;

            if (yysbz.Length > 2)
            {
                switch (yysbz[2])
                {
                case '1':
                case '2':
                    flag = true;
                    break;
                }
            }
            if (flag)
            {
                dict.Add("xtbz", "XT");
            }
            if (dyfp.fplx == FPLX.PTFP)
            {
                dict.Add("jym", dyfp.jym);
            }
            switch (dyfp.fplx)
            {
            case FPLX.ZYFP:
                if (!dyfp.hzfw)
                {
                    if (Aisino.Fwkp.Print.Common.IsShuiWuDKSQ(""))
                    {
                        dict.Add("xtbz", "代  开");
                    }
                    if (dyfp.mw.Length < 0x5b)
                    {
                        base.Id = this.string_3;
                    }
                    else
                    {
                        base.Id = this.string_4;
                    }
                }
                else
                {
                    base.Id = this.string_5;
                }
                goto Label_04AA;

            case FPLX.PTFP:
                if (dyfp.Zyfplx != ZYFP_LX.NCP_SG)
                {
                    if (dyfp.Zyfplx == ZYFP_LX.NCP_XS)
                    {
                        dict.Add("ncpfp", "农产品销售");
                    }
                    else if (Aisino.Fwkp.Print.Common.IsShuiWuDKSQ(""))
                    {
                        dict.Add("dkbz", "代  开");
                    }
                    break;
                }
                dict.Add("ncpfp", "收  购");
                break;

            default:
                goto Label_04AA;
            }
            if (dyfp.hzfw)
            {
                base.Id = this.string_2;
            }
            else if (dyfp.mw.Length < 0x5b)
            {
                base.Id = this.string_0;
            }
            else
            {
                base.Id = this.string_1;
            }
Label_04AA:
            return(new DataDict(dict));
        }
Esempio n. 4
0
        protected DataDict DictCreate_JDCFP(params object[] args)
        {
            Fpxx dyfp = base.dyfp;

            dyfp         = new InvoiceHandler().ConvertInvoiceToZH(dyfp);
            base._isZYPT = false;
            Dictionary <string, object> dict = new Dictionary <string, object>();

            if (dyfp != null)
            {
                dict.Add("lbdm", dyfp.fpdm);
                dict.Add("fphm", dyfp.fphm);
                dict.Add("jqbh", dyfp.jqbh);
                string str5 = ToolUtil.FormatDateTimeEx(dyfp.kprq);
                dyfp.kprq = Aisino.Fwkp.Print.Common.ObjectToDateTime(str5).Date.ToString("yyyy-MM-dd");
                dict.Add("kprq", dyfp.kprq);
                DateTime time3  = new DateTime(0x7dd, 9, 10, 8, 0x22, 30);
                TimeSpan span   = (TimeSpan)(DateTime.Now - time3);
                byte[]   buffer = AES_Crypt.Encrypt(ToolUtil.GetBytes(span.TotalSeconds.ToString("F1")), new byte[] {
                    0xff, 0x42, 0xae, 0x95, 11, 0x51, 0xca, 0x15, 0x21, 140, 0x4f, 170, 220, 0x92, 170, 0xed,
                    0xfd, 0xeb, 0x4e, 13, 0xac, 0x80, 0x52, 0xff, 0x45, 0x90, 0x85, 0xca, 0xcb, 0x9f, 0xaf, 0xbd
                }, new byte[] { 0xf2, 0x1f, 0xac, 0x5b, 0x2c, 0xc0, 0xa9, 0xd0, 0xbc, 0xaf, 0x86, 0x99, 0xad, 170, 0xfb, 0x60 });
                if (!base.IsFirstCreate)
                {
                    dyfp.Get_Print_Dj(null, 0, buffer);
                    base.IsFirstCreate = true;
                }
                dict.Add("mw", dyfp.mw);
                dict.Add("gfmc", dyfp.gfmc);
                dict.Add("gfsh", dyfp.gfsh);
                dict.Add("sccjmc", dyfp.sccjmc);
                dict.Add("sfzhm", dyfp.sfzhm);
                dict.Add("cllx", dyfp.cllx);
                dict.Add("cpxh", dyfp.cpxh);
                dict.Add("cd", dyfp.cd);
                dict.Add("hgzh", dyfp.hgzh);
                dict.Add("jkzmsh", dyfp.jkzmsh);
                dict.Add("sjdh", dyfp.sjdh);
                dict.Add("fdjhm", dyfp.fdjhm);
                dict.Add("clsbdh", dyfp.clsbdh);
                decimal num = Convert.ToDecimal(dyfp.je) + Convert.ToDecimal(dyfp.se);
                dict.Add("jshjdx", ToolUtil.RMBToDaXie(num));
                string str = "¥" + num.ToString();
                dict.Add("jshjxx", str);
                dict.Add("xfmc", dyfp.xfmc);
                dict.Add("xfdh", dyfp.xfdh);
                dict.Add("xfsh", dyfp.xfsh);
                dict.Add("xfzh", dyfp.xfzh);
                dict.Add("xfdz", dyfp.xfdz);
                dict.Add("xfyh", dyfp.xfyh);
                float result = 0f;
                float.TryParse(dyfp.sLv, out result);
                string str2 = string.Format("{0}%", result * 100f);
                if (result != 0f)
                {
                    dict.Add("sLv", str2);
                    string str3 = "¥" + dyfp.se;
                    dict.Add("hjse", str3);
                }
                else
                {
                    dict.Add("sLv", "***");
                    dict.Add("hjse", "***");
                }
                dict.Add("zgswjgmc", dyfp.zgswjgmc);
                dict.Add("zgswjgdm", dyfp.zgswjgdm);
                dict.Add("je", "¥" + dyfp.je);
                dict.Add("dw", dyfp.dw);
                dict.Add("xcrs", dyfp.xcrs);
                dict.Add("kpr", dyfp.kpr);
                if (dyfp.zfbz)
                {
                    dict.Add("zfbz", "作废");
                }
                switch (dyfp.yysbz.Substring(4, 1))
                {
                case "1":
                    base.Id     = this.string_10;
                    base.ZYFPLX = "JO";
                    break;

                case "2":
                    base.Id     = this.string_9;
                    base.ZYFPLX = "JN";
                    break;
                }
                return(new DataDict(dict));
            }
            base._isPrint = "0006";
            return(new DataDict(dict));
        }