private void btnOK2_Click(object sender, EventArgs e) { try { PropValue.IsJiaoYan = this.checkBox_JiaoYan.Checked; int result = 0; int num2 = 0; string s = "0"; string str2 = ""; string str3 = this.comboBoxYF.Text.Trim(); if (str3 != "0") { string[] strArray = str3.Split(new char[] { '-' }); if (strArray.Length == 2) { str2 = strArray[0].Trim(); s = strArray[1].Trim(); } } bool flag = int.TryParse(s, out result); bool flag2 = int.TryParse(str2, out num2); string dJmonth = result.ToString(); string dJYear = ""; if (num2 != 0) { dJYear = num2.ToString(); } string dJtype = this.comboBoxDJZL.SelectedValue.ToString(); switch (dJtype) { case "a": case "c": case "s": { TaxCard taxCard = TaxCardFactory.CreateTaxCard(); if (!this.CanXTInv(taxCard)) { MessageManager.ShowMsgBox("INP-242132"); return; } break; } } AisinoDataSet set = new DJXGdal().QueryXSDJ(dJYear, dJmonth, dJtype); if ((dJmonth != "0") && (set.get_Data().Rows.Count == 0)) { MessageManager.ShowMsgBox("没有符合条件的数据"); } else { this.billBL.XGDJZL = dJtype; new DJXG(dJYear, dJmonth, dJtype, this.checkBox_JiaoYan.Checked).ShowDialog(); base.Close(); } } catch (Exception exception) { HandleException.HandleError(exception); } }
protected override bool SetValid() { try { bool flag3; bool iSPTFP; TaxCard card = TaxCardFactory.CreateTaxCard(); if (card.get_StateInfo().CompanyType == 0) { flag3 = (WbjkEntry.RegFlag_JT || WbjkEntry.RegFlag_ST) || WbjkEntry.RegFlag_KT; iSPTFP = card.get_QYLX().ISPTFP; return(flag3 && iSPTFP); } flag3 = (WbjkEntry.RegFlag_JT || WbjkEntry.RegFlag_ST) || WbjkEntry.RegFlag_KT; iSPTFP = card.get_QYLX().ISPTFP; return(flag3 && iSPTFP); } catch (BaseException exception) { ExceptionHandler.HandleError(exception); } catch (Exception exception2) { ExceptionHandler.HandleError(exception2); } return(true); }
public ServerUP() { this.string_0 = "0000"; this.ibaseDAO_0 = BaseDAOFactory.GetBaseDAOSQLite(); this.class84_0 = new Class84(); this.taxCard_0 = TaxCard.CreateInstance(CTaxCardType.const_7); }
public bool CanUseThisSPFLBM(string bm, bool isSPBMSel, bool isXTSP) { Dictionary <string, object> dictionary = new Dictionary <string, object>(); dictionary.Add("bm", bm); TaxCard card = TaxCardFactory.CreateTaxCard(); if (card.QYLX.ISDXQY && isSPBMSel) { dictionary.Add("DXQY", 1); } else { dictionary.Add("DXQY", 0); } if (card.QYLX.ISXT) { dictionary.Add("XTQY", 1); } else { dictionary.Add("XTQY", 0); } dictionary.Add("XTSP", isXTSP ? 1 : 0); return(this.baseDAO.querySQLDataTable("aisino.Fwkp.Bmgl.BMSPFL.CanUseThisSPFLBM", dictionary).Rows.Count >= 1); }
public static bool HasAuthorizationWithCode(string typeCode) { TaxCard card = TaxCardFactory.CreateTaxCard(); switch (typeCode) { case "0": return(card.get_QYLX().ISZYFP); case "2": return(card.get_QYLX().ISPTFP); case "005": return(card.get_QYLX().ISJDC); case "009": return(card.get_QYLX().ISHY); case "025": return(card.get_QYLX().ISPTFPJSP); case "026": return(card.get_QYLX().ISPTFPDZ); } return(false); }
public static void smethod_4() { try { if (Class87.list_1.Count >= 1) { IBaseDAO baseDAOSQLite = BaseDAOFactory.GetBaseDAOSQLite(); new Dictionary <string, string>(); TaxCard.CreateInstance(CTaxCardType.const_7); List <string> list = new List <string>(); for (int i = 0; i < Class87.list_1.Count; i++) { if (Class87.list_1[i].ContainsKey("BSRZ")) { list.Add("Aisino.Framework.MainForm.UpDown.UpdateBSRZ"); Class87.list_1[i]["BSRZ"] = "【" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "】" + Class87.list_1[i]["BSRZ"].ToString(); if (Class87.list_1[i]["BSRZ"].ToString().Length > 0xc3) { Class87.list_1[i]["BSRZ"] = Class87.list_1[i]["BSRZ"].ToString().Substring(0, 0xc3); } } } if (baseDAOSQLite.未确认DAO方法1(list.ToArray(), Class87.list_1) > 0) { Class87.list_1.Clear(); } } } catch (Exception exception) { Class101.smethod_1("(下载线程)更改发票报送日志出错:" + exception.ToString()); } }
public string[] GetCurrent(FPLX fplx) { string str = ""; try { TaxCard card = TaxCardFactory.CreateTaxCard(); int num = int.Parse(Enum.Format(typeof(FPLX), fplx, "d")); InvCodeNum currentInvCode = card.GetCurrentInvCode(fplx); if ((currentInvCode.InvTypeCode == null) || (currentInvCode.InvNum == null)) { str = card.get_ErrCode(); if (str.StartsWith("TCD_768") || str.StartsWith("TCD_769")) { FormMain.CallUpload(); } return(null); } if (currentInvCode.InvTypeCode.Equals("0000000000")) { str = "INP-242104"; return(null); } str = "000000"; return(new string[] { currentInvCode.InvTypeCode, currentInvCode.InvNum }); } catch (Exception exception) { this.log.Error("读取当前发票代码号码时异常:" + exception.ToString()); str = "9999"; return(null); } }
private void SelectFPJRow() { if (this.FPJ.SelectedRows.Count > 0) { DataGridViewRow row = this.FPJ.SelectedRows[0]; fpdmhm[0] = row.Cells["LBDM"].Value.ToString(); fpdmhm[1] = row.Cells["QSHM"].Value.ToString(); TaxCard card = TaxCardFactory.CreateTaxCard(); string str = string.Empty; if (this.mfplx == 0x29) { str = card.SetInvVols(0x29, fpdmhm[0], fpdmhm[1]); } else if (this.mfplx == 2) { str = card.SetInvVols(2, fpdmhm[0], fpdmhm[1]); } if (ToolUtil.GetReturnErrCode(str) != 0) { MessageManager.ShowMsgBox(str); } base.DialogResult = DialogResult.OK; } else { MessageManager.ShowMsgBox("至少选择一卷发票"); } }
protected override void RunCommand() { TaxCard taxCard = TaxCardFactory.CreateTaxCard(); new InvSplitPara().GetInvSplitPara(InvType.Special); SPFLService service = new SPFLService(); if (CommonTool.isSPBMVersion() && (service.GetMaxBMBBBH() == "0.0")) { MessageBox.Show("商品和服务税收分类编码表为空,请先更新商品和服务税收分类编码表后,再开具发票!"); } else { GenerateFP efp = new GenerateFP(InvType.Special); string code = ""; if (!efp.CanInvoice(0, out code)) { MessageManager.ShowMsgBox(code); } else if (!this.CanXTInv(taxCard)) { MessageManager.ShowMsgBox("INP-242132"); } else { efp.ShowDialog(); } } }
protected override bool SetValid() { try { TaxCard card = TaxCardFactory.CreateTaxCard(); bool iSPTFP = card.get_QYLX().ISPTFP; bool flag2 = card.get_StateInfo().CompanyType != 0; bool flag3 = false; if (!flag2) { flag3 = false; } else if (true) { if (WbjkEntry.RegFlag_JS) { flag3 = false; } if ((WbjkEntry.RegFlag_JT || WbjkEntry.RegFlag_KT) || WbjkEntry.RegFlag_ST) { flag3 = true; } } return(flag3 && iSPTFP); } catch (BaseException exception) { ExceptionHandler.HandleError(exception); } catch (Exception exception2) { ExceptionHandler.HandleError(exception2); } return(true); }
public static bool NoHaveFen_KaiPiaoJi(TaxCard taxcard, TaxStateInfo taxStateInfo) { try { if (taxStateInfo.IsWithChild == 0) { return(false); } if (0 >= taxStateInfo.MachineNumber) { return(false); } } catch (BaseException exception) { loger.Error(exception.Message); ExceptionHandler.HandleError(exception); return(false); } catch (Exception exception2) { loger.Error(exception2.Message); ExceptionHandler.HandleError(exception2); return(false); } return(true); }
public static RegFileSetupResult SetupRegFile(List <string> files, TaxCard taxCard_1) { RegFileSetupResult result = SetupRegFile(taxCard_1); RegFileSetupResult result2 = new RegFileSetupResult(result); for (int i = result.NormalRegFiles.Count - 1; i >= 0; i--) { if (!files.Contains(result.NormalRegFiles[i].FileName)) { result2.NormalRegFiles.RemoveAt(i); } } for (int j = result.OutOfDateRegFiles.Count - 1; j >= 0; j--) { if (!files.Contains(result.OutOfDateRegFiles[j].FileName)) { result2.OutOfDateRegFiles.RemoveAt(j); } } for (int k = result.InvalidRegFiles.Count - 1; k >= 0; k--) { if (!files.Contains(result.InvalidRegFiles[k].FileName)) { result2.InvalidRegFiles.RemoveAt(k); } } return(result2); }
private void SelectFPJRow() { if (this.FPJ.SelectedRows.Count > 0) { DataGridViewRow row = this.FPJ.SelectedRows[0]; fpdmhm[0] = row.Cells["LBDM"].Value.ToString(); fpdmhm[1] = row.Cells["QSHM"].Value.ToString(); int num = int.Parse(row.Cells["FPZS"].Value.ToString()); endnum = (int.Parse(fpdmhm[1]) + num) - 1; TaxCard card = TaxCardFactory.CreateTaxCard(); string str = string.Empty; if ((int)this.mfplx == 0x29) { str = card.SetInvVols((InvoiceType)0x29, fpdmhm[0], fpdmhm[1]); } else if ((int)this.mfplx == 2) { str = card.SetInvVols((InvoiceType)2, fpdmhm[0], fpdmhm[1]); } //逻辑修改 if (!InternetWare.Config.Constants.IsTest) { if (ToolUtil.GetReturnErrCode(str) != 0) { MessageManager.ShowMsgBox(str); } } base.DialogResult = DialogResult.OK; } else { MessageManager.ShowMsgBox("至少选择一卷发票"); } }
public static bool MakeExportedRegFile(string string_0, TaxCard taxCard_1) { try { if (taxCard_1.TaxMode == CTaxCardMode.tcmHave) { RegFileInfo regFileInfo = GetRegFileInfo(string_0, taxCard_1); if ((regFileInfo != null) && regFileInfo.CheckedOk) { byte[] buffer = new byte[0x10]; for (int i = 0; i < buffer.Length; i++) { buffer[i] = (byte)i; } return(Xihaa.MakeTransFile(regFileInfo.FileName, buffer) == 0); } } return(false); } catch (Exception exception) { ilog_0.Error(exception.Message); return(false); } }
protected override void RunCommand() { TaxCard taxCard = TaxCardFactory.CreateTaxCard(); InvSplitPara para = new InvSplitPara(); para.GetInvSplitPara(InvType.Common); bool flag = taxCard.get_StateInfo().CompanyType != 0; if (para.ShowSetForm && flag) { GenerateInvSetForm form2 = new GenerateInvSetForm(InvType.Common) { NCPBZ = 1 }; form2.ShowDialog(); } else { GenerateFP efp = new GenerateFP(InvType.Common, 1); string code = ""; if (!efp.CanInvoice(2, out code)) { MessageManager.ShowMsgBox(code); } else if (!this.CanXTInv(taxCard)) { MessageManager.ShowMsgBox("INP-242132"); } else { efp.ShowDialog(); } } }
protected override bool SetValid() { TaxCard card = TaxCardFactory.CreateTaxCard(); string str = PropertyUtil.GetValue("HandMade", "0"); return((((int)card.TaxMode == 2) && card.QYLX.ISZYFP) && (str == "0")); }
public DataTable AppendByKey(string KeyWord, int TopNo, bool isSPBMSel) { Dictionary <string, object> dictionary = new Dictionary <string, object>(); dictionary.Add("key", "%" + KeyWord + "%"); dictionary.Add("TopNo", TopNo); TaxCard card = TaxCardFactory.CreateTaxCard(); if (card.QYLX.ISDXQY && isSPBMSel) { dictionary.Add("DXQY", "true"); } else { dictionary.Add("DXQY", "false"); } if (card.QYLX.ISXT) { dictionary.Add("XTQY", "true"); } else { dictionary.Add("XTQY", "false"); } DataTable table = this.baseDAO.querySQLDataTable("aisino.Fwkp.Bmgl.BMSPFL.SPFLqueryKeyAppend", dictionary); if (KeyWord.Trim().Length == 0) { table.Rows.Clear(); } return(table); }
protected override object[] doService(object[] param) { object[] objArray = new object[] { false }; if (param.Length == 1) { FPLX fplx = Invoice.ParseFPLX(param[0].ToString()); InvoiceType type = (InvoiceType)2; TaxCard card = TaxCardFactory.CreateTaxCard(); if (((int)fplx != 0x29) && ((int)fplx != 2)) { return(objArray); } if ((int)fplx == 0x29) { type = (InvoiceType)0x29; } card.GetCurrentInvCode(type); if (card.RetCode != 0) { MessageManager.ShowMsgBox(card.ErrCode); objArray[0] = false; return(objArray); } if (new JSFPJSelect(fplx).ShowDialog() == DialogResult.OK) { objArray[0] = true; } } return(objArray); }
protected override bool SetValid() { try { bool flag = false; TaxCard card = TaxCardFactory.CreateTaxCard(); bool iSZYFP = card.get_QYLX().ISZYFP; if (card.get_StateInfo().CompanyType == 0) { flag = false; } else { flag = false; } return(false); } catch (BaseException exception) { ExceptionHandler.HandleError(exception); } catch (Exception exception2) { ExceptionHandler.HandleError(exception2); } return(true); }
static RegisterManager() { FilterTaxCode = null; taxCard_0 = TaxCardFactory.CreateTaxCard(); ilog_0 = LogUtil.GetLogger <RegisterManager>(); dictionary_0 = new Dictionary <string, RegFileInfo>(); errCode = "0000"; }
protected IPrint() { this.taxCard_0 = TaxCard.CreateInstance(CTaxCardType.tctAddedTax); this.ZYFPLX = ""; this.loger = LogUtil.GetLogger <IPrint>(); this._isPrint = "0002"; this.aisinoPrint = new AisinoPrint(); }
protected override void RunCommand() { SPFLService service; TaxCard taxCard = TaxCardFactory.CreateTaxCard(); InvSplitPara para = new InvSplitPara(); para.GetInvSplitPara(InvType.Common); bool flag = taxCard.get_StateInfo().CompanyType != 0; if (para.ShowSetForm && flag) { service = new SPFLService(); if (CommonTool.isSPBMVersion() && (service.GetMaxBMBBBH() == "0.0")) { MessageBox.Show("商品和服务税收分类编码表为空,请先更新商品和服务税收分类编码表后,再开具发票!"); } else { GenerateInvSetForm form2 = new GenerateInvSetForm(InvType.Common) { NCPBZ = 2 }; form2.ShowDialog(); } } else { service = new SPFLService(); if (CommonTool.isSPBMVersion() && (service.GetMaxBMBBBH() == "0.0")) { MessageBox.Show("商品和服务税收分类编码表为空,请先更新商品和服务税收分类编码表后,再开具发票!"); } else { GenerateFP efp = new GenerateFP(InvType.Common, 2); string code = ""; if (!efp.CanInvoice(2, out code)) { MessageManager.ShowMsgBox(code); } else if (!this.CanXTInv(taxCard)) { MessageManager.ShowMsgBox("INP-242132"); } else { JSFPJSelect select = new JSFPJSelect(2); if (select.ShowDialog() == DialogResult.OK) { if (efp.GetCurrent(0x29) != null) { } efp.ShowDialog(); } } } } }
protected override bool SetValid() { TaxCard card = TaxCardFactory.CreateTaxCard(); bool flag = card.QYLX.ISPTFP && card.QYLX.ISNCPSG; FpManager manager = new FpManager(); string str = PropertyUtil.GetValue("HandMade", "0"); return(((((int)card.TaxMode == 2) & flag) && !manager.IsSWDK()) && (str == "0")); }
protected override bool SetValid() { TaxCard card1 = TaxCardFactory.CreateTaxCard(); bool iSJDC = card1.QYLX.ISJDC; FpManager manager = new FpManager(); string str = PropertyUtil.GetValue("HandMade", "0"); return(((((int)card1.TaxMode == 2) & iSJDC) && !manager.IsSWDK()) && (str == "0")); }
private static RegFileInfo smethod_3(string string_0, TaxCard taxCard_1) { DateTime time; if (taxCard_1 == null) { taxCard_1 = taxCard_0; } else { taxCard_0 = taxCard_1; } string taxCode = taxCard_1.TaxCode; if (((taxCard_1.TaxCode.Length > 15) && (SetupOrgCode != null)) && (SetupOrgCode.Length > 0)) { taxCode = taxCode + SetupOrgCode; } string b = taxCard_1.TaxCode; if ((taxCard_1.CorpCode != null) && (taxCard_1.CorpCode.Length >= 15)) { b = taxCard_1.TaxCode.Substring(0, 6) + taxCard_1.CorpCode.Substring(6, 9); } qwe qwe = new qwe(); taxCard_1.GetCardClock(out time, 0); if (Xihaa.abc(string_0, taxCode, (ushort)taxCard_1.Machine, time.ToString("yyyyMMdd"), ref qwe) == 0) { RegFileInfo info = new RegFileInfo(string_0, qwe, new FileInfo(string_0).LastWriteTime); string a = new string(info.FileContent.TaxCode); string str2 = a; if (a.StartsWith("50")) { a = "91" + a.Substring(2); } if (((!string.Equals(str2, taxCard_1.CompressCode) && !string.Equals(a, taxCard_1.CompressCode)) && (!string.Equals(a, b) && !string.Equals(a, taxCard_1.CorpCode))) && !string.Equals(a, taxCard_1.TaxCode)) { ilog_0.DebugFormat("文件原始税号={0},压缩税号={1};变换后税号1={2},变换后税号2={3};CorpCode税号={4},TaxCode税号={5};", new object[] { str2, taxCard_1.CompressCode, a, b, taxCard_1.CorpCode, taxCard_1.TaxCode }); info.ErrCode = "910103"; return(info); } if (taxCard_1.Machine != info.FileContent.BranchNo) { ilog_0.DebugFormat("开票机号={0},文件开票机号={1}", taxCard_1.Machine, info.FileContent.BranchNo); info.ErrCode = "910104"; return(info); } info.ErrCode = "0000"; return(info); } return(new RegFileInfo(string_0, qwe, new FileInfo(string_0).LastWriteTime) { ErrCode = "910101" }); }
public static bool HasHxAuthorization() { TaxCard card = TaxCardFactory.CreateTaxCard(); if (!card.get_QYLX().ISZYFP) { return(card.get_QYLX().ISPTFP); } return(true); }
private bool _Check(GenerateFP generateFP) { TaxCard taxCard = TaxCardFactory.CreateTaxCard(); if (!this.CanXTInv(taxCard)) { MessageManager.ShowMsgBox("INP-242132"); return false; } return true; }
public static bool HasZcAuthorization() { TaxCard card = TaxCardFactory.CreateTaxCard(); if ((!card.get_QYLX().ISJDC&& !card.get_QYLX().ISHY) && !card.get_QYLX().ISPTFPDZ) { return(card.get_QYLX().ISPTFPJSP); } return(true); }
protected override bool SetValid() { TaxCard card = TaxCardFactory.CreateTaxCard(); if (!card.get_QYLX().ISZYFP) { bool iSZYFP = card.get_QYLX().ISZYFP; } return(card.get_TaxMode() == 2); }
public static bool isCEZS() { bool flag = false; TaxCard card = TaxCardFactory.CreateTaxCard(); if ((card.GetExtandParams("CEBTVisble") != null) && (card.GetExtandParams("CEBTVisble") == "1")) { flag = true; } return(flag); }