Exemple #1
0
 protected override object[] doService(object[] param)
 {
     try
     {
         if ((param.Length != 0) && (param[0] != null))
         {
             string     str = param[0].ToString();
             SqdTianKai kai = new SqdTianKai {
                 Text = "红字发票申请单查看",
                 sqdh = str
             };
             kai.InitSqdMx(InitSqdMxType.Read, null);
             kai.Show(FormMain.control_0);
         }
         return(null);
     }
     catch (BaseException exception)
     {
         this.loger.Error(exception.Message);
         ExceptionHandler.HandleError(exception);
         return(null);
     }
     catch (Exception exception2)
     {
         this.loger.Error(exception2.Message);
         ExceptionHandler.HandleError(exception2);
         return(null);
     }
 }
        private void but_ok_Click(object sender, EventArgs e)
        {
            string str = "";

            if ((((!this.BuyerRB.Checked && !this.SellerRB.Checked) && (!this.YDKRB.Checked && !this.WDKRB.Checked)) && ((!this.RenZRB.Checked && !this.TaxcodeRB.Checked) && (!this.InvCodeNoRB.Checked && !this.GoodsRB.Checked))) && (!this.KpErRefRB.Checked && !this.KpErSendRB.Checked))
            {
                MessageManager.ShowMsgBox("INP-431371");
            }
            else if ((this.InvKindCombo.Text == "") || (this.InvKindCombo.SelectedIndex < 0))
            {
                str = "发票种类输入信息不正确。\n";
                str = str + "发票种类为空,请选择发票种类!";
                MessageManager.ShowMsgBox("INP-431372");
            }
            else
            {
                switch (this.InvKindCombo.SelectedIndex)
                {
                case 0:
                    this.InvoiceKind = "s";
                    break;

                case 1:
                    this.InvoiceKind = "c";
                    break;
                }
                if (!this.YDKRB.Checked)
                {
                    if (this.InvCodeEdit.Text == "")
                    {
                        str = "发票代码输入信息不正确。\n";
                        str = str + "发票代码为空,请输入发票代码!!";
                        MessageManager.ShowMsgBox("INP-431373");
                        return;
                    }
                    if (this.InvNoEdt.Text == "")
                    {
                        str = "发票号码输入信息不正确。\n";
                        str = str + "发票号码为空,请输入发票号码!";
                        MessageManager.ShowMsgBox("INP-431374");
                        return;
                    }
                    if (this.InvCodeEdit.Text.Trim().Length < 10)
                    {
                        str = "发票代码输入信息不正确。\n";
                        str = str + "发票代码小于10位,请输入正确发票代码!";
                        MessageManager.ShowMsgBox("INP-431375");
                        return;
                    }
                    if (!this.ConValid())
                    {
                        str = "发票代码(或号码)输入信息不正确。\n";
                        MessageManager.ShowMsgBox("INP-431376");
                        return;
                    }
                }
                this.GetSelectReason();
                this.SelectInfor.Clear();
                this.SelectInfor.Add(this.InvCodeEdit.Text.Trim());
                this.SelectInfor.Add(this.InvNoEdt.Text.Trim());
                this.SelectInfor.Add((this.InvKindCombo.SelectedValue.ToString() == "增值税专用发票") ? "s" : "c");
                this.SelectInfor.Add(this.Reasons);
                this.SelectInfor.Add(this.BuyerRB.Checked ? "0" : "1");
                SqdTianKai kai = new SqdTianKai();
                kai.TabText = ("红字发票信息表填开");
                kai.InitSqdMx(InitSqdMxType.Add, this.SelectInfor);
                if ((!SqdTianKai.noslv && !SqdTianKai.lp_error) && (SqdTianKai.lp_mxchao78 == 0))
                {
                    kai.Show(FormMain.control_0);
                }
                else if (SqdTianKai.lp_mxchao78 == 7)
                {
                    MessageManager.ShowMsgBox("INP-431363", new string[] { "7" });
                    MessageManager.ShowMsgBox("INP-431364");
                    SqdTianKai.lp_mxchao78 = 0;
                }
                else if (SqdTianKai.lp_mxchao78 == 8)
                {
                    MessageManager.ShowMsgBox("INP-431363", new string[] { "8" });
                    MessageManager.ShowMsgBox("INP-431364");
                    SqdTianKai.lp_mxchao78 = 0;
                }
                base.Close();
            }
        }