internal void method_7(string string_1, string string_2) { byte[] sourceArray = Convert.FromBase64String("FZoo0+wH8AgXWEjMAFRnOVt+ZImrQik1jiVirx3SQzoTTc8H/D9o32mIm2Fb6CnC"); byte[] destinationArray = new byte[0x20]; Array.Copy(sourceArray, 0, destinationArray, 0, 0x20); byte[] buffer3 = new byte[0x10]; Array.Copy(sourceArray, 0x20, buffer3, 0, 0x10); byte[] buffer4 = AES_Crypt.Decrypt(Convert.FromBase64String("FkC25FGxr7ANG8kSXdMQ1dc1q5h2nMtkTSy90S2NQks6FTRmwMwaGUhrgVdlpMrhTSdJ9l7s5jbUyGMhyCd26w=="), destinationArray, buffer3, null); byte[] buffer5 = new byte[0x20]; Array.Copy(buffer4, 0, buffer5, 0, 0x20); byte[] buffer6 = new byte[0x10]; Array.Copy(buffer4, 0x20, buffer6, 0, 0x10); FileStream stream = new FileStream(Path.Combine(string_2, string_1), FileMode.Open); byte[] buffer = new byte[stream.Length]; stream.Read(buffer, 0, buffer.Length); stream.Close(); XmlTextReader reader = new XmlTextReader(new MemoryStream(AES_Crypt.Decrypt(buffer, buffer5, buffer6, null))); while (reader.Read()) { if (reader.IsStartElement()) { string str; if (((str = reader.LocalName) == null) || !(str == "SQLLIB")) { reader.Close(); throw new Exception1("不支持的SQL资源文件"); } this.method_10(reader); } } reader.Close(); }
public static string DecryptFile(string inFileName) { string path = sysTempDir + Path.GetFileName(inFileName); try { FileStream stream = new FileStream(inFileName, FileMode.Open, FileAccess.Read); byte[] buffer = new byte[stream.Length]; stream.Read(buffer, 0, buffer.Length); DateTime time = new DateTime(0x7dd, 9, 10, 8, 0x22, 30); TimeSpan span = (TimeSpan)(DateTime.Now - time); byte[] buffer2 = 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 }); byte[] buffer3 = AES_Crypt.Decrypt(buffer, key, vec, buffer2); if (buffer3 == null) { stream.Close(); return(""); } FileStream stream2 = new FileStream(path, FileMode.Create, FileAccess.Write) { Position = 0L }; stream2.Write(buffer3, 0, buffer3.Length); stream.Close(); stream2.Close(); } catch { return(""); } return(path); }
public static DockForm RunCommand(byte[] value) { string str = "Aisino.Fwkp.Invoice.ActiveX.TaxCardQuery_Status"; byte[] bytes = ToolUtil.GetBytes(MD5_Crypt.GetHashStr(str)); byte[] destinationArray = new byte[0x20]; Array.Copy(bytes, 0, destinationArray, 0, 0x20); byte[] buffer3 = new byte[0x10]; Array.Copy(bytes, 0x20, buffer3, 0, 0x10); DateTime time = DateTime.Parse(ToolUtil.GetString(AES_Crypt.Decrypt(value, destinationArray, buffer3, null))); DateTime now = DateTime.Now; if ((time.CompareTo(now) > 0) || (time.CompareTo(now.AddSeconds(-1.0)) < 0)) { return(null); } WaitForm form = new WaitForm { StartPosition = FormStartPosition.CenterScreen, ShowInTaskbar = false }; form.Show(); bool flag = form.DataCheck(); form.Close(); if (!flag) { return(null); } if (form.bIsNeedRepair) { MessageManager.ShowMsgBox("INP-253207", new string[] { form.strRet }); } return(new InvoiceReportForm()); }
public Canvas(string string_1) { this.size_0 = new Size(800, 600); this._Margin = new Margins(0, 0, 0, 0); this.startPoint = new PointF(0f, 0f); this.string_0 = string.Empty; if (!File.Exists(string_1)) { throw new FileNotFoundException(); } XmlDocument document = new XmlDocument(); byte[] sourceArray = Convert.FromBase64String("FZoo0+wH8AgXWEjMAFRnOVt+ZImrQik1jiVirx3SQzoTTc8H/D9o32mIm2Fb6CnC"); byte[] destinationArray = new byte[0x20]; Array.Copy(sourceArray, 0, destinationArray, 0, 0x20); byte[] buffer3 = new byte[0x10]; Array.Copy(sourceArray, 0x20, buffer3, 0, 0x10); byte[] buffer4 = AES_Crypt.Decrypt(Convert.FromBase64String("FkC25FGxr7ANG8kSXdMQ1dc1q5h2nMtkTSy90S2NQks6FTRmwMwaGUhrgVdlpMrhTSdJ9l7s5jbUyGMhyCd26w=="), destinationArray, buffer3, null); byte[] buffer5 = new byte[0x20]; Array.Copy(buffer4, 0, buffer5, 0, 0x20); byte[] buffer6 = new byte[0x10]; Array.Copy(buffer4, 0x20, buffer6, 0, 0x10); FileStream stream = new FileStream(string_1, FileMode.Open); byte[] buffer = new byte[stream.Length]; stream.Read(buffer, 0, buffer.Length); stream.Close(); byte[] buffer8 = AES_Crypt.Decrypt(buffer, buffer5, buffer6, null); document.Load(new XmlTextReader(new MemoryStream(buffer8))); this.string_0 = Path.GetFileName(string_1); this.method_1(document); }
public static void EncryptFile(string inFileName) { FileStream stream = new FileStream(inFileName, FileMode.Open, FileAccess.ReadWrite); byte[] buffer = new byte[stream.Length]; stream.Read(buffer, 0, buffer.Length); byte[] buffer2 = AES_Crypt.Encrypt(buffer, key, vec); stream.Position = 0L; stream.Write(buffer2, 0, buffer2.Length); stream.Close(); }
public static BaseForm RunCommand(byte[] value) { string str = "Aisino.Fwkp.Invoice.ActiveX.TaxCardQuery_Year"; byte[] bytes = ToolUtil.GetBytes(MD5_Crypt.GetHashStr(str)); byte[] destinationArray = new byte[0x20]; Array.Copy(bytes, 0, destinationArray, 0, 0x20); byte[] buffer3 = new byte[0x10]; Array.Copy(bytes, 0x20, buffer3, 0, 0x10); DateTime time = DateTime.Parse(ToolUtil.GetString(AES_Crypt.Decrypt(value, destinationArray, buffer3, null))); DateTime now = DateTime.Now; if ((time.CompareTo(now) <= 0) && (time.CompareTo(now.AddSeconds(-1.0)) >= 0)) { if (taxcardEntityBLL.IsLocked()) { MessageManager.ShowMsgBox("INP-253109"); return(null); } DataSumForm form = new DataSumForm(false) { StartPosition = FormStartPosition.CenterScreen, ShowInTaskbar = false, strLabelYearOrStartMonth = "起始月份", strLabelEndMonth = "结束月份", bLabelTaxPeriod = false, bComboxTaxPeriod = false }; if (form.ShowDialog() == DialogResult.OK) { TaxDateSegment segment = new TaxDateSegment(); try { segment.m_nYear = form.nTaxYear; segment.m_nStartMonth = form.nStartMonth; segment.m_nEndMonth = form.nEndMonth; segment.m_nTaxPeriod = Convert.ToInt32(form.strTaxPeriod); return(new InvStatForm(segment, true) { Text = form.strDlgTitle, m_strTitle = form.strLabelTitle }); } catch (Exception exception) { MessageManager.ShowMsgBox("INP-253107", new string[] { exception.Message }); return(null); } } } return(null); }
private void btn_QueDing_Click(object sender, EventArgs e) { try { PropertyUtil.SetValue("POP3_SERVER", this.textRegex_ReceEmail_POP3.Text.Trim()); int result = 110; string s = this.textRegex_ReceEmail_POP3_GJ.Text.Trim(); if (int.TryParse(s, out result) && (result > 0)) { PropertyUtil.SetValue("POP3_PORT", s); } else { s = "110"; PropertyUtil.SetValue("POP3_PORT", "110"); } PropertyUtil.SetValue("SMTP_SERVER", this.textRegex_SendEmail_SMTP.Text.Trim()); int num2 = 0x19; string str2 = this.textRegex_SendEmail_SMPT_GJ.Text.Trim(); if (int.TryParse(str2, out num2) && (num2 > 0)) { PropertyUtil.SetValue("SMTP_PORT", str2); } else { str2 = "25"; PropertyUtil.SetValue("SMTP_PORT", "25"); } PropertyUtil.SetValue("POP3_USER", this.textRegex_ZhangHuMing_Rece.Text.Trim()); PropertyUtil.SetValue("POP3_PASS", Convert.ToBase64String(AES_Crypt.Encrypt(Encoding.Default.GetBytes(this.textRegex_PassWord_Rece.Text.Trim()), byte_0, byte_1))); PropertyUtil.SetValue("SMTP_AUTH", this.chkBox_MyServerYanZheng_Send.Checked ? "1" : "0"); PropertyUtil.SetValue("SMTP_USER", this.textRegex_ZhangHuMing_Send.Text.Trim()); PropertyUtil.SetValue("SMTP_PASS", Convert.ToBase64String(AES_Crypt.Encrypt(Encoding.Default.GetBytes(this.textRegex_PassWord_Send.Text.Trim()), byte_0, byte_1))); PropertyUtil.SetValue("MAIL_ALL_CONFIG", this.chkBox_SendItemSet_CG.Checked ? "1" : "0"); PropertyUtil.SetValue("MAIL_ALL_SEND", this.chkBox_ZhiJieSend_CG.Checked ? "1" : "0"); string str3 = this.chkBox_ServerDeleteEmail_GJ.Checked ? "1" : "0"; PropertyUtil.SetValue("MAIL_DEL", str3); base.DialogResult = DialogResult.OK; } catch (BaseException exception) { this.ilog_0.Error(exception.Message); ExceptionHandler.HandleError(exception); } catch (Exception exception2) { this.ilog_0.Error(exception2.Message); ExceptionHandler.HandleError(exception2); } }
public static bool SendMail(string string_3, string string_4, string[] string_5, string string_6, string string_7, string string_8, string string_9, string string_10, int int_1, string[] string_11, out string string_12) { try { MailMessage message = new MailMessage { From = new MailAddress(string_3, string_4) }; foreach (string str2 in string_5) { message.To.Add(str2); } message.SubjectEncoding = Encoding.GetEncoding("UTF-8"); message.Subject = string_2 + string_6; message.BodyEncoding = ToolUtil.GetEncoding(); message.Priority = MailPriority.High; message.Body = Convert.ToBase64String(AES_Crypt.Encrypt(ToolUtil.GetBytes(string_7), byte_0, byte_1)); message.IsBodyHtml = false; if ((string_11 != null) && (string_11.Length > 0)) { foreach (string str in string_11) { message.Attachments.Add(new Attachment(str)); } } SmtpClient client = new SmtpClient(string_10, int_1) { UseDefaultCredentials = true, DeliveryMethod = SmtpDeliveryMethod.Network }; if (string_8 != null) { client.Credentials = new NetworkCredential(string_8, string_9); } client.Timeout = 0x2710; client.Send(message); client.Dispose(); string_12 = "OK"; return(true); } catch (Exception exception) { string_12 = exception.Message; return(false); } }
internal static PlugIn smethod_0(string string_1) { PlugIn in2; try { if (dictionary_0 == null) { dictionary_0 = new Dictionary <string, string>(); dictionary_0.Add("Auto", "/Aisino/Auto"); dictionary_0.Add("Toolbar", "/Aisino/Toolbar"); dictionary_0.Add("Menu", "/Aisino/Menu"); dictionary_0.Add("Tree", "/Aisino/Tree"); } FormSplashHelper.MsgWait("正在加载插件:" + string_1); byte[] sourceArray = Convert.FromBase64String("7Na8rAMiwkrjjdD3ovBEp1+7a77N+o8nsrh3X6B/K99RYmTt2+X7j7sk0z2WhONH"); byte[] destinationArray = new byte[0x20]; Array.Copy(sourceArray, 0, destinationArray, 0, 0x20); byte[] buffer3 = new byte[0x10]; Array.Copy(sourceArray, 0x20, buffer3, 0, 0x10); byte[] buffer4 = AES_Crypt.Decrypt(Convert.FromBase64String("eqxLBR2DaUHwhQe5q4IYbBEPnlYiMBApixEZLPuKEP5GBTIJsWDHiTZLIa1KTjxql1eMbyDXPUn4BhJVyaLdfA=="), destinationArray, buffer3, null); byte[] buffer5 = new byte[0x20]; Array.Copy(buffer4, 0, buffer5, 0, 0x20); byte[] buffer6 = new byte[0x10]; Array.Copy(buffer4, 0x20, buffer6, 0, 0x10); FileStream stream = new FileStream(string_1, FileMode.Open); byte[] buffer = new byte[stream.Length]; stream.Read(buffer, 0, buffer.Length); stream.Close(); XmlTextReader reader = new XmlTextReader(new MemoryStream(AES_Crypt.Decrypt(buffer, buffer5, buffer6, null))); PlugIn @in = smethod_1(reader, Path.GetDirectoryName(string_1)); @in.method_1(string_1); @in.method_6(true); reader.Close(); in2 = @in; } catch (Exception exception) { throw exception; } return(in2); }
public static void Encrypt(FileInfo[] fileInfo_0, string string_0) { for (int i = 0; i < fileInfo_0.Length; i++) { FileInfo info = fileInfo_0[i]; byte[] sourceArray = Convert.FromBase64String(string_0); byte[] destinationArray = new byte[0x20]; Array.Copy(sourceArray, 0, destinationArray, 0, 0x20); byte[] buffer3 = new byte[0x10]; Array.Copy(sourceArray, 0x20, buffer3, 0, 0x10); FileStream stream = info.OpenRead(); byte[] buffer = new byte[stream.Length]; stream.Read(buffer, 0, buffer.Length); stream.Close(); byte[] buffer5 = AES_Crypt.Encrypt(buffer, destinationArray, buffer3); FileStream stream2 = new FileStream(info.FullName, FileMode.Create); stream2.Write(buffer5, 0, buffer5.Length); stream2.Close(); Console.WriteLine(info.FullName); } }
protected DataDict DictCreate_HWYSYFP(params object[] args) { Fpxx dyfp = base.dyfp; dyfp = new InvoiceHandler().ConvertInvoiceToZH(dyfp); base._isZYPT = false; base.ZYFPLX = "f"; if (dyfp != null) { Dictionary <string, object> dict = new Dictionary <string, object>(); dict.Add("lbdm", dyfp.fpdm); dict.Add("fphm", dyfp.fphm); DateTime time = Aisino.Fwkp.Print.Common.ObjectToDateTime(dyfp.kprq); dict.Add("year", time.Year); dict.Add("month", time.Month.ToString("00")); dict.Add("day", time.Day.ToString("00")); DateTime time2 = new DateTime(0x7dd, 9, 10, 8, 0x22, 30); TimeSpan span = (TimeSpan)(DateTime.Now - time2); 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("cyrmc", dyfp.cyrmc); dict.Add("cyrnsrsbh", dyfp.cyrnsrsbh); dict.Add("spfmc", dyfp.spfmc); dict.Add("spfnsrsbh", dyfp.spfnsrsbh); dict.Add("shrmc", dyfp.shrmc); dict.Add("shrnsrsbh", dyfp.shrnsrsbh); dict.Add("fhrmc", dyfp.fhrmc); dict.Add("fhrnsrsbh", dyfp.fhrnsrsbh); dict.Add("qyd", dyfp.qyd); dict.Add("yshwxx", dyfp.yshwxx); DataTable table = this.method_6(dyfp); dict.Add("list", table); dict.Add("hjje", "¥" + dyfp.je); float result = 0f; float.TryParse(dyfp.sLv, out result); if (result == 0f) { dict.Add("sLv", "***"); dict.Add("hjse", "***"); } else { float num6 = 0f; float.TryParse(dyfp.sLv, out num6); string str2 = string.Format("{0}%", num6 * 100f); dict.Add("sLv", str2); string str3 = "¥" + dyfp.se; dict.Add("hjse", str3); } dict.Add("jqbh", dyfp.jqbh); decimal num5 = Convert.ToDecimal(dyfp.je) + Convert.ToDecimal(dyfp.se); dict.Add("jshjdx", ToolUtil.RMBToDaXie(num5)); string str = "¥" + num5.ToString(); dict.Add("jshjxx", str); dict.Add("czch", dyfp.czch); dict.Add("ccdw", dyfp.ccdw); dict.Add("zgswjgmc", dyfp.zgswjgmc); dict.Add("zgswjgdm", dyfp.zgswjgdm); dict.Add("bz", dyfp.bz); dict.Add("kpr", dyfp.kpr); dict.Add("fhr", dyfp.fhr); dict.Add("skr", dyfp.skr); if (dyfp.zfbz) { dict.Add("zfbz", "作废"); } base.Id = this.string_8; return(new DataDict(dict)); } base._isPrint = "0006"; return(null); }
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)); }
public Fpxx BlankWasteTaxCardZuoFei(object[] param) { string str = param[0].ToString(); string str2 = param[1].ToString(); string str3 = param[2].ToString(); string str4 = param[3].ToString(); string str5 = param[4].ToString(); string str6 = param[5].ToString(); string code = "0000"; byte[] sourceArray = Invoice.TypeByte; byte[] destinationArray = new byte[0x20]; Array.Copy(sourceArray, 0, destinationArray, 0, 0x20); byte[] buffer3 = new byte[0x10]; Array.Copy(sourceArray, 0x20, buffer3, 0, 0x10); byte[] buffer4 = AES_Crypt.Encrypt(Encoding.Unicode.GetBytes("KP" + DateTime.Now.ToString("F")), destinationArray, buffer3); Invoice.IsGfSqdFp_Static = false; Invoice invoice = new Invoice(Invoice.ParseFPLX(str), str2, str3, str4, str5, str6, buffer4, "NEW76mmX177mm"); invoice.Hjje = "0.00"; invoice.Hjse = "0.00"; Fpxx fpData = invoice.GetFpData(); code = invoice.GetCode(); if (fpData == null) { MessageManager.ShowMsgBox(invoice.GetCode(), invoice.Params); return(fpData); } fpData.hzfw = (TaxCardFactory.CreateTaxCard().StateInfo.CompanyType != 0) || (fpData.hxm.Length > 0); fpData.sLv = "0.17"; string str8 = "Aisino.Fwkp.Invoice" + invoice.Fpdm + invoice.Fphm; byte[] bytes = Encoding.Unicode.GetBytes(MD5_Crypt.GetHashStr(str8)); destinationArray = new byte[0x20]; Array.Copy(bytes, 0, destinationArray, 0, 0x20); buffer3 = new byte[0x10]; Array.Copy(bytes, 0x20, buffer3, 0, 0x10); byte[] inArray = AES_Crypt.Encrypt(Encoding.Unicode.GetBytes(DateTime.Now.ToString("F")), destinationArray, buffer3); fpData.gfmc = Convert.ToBase64String(AES_Crypt.Encrypt(Encoding.Unicode.GetBytes(Convert.ToBase64String(inArray) + ";" + invoice.Gfmc), destinationArray, buffer3)); fpData.zfbz = true; fpData.bszt = 0; if ((int)fpData.fplx == 12) { fpData.clsbdh = "0"; fpData.zyspsm = "#%"; fpData.zyspmc = ""; } fpData.dy_mb = "NEW76mmX177mm"; if (!invoice.MakeCardInvoice(fpData, false)) { code = invoice.GetCode(); if (code.StartsWith("TCD_768") || code.StartsWith("TCD_769")) { FormMain.CallUpload(); } MessageManager.ShowMsgBox(invoice.GetCode(), invoice.Params); return(fpData); } code = "0000"; return(fpData); }
private ReadXml() { this.string_0 = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"..\Config\Print\PrintConfig.xml"); this.dict = new Dictionary <string, PrintFileModel>(); this.ZheHang = new Dictionary <string, PrintZheHangModel>(); if (File.Exists(this.string_0)) { XmlDocument document = new XmlDocument(); byte[] sourceArray = Convert.FromBase64String("FZoo0+wH8AgXWEjMAFRnOVt+ZImrQik1jiVirx3SQzoTTc8H/D9o32mIm2Fb6CnC"); byte[] destinationArray = new byte[0x20]; Array.Copy(sourceArray, 0, destinationArray, 0, 0x20); byte[] buffer3 = new byte[0x10]; Array.Copy(sourceArray, 0x20, buffer3, 0, 0x10); byte[] buffer4 = AES_Crypt.Decrypt(Convert.FromBase64String("FkC25FGxr7ANG8kSXdMQ1dc1q5h2nMtkTSy90S2NQks6FTRmwMwaGUhrgVdlpMrhTSdJ9l7s5jbUyGMhyCd26w=="), destinationArray, buffer3, null); byte[] buffer5 = new byte[0x20]; Array.Copy(buffer4, 0, buffer5, 0, 0x20); byte[] buffer6 = new byte[0x10]; Array.Copy(buffer4, 0x20, buffer6, 0, 0x10); FileStream stream = new FileStream(this.string_0, FileMode.Open); byte[] buffer = new byte[stream.Length]; stream.Read(buffer, 0, buffer.Length); stream.Close(); byte[] buffer8 = AES_Crypt.Decrypt(buffer, buffer5, buffer6, null); if (buffer8 == null) { return; } document.Load(new XmlTextReader(new MemoryStream(buffer8))); foreach (XmlNode node in document.DocumentElement.ChildNodes) { XmlElement element = node as XmlElement; if ((element != null) && (element.Name == "Print")) { string attribute = element.GetAttribute("Id"); if (!this.ContainsKey(attribute)) { PrintFileModel model = new PrintFileModel { Id = attribute, CanvasName = element.GetAttribute("Canvas"), AssemblyName = element.GetAttribute("Assembly"), ClassName = element.GetAttribute("Class") }; this.Add(new KeyValuePair <string, PrintFileModel>(attribute, model)); } } if ((element != null) && (element.Name == "Zh")) { foreach (XmlNode node2 in element.ChildNodes) { XmlElement element2 = node2 as XmlElement; if ((element2 != null) && (element2.Name == "Item")) { string key = element2.GetAttribute("Id"); string str3 = element2.GetAttribute("ConfigId"); string str4 = element2.GetAttribute("TempId"); if (!this.ZheHang.ContainsKey(key)) { PrintZheHangModel model2 = new PrintZheHangModel { Id = key, ConfigId = str3, TempId = str4 }; this.ZheHang.Add(key, model2); } } } } if ((element != null) && (element.Name == "QRM")) { XmlNodeList childNodes = element.ChildNodes; int_0 = Common.ObjectToInt(element.GetAttribute("IsPrint")); } } } Dictionary <string, int> jsPrintTemplate = ToolUtil.GetJsPrintTemplate(); if (jsPrintTemplate.Count > 0) { foreach (string str6 in jsPrintTemplate.Keys) { if (!this.ContainsKey(str6)) { PrintFileModel model3 = new PrintFileModel { Id = str6, CanvasName = str6 + ".xml", AssemblyName = "", ClassName = "" }; this.Add(new KeyValuePair <string, PrintFileModel>(str6, model3)); } } } }
protected override DataDict DictCreate(params object[] args) { try { if (args == null) { base._isPrint = "0003"; return(null); } base.ZYFPLX = ""; if (args.Length >= 3) { base._isZYPT = false; string str2 = args[0].ToString(); string str3 = args[1].ToString(); string str4 = args[2].ToString(); Fpxx fpxx = Aisino.Fwkp.Print.Common.GetPTZYFpxxModel(str2, str3, str4, true); if (fpxx.hzfw) { QdfwUtil.IsQDFW(); } if (((fpxx != null) && (fpxx.Qdxx != null)) && (fpxx.Qdxx.Count > 0)) { List <Dictionary <string, object> > listDict = new List <Dictionary <string, object> >(); List <Dictionary <SPXX, string> > qdxx = fpxx.Qdxx; int num3 = qdxx.Count / 0x19; if ((qdxx.Count % 0x19) != 0) { num3++; } DateTime time = new DateTime(0x7dd, 9, 10, 8, 0x22, 30); TimeSpan span = (TimeSpan)(DateTime.Now - time); 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 }); fpxx.Get_Print_Dj(null, 0, buffer); double num8 = 0.0; double num9 = 0.0; for (int i = 0; i < num3; i++) { Dictionary <string, object> item = new Dictionary <string, object>(); item.Add("fpdm", fpxx.fpdm); item.Add("fphm", fpxx.fphm); item.Add("fpzl", "所属增值税" + Aisino.Fwkp.Print.Common.GetInvoiceType(fpxx)); item.Add("tkrq", fpxx.kprq); if (fpxx.hzfw) { item.Add("hxm", fpxx.hxm); } DataTable table = new DataTable(); table.Columns.Add("xh"); table.Columns.Add("hwmc"); table.Columns.Add("ggxh"); table.Columns.Add("dw"); table.Columns.Add("sl"); table.Columns.Add("dj"); table.Columns.Add("je"); table.Columns.Add("slv"); table.Columns.Add("se"); double num6 = 0.0; double num5 = 0.0; for (int j = i * 0x19; j < ((i + 1) * 0x19); j++) { if (j >= qdxx.Count) { break; } DataRow row = table.NewRow(); string str5 = fpxx.Get_Print_Dj(qdxx[j], 0, null); object[] objArray6 = new object[] { str5, 12 }; object[] objArray4 = ServiceFactory.InvokePubService("Aisino.Fwkp.Fpkj.FPPrecisionShareMethod", objArray6); if ((objArray4 != null) && (objArray4.Length > 0)) { row["dj"] = Aisino.Fwkp.Print.Common.FormatString(objArray4[0].ToString()); } else { row["dj"] = ""; base.loger.Error("精度四舍五入错误"); } row["xh"] = j + 1; if (base.IsTaoDa) { row["hwmc"] = qdxx[j][SPXX.SPMC]; } else { row["hwmc"] = qdxx[j][SPXX.SPMC]; } row["ggxh"] = qdxx[j][SPXX.GGXH]; row["dw"] = qdxx[j][SPXX.JLDW]; string str = qdxx[j][SPXX.SL]; object[] objArray2 = new object[] { str, 9 }; object[] objArray3 = ServiceFactory.InvokePubService("Aisino.Fwkp.Fpkj.FPPrecisionShareMethod", objArray2); if ((objArray3 != null) && (objArray3.Length > 0)) { row["sl"] = objArray3[0].ToString(); } else { row["sl"] = ""; base.loger.Error("精度四舍五入错误"); } row["je"] = Aisino.Fwkp.Print.Common.ObjectToDouble(qdxx[j][SPXX.JE]).ToString("f2"); if (qdxx[j][SPXX.SLV] == "") { row["slv"] = ""; row["se"] = Aisino.Fwkp.Print.Common.ObjectToDouble(qdxx[j][SPXX.SE]).ToString("f2"); } else if (Aisino.Fwkp.Print.Common.ObjectToDouble(qdxx[j][SPXX.SLV]) == 0.0) { row["slv"] = "***"; row["se"] = "***"; } else { double num11 = Aisino.Fwkp.Print.Common.ObjectToDouble(qdxx[j][SPXX.SLV]); if ((num11 == 0.05) && (fpxx.fplx == FPLX.ZYFP)) { row["slv"] = ""; } else { row["slv"] = ((num11 * 100.0)).ToString() + "%"; } row["se"] = Aisino.Fwkp.Print.Common.ObjectToDouble(qdxx[j][SPXX.SE]).ToString("f2"); } if (qdxx[j][SPXX.FPHXZ] != "5") { num5 += Aisino.Fwkp.Print.Common.ObjectToDouble(qdxx[j][SPXX.SE]); num6 += Aisino.Fwkp.Print.Common.ObjectToDouble(qdxx[j][SPXX.JE]); } table.Rows.Add(row); } item.Add("list", table); item.Add("xjje", num6.ToString("f2")); if (num5 == 0.0) { item.Add("xjse", "***"); } else { item.Add("xjse", num5.ToString("f2")); } num8 += num6; num9 += num5; item.Add("zjje", num8.ToString("f2")); if (num9 == 0.0) { item.Add("zjse", "***"); } else { item.Add("zjse", num9.ToString("f2")); } item.Add("gfmc", fpxx.gfmc); item.Add("xfmc", fpxx.xfmc); item.Add("bz", fpxx.bz); item.Add("page", i + 1); item.Add("allpage", num3); listDict.Add(item); } if (base.IsTaoDa) { base.Id = this.string_0; } else { base.Id = this.string_1; } return(new DataDict(listDict)); } base._isPrint = "0006"; } base._isPrint = "0006"; return(null); } catch (Exception exception) { base._isPrint = "0003"; base.loger.Error("[创建数据字典]:" + exception.Message); return(null); } }
private bool method_2(string string_1) { string path = Path.Combine(PropertyUtil.GetValue("MAIN_PATH"), "Config/Print/DefaultPrinterManager.xml"); XmlDocument document = new XmlDocument(); bool flag = false; try { string str3 = string_1; int num = str3.LastIndexOf(@"\"); if (num != -1) { str3 = str3.Substring(num + 1); } string str4 = str3; try { object obj2 = Registry.GetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers\" + str3 + @"\PrinterDriverData", "Model", ""); if ((obj2 != null) && (obj2.ToString().Length > 0)) { flag = true; str4 = obj2.ToString(); } else { flag = false; } } catch (Exception exception) { this.ilog_0.Error(exception.Message); } byte[] sourceArray = Convert.FromBase64String("FZoo0+wH8AgXWEjMAFRnOVt+ZImrQik1jiVirx3SQzoTTc8H/D9o32mIm2Fb6CnC"); byte[] destinationArray = new byte[0x20]; Array.Copy(sourceArray, 0, destinationArray, 0, 0x20); byte[] buffer3 = new byte[0x10]; Array.Copy(sourceArray, 0x20, buffer3, 0, 0x10); byte[] buffer4 = AES_Crypt.Decrypt(Convert.FromBase64String("FkC25FGxr7ANG8kSXdMQ1dc1q5h2nMtkTSy90S2NQks6FTRmwMwaGUhrgVdlpMrhTSdJ9l7s5jbUyGMhyCd26w=="), destinationArray, buffer3, null); byte[] buffer5 = new byte[0x20]; Array.Copy(buffer4, 0, buffer5, 0, 0x20); byte[] buffer6 = new byte[0x10]; Array.Copy(buffer4, 0x20, buffer6, 0, 0x10); FileStream stream = new FileStream(path, FileMode.Open); byte[] buffer = new byte[stream.Length]; stream.Read(buffer, 0, buffer.Length); stream.Close(); byte[] buffer8 = AES_Crypt.Decrypt(buffer, buffer5, buffer6, null); if (buffer8 == null) { return(false); } document.Load(new XmlTextReader(new MemoryStream(buffer8))); XmlNode node = document.SelectSingleNode("/PrintConfig"); new PrintDocument(); XmlNodeList childNodes = node.ChildNodes; if ((childNodes != null) && (childNodes.Count != 0)) { if (!this.method_3(childNodes, str3) && flag) { this.method_3(childNodes, str4); } if ((this.DefaultPrinterArgs.PrinterName == null) || (this.DefaultPrinterArgs.PrinterName == "")) { this.DefaultPrinterArgs.PrinterName = this.printDocument_0.PrinterSettings.PrinterName; this.DefaultPrinterArgs.System = "0"; this.DefaultPrinterArgs.PageLenght = 0; this.DefaultPrinterArgs.Name = "user"; this.DefaultPrinterArgs.Left = 0f; this.DefaultPrinterArgs.Top = 0f; this.DefaultPrinterArgs.IsQuanDa = true; } return(false); } return(this.method_3(childNodes, str4)); } catch (Exception) { return(false); } }
private void method_1() { string path = Path.Combine(PropertyUtil.GetValue("MAIN_PATH"), @"Config\Print\PrinterManager.xml"); XmlDocument document = new XmlDocument(); try { byte[] sourceArray = Convert.FromBase64String("FZoo0+wH8AgXWEjMAFRnOVt+ZImrQik1jiVirx3SQzoTTc8H/D9o32mIm2Fb6CnC"); byte[] destinationArray = new byte[0x20]; Array.Copy(sourceArray, 0, destinationArray, 0, 0x20); byte[] buffer3 = new byte[0x10]; Array.Copy(sourceArray, 0x20, buffer3, 0, 0x10); byte[] buffer4 = AES_Crypt.Decrypt(Convert.FromBase64String("FkC25FGxr7ANG8kSXdMQ1dc1q5h2nMtkTSy90S2NQks6FTRmwMwaGUhrgVdlpMrhTSdJ9l7s5jbUyGMhyCd26w=="), destinationArray, buffer3, null); byte[] buffer5 = new byte[0x20]; Array.Copy(buffer4, 0, buffer5, 0, 0x20); byte[] buffer6 = new byte[0x10]; Array.Copy(buffer4, 0x20, buffer6, 0, 0x10); FileStream stream = new FileStream(path, FileMode.Open); byte[] buffer = new byte[stream.Length]; stream.Read(buffer, 0, buffer.Length); stream.Close(); byte[] buffer8 = AES_Crypt.Decrypt(buffer, buffer5, buffer6, null); if (buffer8 == null) { return; } document.Load(new XmlTextReader(new MemoryStream(buffer8))); XmlNode node = document.SelectSingleNode("/PrintConfig"); new PrintDocument(); string name = this.Name; XmlNodeList childNodes = node.ChildNodes; if ((childNodes == null) || (childNodes.Count == 0)) { goto Label_03ED; } bool flag = false; XmlElement element = null; IEnumerator enumerator = childNodes.GetEnumerator(); { XmlElement element2; while (enumerator.MoveNext()) { XmlNode current = (XmlNode)enumerator.Current; element2 = current as XmlElement; if (element2 != null) { XmlAttribute attribute = element2.Attributes["name"]; if (attribute.InnerText == this.Name) { goto Label_019C; } if (attribute.InnerText == "_QD") { element = element2; } } } goto Label_026B; Label_019C: flag = true; this.UserPrinterArgs.Name = element2.GetAttribute("name"); this.UserPrinterArgs.System = element2.GetAttribute("system"); this.UserPrinterArgs.Top = Common.ObjectToFloat(element2.GetAttribute("top")); this.UserPrinterArgs.Left = Common.ObjectToFloat(element2.GetAttribute("left")); this.UserPrinterArgs.PageLenght = Common.ObjectToInt(element2.GetAttribute("pageLenght")); this.UserPrinterArgs.PrinterName = element2.GetAttribute("PrinterName"); this.UserPrinterArgs.IsQuanDa = Common.ObjectToBool(element2.GetAttribute("IsQuanDa")); } Label_026B: if (!flag && (element != null)) { XmlAttribute attribute2 = element.Attributes["name"]; if (attribute2.InnerText == "_QD") { flag = true; this.UserPrinterArgs.Name = this.Name; this.UserPrinterArgs.System = element.GetAttribute("system"); this.UserPrinterArgs.Top = Common.ObjectToFloat(element.GetAttribute("top")); this.UserPrinterArgs.Left = Common.ObjectToFloat(element.GetAttribute("left")); this.UserPrinterArgs.PageLenght = Common.ObjectToInt(element.GetAttribute("pageLenght")); this.UserPrinterArgs.PrinterName = element.GetAttribute("PrinterName"); this.UserPrinterArgs.IsQuanDa = Common.ObjectToBool(element.GetAttribute("IsQuanDa")); } } if ((this.UserPrinterArgs.PrinterName == null) || (this.UserPrinterArgs.PrinterName == "")) { this.UserPrinterArgs.PrinterName = this.printDocument_0.PrinterSettings.PrinterName; this.UserPrinterArgs.System = "1"; this.UserPrinterArgs.PageLenght = 0; this.UserPrinterArgs.Name = "user"; this.UserPrinterArgs.Left = 0f; this.UserPrinterArgs.Top = 0f; this.UserPrinterArgs.IsQuanDa = true; } return; Label_03ED: this.UserPrinterArgs.PrinterName = this.printDocument_0.PrinterSettings.PrinterName; this.UserPrinterArgs.System = "1"; this.UserPrinterArgs.PageLenght = 0; this.UserPrinterArgs.Name = "user"; this.UserPrinterArgs.Left = 0f; this.UserPrinterArgs.Top = 0f; this.UserPrinterArgs.IsQuanDa = true; } catch (Exception) { } }
protected override DataDict DictCreate(params object[] args) { try { if (args == null) { base._isPrint = "0003"; return(null); } base.ZYFPLX = ""; if (args.Length >= 3) { base._isZYPT = false; string str3 = args[0].ToString(); string str4 = args[1].ToString(); int num7 = Convert.ToInt32(args[2]); object[] objArray5 = new object[] { str3, str4, num7 }; Fpxx fpxx = ServiceFactory.InvokePubService("Aisino.Fwkp.Fpkj.FPChanXunWenBenJieKouShareMethods", objArray5)[0] as Fpxx; if (fpxx.hzfw) { QdfwUtil.IsQDFW(); } if (((fpxx != null) && (fpxx.Qdxx != null)) && (fpxx.Qdxx.Count > 0)) { List <Dictionary <string, object> > listDict = new List <Dictionary <string, object> >(); List <Dictionary <SPXX, string> > qdxx = fpxx.Qdxx; int num5 = qdxx.Count / 0x19; if ((qdxx.Count % 0x19) != 0) { num5++; } DateTime time = new DateTime(0x7dd, 9, 10, 8, 0x22, 30); TimeSpan span = (TimeSpan)(DateTime.Now - time); 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 }); fpxx.Get_Print_Dj(null, 0, buffer); double num14 = 0.0; double num13 = 0.0; for (int i = 0; i < num5; i++) { Dictionary <string, object> item = new Dictionary <string, object>(); item.Add("fpdm", fpxx.fpdm); item.Add("fphm", fpxx.fphm); item.Add("fpzl", "所属增值税" + Aisino.Fwkp.Print.Common.GetInvoiceType(fpxx)); item.Add("tkrq", fpxx.kprq); if (fpxx.hzfw) { item.Add("hxm", fpxx.hxm); } DataTable table = new DataTable(); table.Columns.Add("xh"); table.Columns.Add("hwmc"); table.Columns.Add("ggxh"); table.Columns.Add("dw"); table.Columns.Add("sl"); table.Columns.Add("dj"); table.Columns.Add("je"); table.Columns.Add("slv"); table.Columns.Add("se"); double num2 = 0.0; double num3 = 0.0; for (int j = i * 0x19; j < ((i + 1) * 0x19); j++) { double num19; if (j >= qdxx.Count) { break; } DataRow row = table.NewRow(); string str2 = fpxx.Get_Print_Dj(qdxx[j], 0, null); object[] objArray2 = new object[] { str2, 12 }; object[] objArray3 = ServiceFactory.InvokePubService("Aisino.Fwkp.Fpkj.FPPrecisionShareMethod", objArray2); if ((objArray3 != null) && (objArray3.Length > 0)) { row["dj"] = Aisino.Fwkp.Print.Common.FormatString(objArray3[0].ToString()); } else { row["dj"] = ""; base.loger.Error("精度四舍五入错误"); } row["xh"] = j + 1; if (base.IsTaoDa) { row["hwmc"] = qdxx[j][SPXX.SPMC]; } else { row["hwmc"] = qdxx[j][SPXX.SPMC]; } row["ggxh"] = qdxx[j][SPXX.GGXH]; row["dw"] = qdxx[j][SPXX.JLDW]; string str5 = qdxx[j][SPXX.SL]; object[] objArray8 = new object[] { str5, 9 }; object[] objArray9 = ServiceFactory.InvokePubService("Aisino.Fwkp.Fpkj.FPPrecisionShareMethod", objArray8); if ((objArray9 != null) && (objArray9.Length > 0)) { row["sl"] = objArray9[0].ToString(); } else { row["sl"] = ""; base.loger.Error("精度四舍五入错误"); } row["je"] = Aisino.Fwkp.Print.Common.ObjectToDouble(qdxx[j][SPXX.JE]).ToString("f2"); if ((qdxx[j].ContainsKey(SPXX.LSLVBS) && (qdxx[j][SPXX.LSLVBS] != null)) && (qdxx[j][SPXX.LSLVBS] != "")) { int num10 = Aisino.Fwkp.Print.Common.ObjectToInt(qdxx[j][SPXX.LSLVBS]); if ((num10 >= 0) && (num10 <= 3)) { row["se"] = "***"; row["slv"] = Aisino.Fwkp.Print.Common.smethod_4(qdxx[j][SPXX.LSLVBS]); } else { row["se"] = qdxx[j][SPXX.SE]; row["slv"] = qdxx[j][SPXX.SLV]; } goto Label_0845; } if (!(fpxx.sLv != "")) { goto Label_0749; } string str = qdxx[j][SPXX.SLV]; if (str != null) { if (str == "0.05") { bool flag = fpxx.Zyfplx == ZYFP_LX.HYSY; if ((fpxx.fplx == FPLX.ZYFP) && flag) { row["slv"] = ""; row["se"] = Aisino.Fwkp.Print.Common.ObjectToDouble(qdxx[j][SPXX.SE]).ToString("f2"); } else { row["slv"] = ((Aisino.Fwkp.Print.Common.ObjectToDouble(qdxx[j][SPXX.SLV]) * 100.0)).ToString() + "%"; row["se"] = Aisino.Fwkp.Print.Common.ObjectToDouble(qdxx[j][SPXX.SE]).ToString("f2"); } } else if (!(str == "0.015")) { if (!(str == "0")) { goto Label_06D8; } row["slv"] = "***"; row["se"] = "***"; } else { row["slv"] = "***"; row["se"] = Aisino.Fwkp.Print.Common.ObjectToDouble(qdxx[j][SPXX.SE]).ToString("f2"); } goto Label_0845; } Label_06D8: num19 = Aisino.Fwkp.Print.Common.ObjectToDouble(qdxx[j][SPXX.SLV]) * 100.0; row["slv"] = num19.ToString() + "%"; row["se"] = Aisino.Fwkp.Print.Common.ObjectToDouble(qdxx[j][SPXX.SE]).ToString("f2"); goto Label_0845; Label_0749: if (qdxx[j][SPXX.SLV] != "") { double num8 = Aisino.Fwkp.Print.Common.ObjectToDouble(qdxx[j][SPXX.SLV]) * 100.0; if (num8 == 0.0) { row["slv"] = "***"; row["se"] = "***"; } else { row["slv"] = num8.ToString() + "%"; row["se"] = Aisino.Fwkp.Print.Common.ObjectToDouble(qdxx[j][SPXX.SE]).ToString("f2"); } } else { row["slv"] = ""; row["se"] = Aisino.Fwkp.Print.Common.ObjectToDouble(qdxx[j][SPXX.SE]).ToString("f2"); } Label_0845: if (qdxx[j][SPXX.FPHXZ] != "5") { num3 += Aisino.Fwkp.Print.Common.ObjectToDouble(qdxx[j][SPXX.SE]); num2 += Aisino.Fwkp.Print.Common.ObjectToDouble(qdxx[j][SPXX.JE]); } table.Rows.Add(row); } item.Add("list", table); item.Add("xjje", num2.ToString("f2")); if (num3 == 0.0) { if (fpxx.sLv == "0") { item.Add("xjse", "***"); } if (fpxx.sLv != "0") { item.Add("xjse", "0.00"); } } else { item.Add("xjse", num3.ToString("f2")); } num14 += num2; num13 += num3; item.Add("zjje", num14.ToString("f2")); if (num13 == 0.0) { if (fpxx.sLv == "0") { item.Add("zjse", "***"); } if (fpxx.sLv != "0") { item.Add("zjse", "0.00"); } } else { item.Add("zjse", num13.ToString("f2")); } item.Add("gfmc", fpxx.gfmc); item.Add("xfmc", fpxx.xfmc); item.Add("bz", fpxx.bz); item.Add("page", i + 1); item.Add("allpage", num5); listDict.Add(item); } if (base.IsTaoDa) { base.Id = this.string_0; } else { base.Id = this.string_1; } return(new DataDict(listDict)); } base._isPrint = "0006"; } base._isPrint = "0006"; return(null); } catch (Exception exception) { base._isPrint = "0003"; base.loger.Error("[创建数据字典]:" + exception.Message); return(null); } }
private void method_1() { try { this.textRegex_ReceEmail_POP3.Text = PropertyUtil.GetValue("POP3_SERVER").Trim(); int result = 110; string s = PropertyUtil.GetValue("POP3_PORT").Trim(); if (!int.TryParse(s, out result) || (result <= 0)) { s = "110"; } this.textRegex_ReceEmail_POP3_GJ.Text = s; this.textRegex_SendEmail_SMTP.Text = PropertyUtil.GetValue("SMTP_SERVER").Trim(); int num2 = 0x19; string str2 = PropertyUtil.GetValue("SMTP_PORT").Trim(); if (!int.TryParse(str2, out num2) || (num2 <= 0)) { str2 = "25"; } this.textRegex_SendEmail_SMPT_GJ.Text = str2; this.textRegex_ZhangHuMing_Rece.Text = PropertyUtil.GetValue("POP3_USER").Trim(); this.textRegex_PassWord_Rece.Text = (PropertyUtil.GetValue("POP3_PASS").Length == 0) ? "" : Encoding.Default.GetString(AES_Crypt.Decrypt(Convert.FromBase64String(PropertyUtil.GetValue("POP3_PASS").Trim()), byte_0, byte_1, null)); string str3 = PropertyUtil.GetValue("SMTP_AUTH").Trim(); this.chkBox_MyServerYanZheng_Send.Checked = string.IsNullOrEmpty(str3) || (str3 != "0"); this.textRegex_ZhangHuMing_Send.Text = PropertyUtil.GetValue("SMTP_USER").Trim(); this.textRegex_PassWord_Send.Text = (PropertyUtil.GetValue("SMTP_PASS").Length == 0) ? "" : Encoding.Default.GetString(AES_Crypt.Decrypt(Convert.FromBase64String(PropertyUtil.GetValue("SMTP_PASS").Trim()), byte_0, byte_1, null)); string str4 = PropertyUtil.GetValue("MAIL_ALL_CONFIG").Trim(); this.chkBox_SendItemSet_CG.Checked = string.IsNullOrEmpty(str4) || (str4 != "0"); string str5 = PropertyUtil.GetValue("MAIL_ALL_SEND").Trim(); this.chkBox_ZhiJieSend_CG.Checked = string.IsNullOrEmpty(str5) || (str5 != "0"); string str6 = PropertyUtil.GetValue("MAIL_DEL").Trim(); this.chkBox_ServerDeleteEmail_GJ.Checked = !string.IsNullOrEmpty(str6) && (str6 != "0"); this.chkBox_MyServerYanZheng_Send_Click(this.chkBox_MyServerYanZheng_Send, null); } catch (BaseException exception) { this.ilog_0.Error(exception.Message); ExceptionHandler.HandleError(exception); } catch (Exception exception2) { this.ilog_0.Error(exception2.Message); ExceptionHandler.HandleError(exception2); } }
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)); }
private void ShowInfo(Fpxx fp, string zfbz) { this.lab_yplx.Visible = false; this.com_yplx.Visible = false; this.lblNCP.Visible = false; this.isSnyZyfp = false; this.mFplx = fp.fplx; if (((fp.fplx == 0) && !string.IsNullOrEmpty(fp.yysbz)) && (fp.yysbz.Substring(2, 1) == "3")) { fp.Zyfplx = (ZYFP_LX)2; this.isSnyZyfp = true; } if (fp.fplx == (FPLX)2) { if (!string.IsNullOrEmpty(fp.yysbz) && (fp.yysbz.Substring(5, 1) == "1")) { fp.Zyfplx = (ZYFP_LX)8; } else if (!string.IsNullOrEmpty(fp.yysbz) && (fp.yysbz.Substring(5, 1) == "2")) { fp.Zyfplx = (ZYFP_LX)9; this.isNcpsgfp = true; } } this.SetBackgroudImage(); this.SetCxFormTitle(fp.fpdm, fp.fplx, fp.Zyfplx); string str = PropertyUtil.GetValue("INV-HSJBZ", "0"); byte[] destinationArray = new byte[0x20]; byte[] sourceArray = Invoice.TypeByte; Array.Copy(sourceArray, 0, destinationArray, 0, 0x20); byte[] buffer2 = new byte[0x10]; Array.Copy(sourceArray, 0x20, buffer2, 0, 0x10); byte[] buffer3 = AES_Crypt.Encrypt(Encoding.Unicode.GetBytes("KP" + DateTime.Now.ToString("F")), destinationArray, buffer2); Invoice.IsGfSqdFp_Static = false; this._fpxx = new Invoice(str.Equals("1"), fp, buffer3, null); this.sLvList = this._GetSLvList(); this.lab_fpdm.Text = this._fpxx.Fpdm; this.lab_kprq.Text = this._fpxx.Kprq; this.lab_fphm.Text = this._fpxx.Fphm; this.com_gfsbh.Text = this._fpxx.Gfsh; this.com_gfmc.Text = this._fpxx.Gfmc; this.com_gfdzdh.Text = this._fpxx.Gfdzdh; this.com_gfzh.Text = this._fpxx.Gfyhzh; this.com_xfsbh.Text = this._fpxx.Xfsh; this.com_xfmc.Text = this._fpxx.Xfmc; this.com_xfdzdh.Text = this._fpxx.Xfdzdh; this.com_xfzh.Text = this._fpxx.Xfyhzh; this.com_skr.Text = this._fpxx.Skr; this.com_fhr.Text = this._fpxx.Fhr; this.lab_kp.Text = this._fpxx.Kpr; this.txt_bz.Text = this._fpxx.Bz; bool flag = zfbz.Equals("1"); this.tool_zuofei.Enabled = !flag; this.picZuofei.Visible = flag; this._SetHzxx(); if (!this._fpxx.Qdbz) { this.qingdanButton.Enabled = false; } else { this.qingdanButton.Enabled = true; } this._SetHsjxx(this._DataGridView, this._fpxx.Hsjbz); if (this._fpxx.Zyfplx == (ZYFP_LX)1) { this.SetHysyHsjxx(this._DataGridView, true); } else { this.SetHysyHsjxx(this._DataGridView, false); } if (this.isSnyZyfp) { this.lab_yplx.Visible = true; this.com_yplx.Visible = true; this.com_yplx.Enabled = false; string str2 = ""; List <Dictionary <SPXX, string> > spxxs = this._fpxx.GetSpxxs(); if (((spxxs != null) && (spxxs.Count > 0)) && (spxxs[0] != null)) { string str3 = spxxs[0][0]; if (str3.EndsWith("(石脑油)")) { str2 = "(石脑油)"; } else if (str3.EndsWith("(石脑油DDZG)")) { str2 = "(石脑油DDZG)"; } else if (str3.EndsWith("(燃料油)")) { str2 = "(燃料油)"; } else if (str3.EndsWith("(燃料油DDZG)")) { str2 = "(燃料油DDZG)"; } } this.com_yplx.Text = str2; } if (fp.fplx == (FPLX)2) { this.lblJYM.Visible = true; this.lblJYM.Text = "校验码:" + fp.jym; if (fp.Zyfplx == (ZYFP_LX)9) { this.lblNCP.Visible = true; this.lblNCP.Text = "收购"; } else if (fp.Zyfplx == (ZYFP_LX)8) { this.lblNCP.Visible = true; this.lblNCP.Text = "农产品销售"; } else { this.lblNCP.Visible = false; } } else { this.lblJYM.Visible = false; } this.zhekouButton.Visible = false; this.addRowButton.Visible = false; this.delRowButton.Visible = false; }
public void SaveUserPrinterEdge(PrinterEventArgs printerEventArgs_0) { string path = Path.Combine(PropertyUtil.GetValue("MAIN_PATH"), @"Config\Print\PrinterManager.xml"); XmlDocument document = new XmlDocument(); try { byte[] sourceArray = Convert.FromBase64String("FZoo0+wH8AgXWEjMAFRnOVt+ZImrQik1jiVirx3SQzoTTc8H/D9o32mIm2Fb6CnC"); byte[] destinationArray = new byte[0x20]; Array.Copy(sourceArray, 0, destinationArray, 0, 0x20); byte[] buffer3 = new byte[0x10]; Array.Copy(sourceArray, 0x20, buffer3, 0, 0x10); byte[] buffer4 = AES_Crypt.Decrypt(Convert.FromBase64String("FkC25FGxr7ANG8kSXdMQ1dc1q5h2nMtkTSy90S2NQks6FTRmwMwaGUhrgVdlpMrhTSdJ9l7s5jbUyGMhyCd26w=="), destinationArray, buffer3, null); byte[] buffer5 = new byte[0x20]; Array.Copy(buffer4, 0, buffer5, 0, 0x20); byte[] buffer6 = new byte[0x10]; Array.Copy(buffer4, 0x20, buffer6, 0, 0x10); FileStream stream = new FileStream(path, FileMode.Open); byte[] buffer = new byte[stream.Length]; stream.Read(buffer, 0, buffer.Length); stream.Close(); byte[] buffer8 = AES_Crypt.Decrypt(buffer, buffer5, buffer6, null); if (buffer8 != null) { document.Load(new XmlTextReader(new MemoryStream(buffer8))); XmlNode node = document.SelectSingleNode("/PrintConfig"); new PrintDocument(); if (this.Name == null) { this.Name = "user"; } bool flag = (((this.object_0 != null) && (this.object_0.Length >= 4)) && (this.object_0[1].ToString() == "1100053620")) && (this.object_0[2].ToString() == "593803"); bool flag2 = false; if ((node.ChildNodes != null) || (node.ChildNodes.Count > 0)) { for (int i = 0; i < node.ChildNodes.Count; i++) { XmlNode oldChild = node.ChildNodes[i]; XmlElement element = oldChild as XmlElement; if (element.GetAttribute("name") == this.Name) { node.RemoveChild(oldChild); i--; } else if (element.GetAttribute("name") == "_QD") { node.RemoveChild(oldChild); i--; flag2 = true; } else if ((element.GetAttribute("name") == "c_QD") && flag) { node.RemoveChild(oldChild); i--; } } } if ((flag && (this.Name == "s_QD")) || flag2) { XmlElement newChild = document.CreateElement("Printer"); newChild.SetAttribute("name", "c_QD"); newChild.SetAttribute("left", printerEventArgs_0.Left.ToString()); newChild.SetAttribute("top", printerEventArgs_0.Top.ToString()); newChild.SetAttribute("system", "1"); newChild.SetAttribute("pagelenght", printerEventArgs_0.PageLenght.ToString()); newChild.SetAttribute("PrinterName", printerEventArgs_0.PrinterName); newChild.SetAttribute("IsQuanDa", printerEventArgs_0.IsQuanDa.ToString()); node.AppendChild(newChild); XmlElement element3 = document.CreateElement("Printer"); element3.SetAttribute("name", "s_QD"); element3.SetAttribute("left", printerEventArgs_0.Left.ToString()); element3.SetAttribute("top", printerEventArgs_0.Top.ToString()); element3.SetAttribute("system", "1"); element3.SetAttribute("pagelenght", printerEventArgs_0.PageLenght.ToString()); element3.SetAttribute("PrinterName", printerEventArgs_0.PrinterName); element3.SetAttribute("IsQuanDa", printerEventArgs_0.IsQuanDa.ToString()); node.AppendChild(element3); } else { XmlElement element4 = document.CreateElement("Printer"); element4.SetAttribute("name", this.Name); element4.SetAttribute("left", printerEventArgs_0.Left.ToString()); element4.SetAttribute("top", printerEventArgs_0.Top.ToString()); element4.SetAttribute("system", "1"); element4.SetAttribute("pagelenght", printerEventArgs_0.PageLenght.ToString()); element4.SetAttribute("PrinterName", printerEventArgs_0.PrinterName); element4.SetAttribute("IsQuanDa", printerEventArgs_0.IsQuanDa.ToString()); node.AppendChild(element4); } document.Save(path); } } catch (Exception exception) { XmlDeclaration declaration = document.CreateXmlDeclaration("1.0", "UTF-8", ""); document.AppendChild(declaration); XmlElement element5 = document.CreateElement("PrintConfig"); element5.SetAttribute("Name", "user"); document.AppendChild(element5); document.Save(path); this.UserPrinterArgs.PrinterName = this.printDocument_0.PrinterSettings.PrinterName; this.UserPrinterArgs.System = "1"; this.UserPrinterArgs.PageLenght = 0; this.UserPrinterArgs.Name = "user"; this.UserPrinterArgs.IsQuanDa = true; this.ilog_0.Error(exception.ToString()); } finally { string str3 = "ikAJxQPU3bNUWK0fMgeHxMFk5wjhSQPYnARPgkVEKVU4yjA7KoD3eo7c6tLP745I"; FileInfo info = new FileInfo(path); Common.Encrypt(new FileInfo[] { info }, str3); } }
private ReadXml() { this.string_2 = Path.Combine(string_1, @"..\Config\Print\PrintConfig.xml"); this.loger = LogUtil.GetLogger <ReadXml>(); this.dict = new Dictionary <string, PrintFileModel>(); this.ZheHang = new Dictionary <string, PrintZheHangModel>(); if (string.Equals(TaxCardFactory.CreateTaxCard().SoftVersion, "FWKP_V2.0_Svr_Server")) { string_0 = Path.Combine(Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\fwkp.exe").GetValue("Path").ToString(), @"Bin\"); string_1 = Path.GetDirectoryName(string_0); this.string_2 = Path.Combine(string_1, @"..\Config\Print\PrintConfig.xml"); } if (File.Exists(this.string_2)) { XmlDocument document = new XmlDocument(); byte[] sourceArray = Convert.FromBase64String("FZoo0+wH8AgXWEjMAFRnOVt+ZImrQik1jiVirx3SQzoTTc8H/D9o32mIm2Fb6CnC"); byte[] destinationArray = new byte[0x20]; Array.Copy(sourceArray, 0, destinationArray, 0, 0x20); byte[] buffer3 = new byte[0x10]; Array.Copy(sourceArray, 0x20, buffer3, 0, 0x10); byte[] buffer4 = AES_Crypt.Decrypt(Convert.FromBase64String("FkC25FGxr7ANG8kSXdMQ1dc1q5h2nMtkTSy90S2NQks6FTRmwMwaGUhrgVdlpMrhTSdJ9l7s5jbUyGMhyCd26w=="), destinationArray, buffer3, null); byte[] buffer5 = new byte[0x20]; Array.Copy(buffer4, 0, buffer5, 0, 0x20); byte[] buffer6 = new byte[0x10]; Array.Copy(buffer4, 0x20, buffer6, 0, 0x10); FileStream stream = new FileStream(this.string_2, FileMode.Open); byte[] buffer = new byte[stream.Length]; stream.Read(buffer, 0, buffer.Length); stream.Close(); byte[] buffer8 = AES_Crypt.Decrypt(buffer, buffer5, buffer6, null); document.Load(new XmlTextReader(new MemoryStream(buffer8))); foreach (XmlNode node in document.DocumentElement.ChildNodes) { XmlElement element2 = node as XmlElement; if ((element2 != null) && (element2.Name == "Print")) { string attribute = element2.GetAttribute("Id"); if (!this.ContainsKey(attribute)) { PrintFileModel model = new PrintFileModel { Id = attribute, CanvasName = element2.GetAttribute("Canvas"), AssemblyName = element2.GetAttribute("Assembly"), ClassName = element2.GetAttribute("Class") }; this.Add(new KeyValuePair <string, PrintFileModel>(attribute, model)); } } if ((element2 != null) && (element2.Name == "Zh")) { foreach (XmlNode node2 in element2.ChildNodes) { XmlElement element3 = node2 as XmlElement; if ((element3 != null) && (element3.Name == "Item")) { string key = element3.GetAttribute("Id"); string str3 = element3.GetAttribute("ConfigId"); string str4 = element3.GetAttribute("TempId"); if (!this.ZheHang.ContainsKey(key)) { PrintZheHangModel model2 = new PrintZheHangModel { Id = key, ConfigId = str3, TempId = str4 }; this.ZheHang.Add(key, model2); } } } } } } }
public bool WasteHard(string strInvType, string strInvCode, string strInvNum) { string str = this.taxCard.GetCardClock().ToString(); FPLX fplx = 2; if (strInvType == "c") { fplx = 2; } else if (strInvType == "s") { fplx = 0; } else if (strInvType == "f") { fplx = 11; } else if (strInvType == "j") { fplx = 12; } InvoiceType invType = (InvoiceType)CommonTool.GetInvType(strInvType); InvoiceDataDetail detail = this.fpzfDAL.GetInvInfo(strInvType, strInvCode, strInvNum); string str2 = strInvCode; string str3 = strInvNum; string str4 = detail.m_dtInvDate.ToString(); if (detail.m_strBuyerCode.Length == 0) { return(false); } string dbAmount = detail.m_dbAmount; dbAmount = (dbAmount == "") ? "0.00" : dbAmount; string dbTaxRate = "0.00"; if (detail.m_dbTaxRate.Length == 0) { if (fplx == 11) { dbTaxRate = "0.05"; } else { dbTaxRate = "0.04"; } } else { dbTaxRate = detail.m_dbTaxRate; } string dbTax = detail.m_dbTax; dbTax = (dbTax == "") ? "0.00" : dbTax; string strBuyerName = detail.m_strBuyerName; strBuyerName = (strBuyerName == "") ? " " : strBuyerName; byte[] sourceArray = Invoice.get_TypeByte(); byte[] destinationArray = new byte[0x20]; Array.Copy(sourceArray, 0, destinationArray, 0, 0x20); byte[] buffer3 = new byte[0x10]; Array.Copy(sourceArray, 0x20, buffer3, 0, 0x10); byte[] buffer4 = AES_Crypt.Encrypt(ToolUtil.GetBytes("KP" + DateTime.Now.ToString("F")), destinationArray, buffer3); object[] objArray = new object[] { strInvType, str2, Convert.ToInt32(str3) }; Fpxx fpxx = ServiceFactory.InvokePubService("Aisino.Fwkp.QueryFPXX", objArray)[0] as Fpxx; Invoice invoice = new Invoice(false, fpxx, buffer4, null); invoice.set_Hjje(fpxx.je); invoice.set_Hjse(fpxx.se); Fpxx fpData = invoice.GetFpData(); fpData.kprq = fpxx.kprq; fpData.sLv = (detail.m_dbTaxRate.Length == 0) ? "0.00" : fpxx.sLv; byte[] bytes = ToolUtil.GetBytes(MD5_Crypt.GetHashStr("Aisino.Fwkp.Invoice" + invoice.get_Fpdm() + invoice.get_Fphm())); byte[] buffer6 = new byte[0x20]; Array.Copy(bytes, 0, buffer6, 0, 0x20); byte[] buffer7 = new byte[0x10]; Array.Copy(bytes, 0x20, buffer7, 0, 0x10); byte[] inArray = AES_Crypt.Encrypt(ToolUtil.GetBytes(DateTime.Now.ToString("F")), buffer6, buffer7); fpData.gfmc = Convert.ToBase64String(AES_Crypt.Encrypt(ToolUtil.GetBytes(Convert.ToBase64String(inArray) + invoice.get_Gfmc()), buffer6, buffer7)); fpData.zfsj = str; fpData.zfbz = true; fpData.bszt = 0; return(invoice.MakeCardInvoice(fpData, true)); }