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); } }
private void btnOK_Click(object sender, EventArgs e) { try { PropValue.IsJiaoYan = this.checkBox_JiaoYan.Checked; int result = 0; bool flag = int.TryParse(this.comboBoxYF.Text, out result); string dJmonth = result.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(dJmonth, dJtype); if ((dJmonth != "0") && (set.get_Data().Rows.Count == 0)) { MessageManager.ShowMsgBox("没有符合条件的数据"); } else { this.billBL.XGDJZL = dJtype; new DJXG(dJmonth, dJtype, this.checkBox_JiaoYan.Checked).ShowDialog(); base.Close(); } } catch (Exception exception) { HandleException.HandleError(exception); } }