public void InsertData(List <NoReadInvStock> allRepeats) { try { if (this.csdgList.DataSource != null) { ((DataTable)this.csdgList.DataSource).Clear(); } DataTable table = new DataTable(); table.Columns.Add("CWH", typeof(string)); table.Columns.Add("FPDM", typeof(string)); table.Columns.Add("QSHM", typeof(string)); table.Columns.Add("FPZS", typeof(string)); foreach (NoReadInvStock stock in allRepeats) { DataRow row = table.NewRow(); row["CWH"] = stock.ErrNo.ToString(); row["FPDM"] = stock.InvCode; row["QSHM"] = ShareMethods.FPHMTo8Wei(stock.InvNo); row["FPZS"] = stock.Count.ToString(); table.Rows.Add(row); } this.csdgList.DataSource = table; } catch (BaseException exception) { ExceptionHandler.HandleError(exception); } catch (Exception exception2) { ExceptionHandler.HandleError(exception2); } }
public void RunCommond() { string driverVersion = this.TaxCardInstance.get_StateInfo().DriverVersion; string text1 = driverVersion.Substring(7, 2) + driverVersion.Substring(10, 6); bool flag = false; if ((this.TaxCardInstance.get_QYLX().ISPTFP || this.TaxCardInstance.get_QYLX().ISZYFP) && (1 == this.TaxCardInstance.get_StateInfo().IsLockReached)) { flag = true; } if ((this.TaxCardInstance.get_QYLX().ISHY || this.TaxCardInstance.get_QYLX().ISJDC) || (this.TaxCardInstance.get_QYLX().ISPTFPDZ || this.TaxCardInstance.get_QYLX().ISPTFPJSP)) { for (int i = 0; i < this.TaxCardInstance.get_StateInfo().InvTypeInfo.Count; i++) { if (ShareMethods.IsZCInv(this.TaxCardInstance.get_StateInfo().InvTypeInfo[i].InvType) && (1 == this.TaxCardInstance.get_StateInfo().InvTypeInfo[i].IsLockTime)) { flag = true; } } } if (flag) { MessageManager.ShowMsgBox("INP-441204", new string[] { "已到锁死期", "领取主机分配的发票" }); } else { if (!this.CheckBufferEmpty()) { if (DialogResult.Yes == MessageManager.ShowMsgBox("INP-4412B4", new string[] { "领用" })) { this.ClearBuffer(); } if (this.successList.Count > 0) { InvInfoWebgetMsg msg = new InvInfoWebgetMsg(); msg.InsertInvVolume(this.successList); msg.ShowDialog(); } this.successList.Clear(); } List <InvVolumeApp> reqList = new List <InvVolumeApp>(); AllocateDownload download = new AllocateDownload(); DialogResult result = download.ShowDialog(); if (DialogResult.OK == result) { reqList = download.reqInvList; } this.ExecuteDownloadList(reqList); if (this.successList.Count > 0) { InvInfoWebgetMsg msg2 = new InvInfoWebgetMsg(); msg2.InsertInvVolume(this.successList); msg2.ShowDialog(); } else { MessageManager.ShowMsgBox("INP-441247"); } } }
public InvInfoMsg() { this.Initialize(); this.InsertGridColumn(); this._dictFPLBBM = ShareMethods.GetFPLBBM(); this.ValidationNTxt(); }
private bool IsRightData() { try { int num = ShareMethods.StringToInt(this.lblQshm.Text.Trim()); int num2 = ShareMethods.StringToInt(this.lblZjhm.Text.Trim()); int num3 = ShareMethods.StringToInt(this.tbxCount.Text.Trim()); int num4 = (num2 - num) + 1; if (num3 <= 0) { this.tbxCount.Focus(); MessageManager.ShowMsgBox("INP-441222"); return(false); } if (num3 > num4) { this.tbxCount.Focus(); MessageManager.ShowMsgBox("INP-441223"); return(false); } } catch (BaseException exception) { this.loger.Error(exception.Message); ExceptionHandler.HandleError(exception); return(false); } catch (Exception exception2) { this.loger.Error(exception2.Message); ExceptionHandler.HandleError(exception2); return(false); } return(true); }
public bool setValue(Dictionary <string, object> dict) { try { this.lab_Fpzl.Text = "发票种类:"; this.lab_Fpdm.Text = "开票代码:"; this.lab_Fphm.Text = "发票号码:"; if (dict.Count <= 0) { base.Close(); this.loger.Error("发票种类、发票代码、发票号码传入失败。"); MessageManager.ShowMsgBox("FPCX-000022"); return(false); } if ((!dict.ContainsKey("lbl_Fpzl") || !dict.ContainsKey("lbl_Fpdm")) || !dict.ContainsKey("lbl_Fphm")) { base.Close(); this.loger.Error("发票种类、发票代码、发票号码传入失败。"); MessageManager.ShowMsgBox("FPCX-000022"); return(false); } this.lab_Fpzl.Text = (string)dict["lbl_Fpzl"]; this.lab_Fpdm.Text = (string)dict["lbl_Fpdm"]; this.lab_Fphm.Text = ShareMethods.FPHMTo8Wei(dict["lbl_Fphm"].ToString()); } catch (Exception exception) { this.loger.Error(exception.Message); } return(true); }
public AllocateInput(List <object> oSelectedItems) { this.Initialize(); foreach (object obj2 in oSelectedItems) { this.SelectedItems.Add(obj2.ToString()); } this.tbxAmountAlloc.set_RegexText("^[0-9]*$"); this.tbxAmountAlloc.MaxLength = 8; this.tbxMachineAlloc.set_RegexText("^[0-9]*$"); this.tbxMachineAlloc.MaxLength = 3; this.lblInvTypeInfo.Text = this.SelectedItems[0].ToString().Trim(); string str = Convert.ToString(ShareMethods.StringToInt(this.SelectedItems[3].ToString().Trim())); if (str.Length < 8) { str = str.PadLeft(8, '0'); } this.lblStartNumInfo.Text = str; string str2 = Convert.ToString((int)((ShareMethods.StringToInt(this.SelectedItems[3].ToString().Trim()) + ShareMethods.StringToInt(this.SelectedItems[4].ToString().Trim())) - 1)); if (str2.Length < 8) { str2 = str2.PadLeft(8, '0'); } this.lblEndNumInfo.Text = str2; this.lblStartNumAlloc.Text = str; this.tbxAmountAlloc.Text = Convert.ToString(ShareMethods.StringToInt(this.SelectedItems[4].ToString())); this.tbxMachineAlloc.Text = string.Empty; }
private void btnSyn_Click(object sender, EventArgs e) { List <InvVolumeApp> list = ShareMethods.FilterOutSpecType(base.TaxCardInstance.GetInvStock(), 0x29); List <InvVolumeApp> list2 = new List <InvVolumeApp>(); foreach (InvVolumeApp app in list) { if (this.jpxxDal.GetSpecificFormat(app).Equals(string.Empty)) { list2.Add(app); } } if (list2.Count > 0) { foreach (InvVolumeApp app2 in list2) { this.jpxxDal.InsertSingleVolumn(app2, "NEW76mmX177mm"); } } List <InvVolumeApp> invList = new List <InvVolumeApp>(); List <string> typeList = new List <string>(); this.jpxxDal.SelectVolumnList(out invList, out typeList); DataTable table = this.InitialTableData(invList, typeList); this.csdgVolumns.DataSource = table; }
protected override bool SetValid() { try { if (!GetTaxMode.GetTaxModValue()) { return(false); } if (!PopUpBox.NoIsZhu_KaiPiaoJi(GetTaxMode.GetTaxCard(), GetTaxMode.GetTaxStateInfo())) { return(ShareMethods.CheckHasDownloadAllowInvType()); } if (GetTaxMode.GetTaxCard().get_QYLX().ISTDQY) { return(false); } } catch (BaseException exception) { this.loger.Error(exception.Message); ExceptionHandler.HandleError(exception); } catch (Exception exception2) { this.loger.Error(exception2.Message); ExceptionHandler.HandleError(exception2); } return(true); }
protected override void InsertData(List <InvVolumeApp> ListModel) { try { if (base.customStyleDataGrid1.DataSource != null) { ((DataTable)base.customStyleDataGrid1.DataSource).Clear(); } if (this.CheckEmpty(ListModel)) { DataTable table = this.CreateTableHeader(); int num = 0; int yearExist = 0x7fffffff; foreach (InvVolumeApp app in ListModel) { if (((11 != app.InvType) && (0x33 != app.InvType)) && (0x29 != app.InvType)) { int number = app.Number; if (('0' != app.Status) && (number > 0)) { DataRow row = table.NewRow(); string invType = ShareMethods.GetInvType(app.InvType); row["FPZL"] = invType; row["KPXE"] = this.GetInvUpLimit(invType); row["JH"] = Convert.ToString(num++); row["LBDM"] = app.TypeCode; row["MC"] = ShareMethods.GetFPLBMC(app, base._dictFPLBBM); row["QSHM"] = ShareMethods.FPHMTo8Wei(app.HeadCode); row["SYZS"] = Convert.ToString(number); uint num4 = (app.HeadCode + app.Number) - 1; row["JZZH"] = num4.ToString().PadLeft(8, '0'); row["LGRQ"] = app.BuyDate.ToString("yyyy-MM-dd"); row["LGZS"] = app.BuyNumber.ToString(); if (app.BuyDate.Year < yearExist) { yearExist = app.BuyDate.Year; } table.Rows.Add(row); } } } base.customStyleDataGrid1.DataSource = table; this.InitializeQueryComponents(yearExist); } } catch (BaseException exception) { base._bError = true; this.loger.Error(exception.Message); ExceptionHandler.HandleError(exception); } catch (Exception exception2) { base._bError = true; this.loger.Error(exception2.Message); ExceptionHandler.HandleError(exception2); } }
public void Run() { try { if (DialogResult.OK != MessageManager.ShowMsgBox("INP-441224")) { base.Close(); } else { base.TaxCardInstance.GetStateInfo(false); int invType = -1; string deviceType = string.Empty; ChooseRevokeMedium medium = new ChooseRevokeMedium(); if (DialogResult.OK == medium.ShowDialog()) { invType = medium.GetInvType(); deviceType = medium.GetDeviceType(); } else { return; } List <InvVolumeApp> invList = base.TaxCardInstance.ReadFJNewInv(invType, deviceType); if (0 < base.TaxCardInstance.get_RetCode()) { MessageManager.ShowMsgBox(base.TaxCardInstance.get_ErrCode()); } else if ((invList == null) || (0 >= invList.Count)) { MessageManager.ShowMsgBox("INP-441225"); } else { InvInfoNewReclaimMsg msg = new InvInfoNewReclaimMsg(); msg.InsertInvVolume(invList); msg.ShowDialog(); List <InvVolumeApp> invVols = ShareMethods.FilterOutSpecType(invList, 0x29); if (invVols.Count > 0) { new SetFormat(invVols, "NEW76mmX177mm").ShowDialog(); } } base.Close(); } } catch (BaseException exception) { this.loger.Error(exception.Message); ExceptionHandler.HandleError(exception); } catch (Exception exception2) { this.loger.Error(exception2.Message); ExceptionHandler.HandleError(exception2); } }
private bool IsRightData() { try { if (this.tbxAmountAlloc.Text.Equals(string.Empty)) { this.tbxAmountAlloc.Focus(); MessageManager.ShowMsgBox("INP-441206", new string[] { "分配张数" }); return(false); } if (this.tbxMachineAlloc.Text.Equals(string.Empty)) { this.tbxMachineAlloc.Focus(); MessageManager.ShowMsgBox("INP-441206", new string[] { "分开票机号" }); return(false); } int num = ShareMethods.StringToInt(this.lblStartNumInfo.Text.Trim()); int num2 = ShareMethods.StringToInt(this.lblEndNumInfo.Text.Trim()); int num3 = ShareMethods.StringToInt(this.tbxAmountAlloc.Text.Trim()); int num4 = ShareMethods.StringToInt(this.tbxMachineAlloc.Text.Trim()); int num5 = (num2 - num) + 1; if (num3 <= 0) { this.tbxAmountAlloc.Focus(); MessageManager.ShowMsgBox("INP-441205", new string[] { "发票张数", "为1-65535内的整数" }); return(false); } if (num3 > num5) { this.tbxAmountAlloc.Focus(); MessageManager.ShowMsgBox("INP-441223"); return(false); } if ((num4 <= 0) || (num4 > 0x3e7)) { this.tbxMachineAlloc.Focus(); MessageManager.ShowMsgBox("INP-441205", new string[] { "开票机号", "为1-999内的整数" }); return(false); } } catch (BaseException exception) { this.loger.Error(exception.Message); ExceptionHandler.HandleError(exception); return(false); } catch (Exception exception2) { this.loger.Error(exception2.Message); ExceptionHandler.HandleError(exception2); return(false); } return(true); }
private bool CheckOneSystem(int type1, int type2) { if (ShareMethods.IsHXInv(type1)) { return(ShareMethods.IsHXInv(type2)); } if (!ShareMethods.IsZCInv(type1)) { return(false); } return(ShareMethods.IsZCInv(type2)); }
public bool DeleteSingleVolumn(InvVolumeApp invVolumn) { this.dict.Clear(); this.dict.Add("LBDM", invVolumn.TypeCode); this.dict.Add("JQSH", ShareMethods.GetVolumnStartNum(invVolumn)); this.dict.Add("JZZH", ShareMethods.GetVolumnEndNum(invVolumn)); if (this.baseDao.updateSQL("aisino.Fwkp.Fplygl.JPInfo.DeleteSingle", this.dict) != 1) { return(false); } return(true); }
private void EnabValidate() { try { this.OkBtn.Enabled = ShareMethods.CheckMailAddr(this.RecipientsEdit.Text.Trim()) && ShareMethods.CheckMailAddr(this.FromEdit.Text.Trim()); this.GetValue(); } catch (Exception exception) { this.loger.Error(exception.Message); } }
private bool FPTuiHui() { try { if (base._bError) { return(false); } DataGridViewRow currentRow = base.customStyleDataGrid1.CurrentRow; if ((currentRow == null) || (base.customStyleDataGrid1.RowCount <= 0)) { return(false); } base.SelectedItems.Clear(); base.SelectedItems.Add(currentRow.Cells["JH"].Value.ToString().Trim()); if (base.SelectedItems.Count <= 0) { MessageManager.ShowMsgBox("INP-441202"); return(false); } if (DialogResult.Yes == MessageManager.ShowMsgBox("INP-441213")) { InvInfoReturnMsg msg = new InvInfoReturnMsg(); msg.InsertInvVolume(currentRow); InvVolumeApp returnVolume = new InvVolumeApp { InvType = ShareMethods.GetTypeCode(currentRow.Cells["FPZL"].Value.ToString()), TypeCode = currentRow.Cells["LBDM"].Value.ToString(), HeadCode = Convert.ToUInt32(currentRow.Cells["QSHM"].Value.ToString()), Number = Convert.ToUInt16(currentRow.Cells["SYZS"].Value.ToString()) }; if (DialogResult.Yes == msg.ShowDialog()) { this.TuiHuiAction(returnVolume); } } } catch (BaseException exception) { base._bError = true; this.loger.Error(exception.Message); ExceptionHandler.HandleError(exception); return(false); } catch (Exception exception2) { base._bError = true; this.loger.Error(exception2.Message); ExceptionHandler.HandleError(exception2); return(false); } return(true); }
protected virtual string GetInvUpLimit(string strFpzl) { double minValue = double.MinValue; string str2 = strFpzl; if (str2 != null) { if (!(str2 == "增值税专用发票")) { if (str2 == "增值税普通发票") { if (!base.TaxCardInstance.get_QYLX().ISPTFP) { return(new string('-', 12)); } } else if (str2 == "机动车销售统一发票") { if (!base.TaxCardInstance.get_QYLX().ISJDC) { return(new string('-', 12)); } } else if (str2 == "货物运输业增值税专用发票") { if (!base.TaxCardInstance.get_QYLX().ISHY) { return(new string('-', 12)); } } else if (str2 == "电子增值税普通发票") { if (!base.TaxCardInstance.get_QYLX().ISPTFPDZ) { return(new string('-', 12)); } } else if ((str2 == "增值税普通发票(卷票)") && !base.TaxCardInstance.get_QYLX().ISPTFPJSP) { return(new string('-', 12)); } } else if (!base.TaxCardInstance.get_QYLX().ISZYFP) { return(new string('-', 12)); } } minValue = ShareMethods.GetUpLimit(base.TaxCardInstance.get_SQInfo(), strFpzl); return(string.Format("{0:0.00}", minValue)); }
public void RunCommond(object[] param) { string driverVersion = this.TaxCardInstance.get_StateInfo().DriverVersion; string text1 = driverVersion.Substring(7, 2) + driverVersion.Substring(10, 6); bool flag = false; this.TaxCardInstance.get_SoftVersion().Equals("FWKP_V2.0_Svr_Client"); if ((this.TaxCardInstance.get_QYLX().ISPTFP || this.TaxCardInstance.get_QYLX().ISZYFP) && (1 == this.TaxCardInstance.get_StateInfo().IsLockReached)) { flag = true; } if ((this.TaxCardInstance.get_QYLX().ISHY || this.TaxCardInstance.get_QYLX().ISJDC) || (this.TaxCardInstance.get_QYLX().ISPTFPDZ || this.TaxCardInstance.get_QYLX().ISPTFPJSP)) { for (int i = 0; i < this.TaxCardInstance.get_StateInfo().InvTypeInfo.Count; i++) { if (ShareMethods.IsZCInv(this.TaxCardInstance.get_StateInfo().InvTypeInfo[i].InvType) && (1 == this.TaxCardInstance.get_StateInfo().InvTypeInfo[i].IsLockTime)) { flag = true; } } } if (flag) { this.errorOccur = true; this.errCode = "L001"; this.errMessage = "已到锁死期,无法领取主机分配的发票"; } else if (!this.errorOccur) { if (!this.CheckBufferEmpty()) { byte fplx = Convert.ToByte(param[0].ToString()); this.ClearBuffer(fplx); if (this.errorOccur) { return; } } List <InvVolumeApp> reqList = new List <InvVolumeApp>(); InvVolumeApp item = new InvVolumeApp { InvType = Convert.ToByte(param[0].ToString()), TypeCode = param[1].ToString(), HeadCode = Convert.ToUInt32(param[2].ToString()), Number = Convert.ToUInt16(param[3].ToString()) }; reqList.Add(item); this.ExecuteDownloadList(reqList); } }
protected override void RunCommand() { try { string driverVersion = Tool.Instance().GetDriverVersion(); string softVersion = Tool.Instance().GetSoftVersion(); string str3 = driverVersion.Substring(7, 2) + driverVersion.Substring(10, 6); if (softVersion.Equals("FWKP_V2.0_Svr_Client")) { if (str3.CompareTo("A0150729") < 0) { MessageManager.ShowMsgBox("INP-441291"); return; } } else if (str3.CompareTo("L0110501") < 0) { MessageManager.ShowMsgBox("INP-441291"); return; } if (ShareMethods.ApplyAdminCheck("申领撤销")) { if (ApplyCommon.GetAdminType().Equals("CTAIS2.0")) { MessageManager.ShowMsgBox("INP-4412AK", new string[] { "撤销" }); } else { bool dataExist = false; ApplySuccessRevoke revoke = new ApplySuccessRevoke(out dataExist); if (dataExist) { revoke.ShowDialog(); } } } } catch (BaseException exception) { this.loger.Error(exception.Message); ExceptionHandler.HandleError(exception); } catch (Exception exception2) { this.loger.Error(exception2.Message); ExceptionHandler.HandleError(exception2); } }
public string GetSpecificFormat(InvVolumeApp invVolume) { this.dict.Clear(); this.dict.Add("LBDM", invVolume.TypeCode); this.dict.Add("JQSH", ShareMethods.GetVolumnStartNum(invVolume)); this.dict.Add("JZZH", ShareMethods.GetVolumnEndNum(invVolume)); DataTable table = this.baseDao.querySQLDataTable("aisino.Fwkp.Fplygl.JPInfo.GetSpecificFormat", this.dict); string str = string.Empty; if ((table != null) && (table.Rows.Count > 0)) { DataRow row = table.Rows[0]; str = row["JPGG"].ToString(); } return(str); }
private void InitializeFormatColumn() { this.JPGG = new DataGridViewComboBoxColumn(); this.JPGG.HeaderText = "卷票规格"; this.JPGG.Name = "JPGG"; this.JPGG.DataPropertyName = "JPGG"; this.JPGG.FillWeight = 26f; string key = string.Empty; string str2 = string.Empty; DataTable formatTable = ShareMethods.GetFormatTable(out key, out str2); this.JPGG.DisplayMember = key; this.JPGG.ValueMember = str2; this.JPGG.DataSource = formatTable; this.JPGG.ReadOnly = false; }
private DataTable InitialTableData(List <InvVolumeApp> invVols, List <string> formats) { DataTable table = this.CreateTableHeader(); for (int i = 0; i < invVols.Count; i++) { DataRow row = table.NewRow(); row["LBDM"] = invVols[i].TypeCode; row["JQSH"] = Convert.ToString(ShareMethods.GetVolumnStartNum(invVols[i])).PadLeft(8, '0'); row["JZZH"] = Convert.ToString(ShareMethods.GetVolumnEndNum(invVols[i])).PadLeft(8, '0'); row["LGZS"] = invVols[i].BuyNumber.ToString(); row["LGRQ"] = invVols[i].BuyDate.ToString("yyyy-MM-dd"); row["JPGG"] = formats[i]; table.Rows.Add(row); } return(table); }
private void InsertData(List <InvVolumeApp> ListModel) { try { if (this.csdgList.DataSource != null) { ((DataTable)this.csdgList.DataSource).Clear(); } if ((ListModel == null) || (ListModel.Count <= 0)) { MessageManager.ShowMsgBox("INP-441242"); } else { DataTable table = new DataTable(); table.Columns.Add("xz", typeof(bool)); table.Columns.Add("fpzl", typeof(string)); table.Columns.Add("fpdm", typeof(string)); table.Columns.Add("qshm", typeof(string)); table.Columns.Add("fpzs", typeof(string)); foreach (InvVolumeApp app in ListModel) { DataRow row = table.NewRow(); row["xz"] = true; row["fpzl"] = ShareMethods.GetInvType(app.InvType); row["fpdm"] = app.TypeCode; row["qshm"] = ShareMethods.FPHMTo8Wei(app.HeadCode); row["fpzs"] = Convert.ToString(app.Number); table.Rows.Add(row); } this.csdgList.DataSource = table; this.btnFpxz.Enabled = true; } } catch (BaseException exception) { this.loger.Error(exception.Message); ExceptionHandler.HandleError(exception); } catch (Exception exception2) { this.loger.Error(exception2.Message); ExceptionHandler.HandleError(exception2); } }
public DrxgfpFromCard() { try { this.Initialize(); this._dictFPLBBM = ShareMethods.GetFPLBBM(); } catch (BaseException exception) { this.loger.Error(exception.Message); ExceptionHandler.HandleError(exception); } catch (Exception exception2) { this.loger.Error(exception2.Message); ExceptionHandler.HandleError(exception2); } }
public bool InsertSingleVolumn(InvVolumeApp invVolumn, string formatCode) { this.dict.Clear(); this.dict.Add("LBDM", invVolumn.TypeCode); this.dict.Add("JQSH", ShareMethods.GetVolumnStartNum(invVolumn)); this.dict.Add("JZZH", ShareMethods.GetVolumnEndNum(invVolumn)); this.dict.Add("LGZS", invVolumn.BuyNumber); this.dict.Add("QSHM", invVolumn.HeadCode); this.dict.Add("SYZS", invVolumn.Number); this.dict.Add("KPXE", 0); this.dict.Add("LGRQ", invVolumn.BuyDate); this.dict.Add("JPGG", formatCode); if (this.baseDao.updateSQL("aisino.Fwkp.Fplygl.JPInfo.InsertSingle", this.dict) != 1) { return(false); } return(true); }
public SetFormat(List <InvVolumeApp> invVols, string defaultFormat = "NEW76mmX177mm") { this.jpxxDal = BLLFactory.CreateInstant <ILYGL_JPXX>("LYGL_JPXX"); this.InitializeWindow(); this.Text = "增值税普通发票(卷票)规格设置"; this.btnSetUpdate.Text = "设置"; this.btnSyn.Visible = false; DataTable table = this.CreateTableHeader(); foreach (InvVolumeApp app in invVols) { DataRow row = table.NewRow(); row["LBDM"] = app.TypeCode; row["JQSH"] = Convert.ToString(ShareMethods.GetVolumnStartNum(app)).PadLeft(8, '0'); row["JZZH"] = Convert.ToString(ShareMethods.GetVolumnEndNum(app)).PadLeft(8, '0'); row["LGZS"] = app.BuyNumber.ToString(); row["LGRQ"] = app.BuyDate.ToString("yyyy-MM-dd"); row["JPGG"] = defaultFormat; table.Rows.Add(row); } this.csdgVolumns.DataSource = table; }
/// <summary> /// 对应 FaPiaoZuoFei_WeiKai 的 ZuoFeiMainFunction 方法 /// </summary> private BaseResult DoWeiKaiZuoFei(WeiKaiChaXunResult fpInfo) { int zuoFeiNum = _args.Count; try { int num = 0; int num2 = 0; int num3 = 0x1770; List <Fpxx> FpList = new List <Fpxx>(); FaPiaoZuoFei_WeiKai form = new FaPiaoZuoFei_WeiKai(); for (int i = 0; i < zuoFeiNum; i++) { string dbfpzl = form.GetInvoiceType(CommonMethods.ParseFplx(_args.FpType)).dbfpzl; string str3 = fpInfo.Fpdm; string str4 = ShareMethods.FPHMTo8Wei(fpInfo.InvNum); string str5 = form.IsEmpty_DengYu(form.TaxCardInstance.Address) + " " + form.TaxCardInstance.Telephone; string str6 = form.IsEmpty_DengYu(form.TaxCardInstance.BankAccount); string title = "正在作废发票代码:" + str3 + "发票号码:" + str4; object[] param = new object[] { dbfpzl, str3, str4, DingYiZhiFuChuan1._UserMsg.MC, str5, str6 }; Fpxx item = form.BlankWasteTaxCardZuoFei(param); if ((item == null) || !(item.retCode == "0000")) { break; } FpList.Add(item); num++; } form.xxfpChaXunBll.SaveXxfp(FpList); num2 = zuoFeiNum - num; return(new CountableResult(_args, zuoFeiNum, num, num2)); //MessageManager.ShowMsgBox("FPZF-000010", new string[] { ZuoFeiNum.ToString(), num.ToString(), num2.ToString() }); } catch (Exception exception) { //this.loger.Error("[ZuoFeiMainFunction函数异常]" + exception.ToString()); return(new BaseResult(_args, new ErrorBase($"错误类型:{exception.GetType()} || 错误信息:{exception.Message}"))); } }
public XfkpjfpfpForm(List <object> oSelectedItems) { try { this.Initialize(); foreach (object obj2 in oSelectedItems) { this.SelectedItems.Add(obj2.ToString()); } this.tbxCount.set_RegexText("^[0-9]*$"); this.tbxCount.MaxLength = 9; string str = Convert.ToString(ShareMethods.StringToInt(this.SelectedItems[4].ToString().Trim())); if (str.Length < 8) { str = str.PadLeft(8, '0'); } this.lblQshm.Text = str; string str2 = Convert.ToString((int)((ShareMethods.StringToInt(this.SelectedItems[4].ToString().Trim()) + ShareMethods.StringToInt(this.SelectedItems[5].ToString().Trim())) - 1)); if (str2.Length < 8) { str2 = str2.PadLeft(8, '0'); } this.lblZjhm.Text = str2; this.lblFpqshm.Text = str; this.tbxCount.Text = Convert.ToString(ShareMethods.StringToInt(this.SelectedItems[5].ToString())); } catch (BaseException exception) { this.loger.Error(exception.Message); ExceptionHandler.HandleError(exception); } catch (Exception exception2) { this.loger.Error(exception2.Message); ExceptionHandler.HandleError(exception2); } }
protected override void RunCommand() { try { string driverVersion = Tool.Instance().GetDriverVersion(); string softVersion = Tool.Instance().GetSoftVersion(); string str3 = driverVersion.Substring(7, 2) + driverVersion.Substring(10, 6); if (softVersion.Equals("FWKP_V2.0_Svr_Client")) { if (str3.CompareTo("A0150729") < 0) { MessageManager.ShowMsgBox("INP-441291"); return; } } else if (str3.CompareTo("L0110501") < 0) { MessageManager.ShowMsgBox("INP-441291"); return; } if (ShareMethods.ApplyAdminCheck("申领状态查询")) { new CheckApply(ApplyCommon.GetAdminType().Equals("JS")).ShowDialog(); } } catch (BaseException exception) { this.loger.Error(exception.Message); ExceptionHandler.HandleError(exception); } catch (Exception exception2) { this.loger.Error(exception2.Message); ExceptionHandler.HandleError(exception2); } }
public void InsertInvVolume(List <InvVolumeApp> invList) { InvSQInfo invUpLimit = base.TaxCardInstance.get_SQInfo(); int num = 0; DataTable table = this.CreateTableHeader(); foreach (InvVolumeApp app in invList) { num = 0; DataRow row = table.NewRow(); string invType = ShareMethods.GetInvType(app.InvType); row[this.strHead[num++]] = invType; double upLimit = ShareMethods.GetUpLimit(invUpLimit, invType); row[this.strHead[num++]] = Convert.ToString(upLimit); row[this.strHead[num++]] = app.TypeCode; row[this.strHead[num++]] = ShareMethods.GetFPLBMC(app, this._dictFPLBBM); row[this.strHead[num++]] = ShareMethods.FPHMTo8Wei(app.HeadCode); int number = app.Number; row[this.strHead[num++]] = Convert.ToString(number); row[this.strHead[num++]] = app.BuyDate.ToString("yyyy-MM-dd"); table.Rows.Add(row); } this.dgInvInfo.DataSource = table; }
private string GenDownloadXML() { XmlDocument document = new XmlDocument(); document.CreateXmlDeclaration("1.0", "GBK", "yes"); XmlDeclaration newChild = document.CreateXmlDeclaration("1.0", "GBK", null); document.AppendChild(newChild); System.Xml.XmlNode node = document.CreateElement("FPXT"); System.Xml.XmlNode node2 = document.CreateElement("INPUT"); System.Xml.XmlNode node3 = document.CreateElement("NSRSBH"); node3.InnerText = base.TaxCardInstance.TaxCode; System.Xml.XmlNode node4 = document.CreateElement("JSPH"); node4.InnerText = base.TaxCardInstance.GetInvControlNum(); System.Xml.XmlNode node5 = document.CreateElement("KPJH"); node5.InnerText = base.TaxCardInstance.Machine.ToString(); System.Xml.XmlNode node6 = document.CreateElement("FPDM"); node6.InnerText = this.txt_fpdm.Text.Trim(); System.Xml.XmlNode node7 = document.CreateElement("FPHM"); node7.InnerText = ShareMethods.FPHMTo8Wei(this.txt_fphm.Text.Trim()); System.Xml.XmlNode node8 = document.CreateElement("KPRQ"); System.Xml.XmlNode node10 = document.CreateElement("FPLX"); string str = ""; this.cmb_fpzl.DropDownStyle = ComboBoxStyle.DropDownList; if (this.cmb_fpzl.SelectedIndex == 0) { str = "01"; } else if (this.cmb_fpzl.SelectedIndex == 1) { str = "02"; } else if (this.cmb_fpzl.SelectedIndex == 2) { str = "03"; } else if (this.cmb_fpzl.SelectedIndex == 3) { str = "04"; } node10.InnerText = str; node8.InnerText = ""; if (this.data_kprq.Checked) { DateTime time1 = this.data_kprq.Value; node8.InnerText = this.data_kprq.Value.ToString("yyyyMMdd"); } System.Xml.XmlNode node9 = document.CreateElement("XFSH"); node9.InnerText = ""; document.AppendChild(node); node.AppendChild(node2); node2.AppendChild(node3); node2.AppendChild(node4); node2.AppendChild(node5); node2.AppendChild(node6); node2.AppendChild(node7); node2.AppendChild(node8); node2.AppendChild(node9); node2.AppendChild(node10); if (((this.txt_fpdm.Text.Length != 0) && (this.txt_fphm.Text.Length != 0)) && ((str.Length != 0) && this.data_kprq.Checked)) { int result = 0; if ((this.txt_fphm.Text.Length <= 8) && int.TryParse(this.txt_fphm.Text.ToString(), out result)) { return(document.InnerXml); } } return(null); }