protected override void RunCommand() { try { bMainExit = false; if ((fpcx != null) && fpcx.HasShow()) { fpcx.Dispose(); fpcx.Close(); fpcx = null; } SelectMonth.IsChaxun = true; DateTime cardClock = TaxCardFactory.CreateTaxCard().GetCardClock(); fpcx = base.ShowForm <FaPiaoChaXunShow>() as FaPiaoChaXunShow; fpcx.TabText = "选择发票号码查询"; fpcx.Text = "选择发票号码查询"; fpcx.Month = cardClock.Month; fpcx.Year = cardClock.Year; fpcx.Edit(Aisino.Fwkp.Fpkj.Form.FPCX.FaPiaoChaXun.EditFPCX.ChaXun); } catch (Exception exception) { this.loger.Error(exception.ToString()); } }
public BaseForm RunCommand() { try { bMainExit = false; if ((fpcx == null) || !fpcx.HasShow()) { dlgSelectMonth = new SelectMonth(); if (DialogResult.OK == dlgSelectMonth.ShowDialog()) { int month = dlgSelectMonth.Month; int year = dlgSelectMonth.Year; FaPiaoChaXun.CardClock = dlgSelectMonth.CardClock; fpcx = new FaPiaoChaXunShow(); if (fpcx == null) { return(null); } fpcx.TabText = "选择发票号码查询"; fpcx.Text = "选择发票号码查询"; fpcx.Month = month; fpcx.Year = year; fpcx.Edit(FaPiaoChaXun.EditFPCX.ChaXun); fpcx.Closing += new CancelEventHandler(this.fpcx_Closing); FormMain.ExecuteBeforeExitEvent += runexit; return(fpcx); } } return(null); } catch (Exception exception) { this.loger.Error(exception.Message); return(null); } }