Ejemplo n.º 1
0
 protected override object[] doService(object[] param)
 {
     if ((param.Length != 0) && (param[0] != null))
     {
         string str = param[0].ToString();
         try
         {
             HySqdTianKai kai = new HySqdTianKai {
                 Text = "红字货物运输业增值税专用发票信息表查看",
                 sqdh = str
             };
             kai.InitSqdMx(InitSqdMxType.Read, null);
             kai.Show(FormMain.control_0);
         }
         catch (BaseException exception)
         {
             ExceptionHandler.HandleError(exception);
         }
         catch (Exception exception2)
         {
             ExceptionHandler.HandleError(exception2);
         }
     }
     return(null);
 }
Ejemplo n.º 2
0
        private void btn_Ok_Click(object sender, EventArgs e)
        {
            if ((((!this.DraweeRB.Checked && !this.CarrierRB.Checked) && (!this.YDKRB.Checked && !this.WDKRB.Checked)) && ((!this.RenZRB.Checked && !this.TaxcodeRB.Checked) && (!this.InvCodeNoRB.Checked && !this.GoodsRB.Checked))) && (!this.Carrier_MistakeRejectRB.Checked && !this.Carrier_MistakeNonDeliverRB.Checked))
            {
                MessageManager.ShowMsgBox("INP-431426");
            }
            else if ((this.InvKindCombo.Text == "") || (this.InvKindCombo.SelectedIndex < 0))
            {
                MessageBoxHelper.Show("INP-431427");
            }
            else
            {
                switch (this.InvKindCombo.SelectedIndex)
                {
                case 0:
                    this.InvoiceKind = "f";
                    break;

                case 1:
                    this.InvoiceKind = "c";
                    break;
                }
                if (!this.YDKRB.Checked)
                {
                    if (this.InvCodeEdit.Text == "")
                    {
                        MessageManager.ShowMsgBox("INP-431428");
                        return;
                    }
                    if (this.InvNumEdit.Text == "")
                    {
                        MessageManager.ShowMsgBox("INP-431429");
                        return;
                    }
                    if (this.InvCodeEdit.Text.Trim().Length < 10)
                    {
                        MessageManager.ShowMsgBox("INP-431430");
                        return;
                    }
                    if (!this.ConValid())
                    {
                        MessageManager.ShowMsgBox("INP-431431");
                        return;
                    }
                }
                this.GetSelectReason();
                this.SelectInfor.Clear();
                this.SelectInfor.Add(this.InvCodeEdit.Text.Trim());
                string str = this.InvNumEdit.Text.Trim();
                if ((str.Length < 8) && !string.IsNullOrEmpty(str))
                {
                    int length = str.Length;
                    for (int i = 0; i < (8 - length); i++)
                    {
                        str = "0" + str;
                    }
                }
                this.SelectInfor.Add(str);
                this.SelectInfor.Add((this.InvKindCombo.SelectedValue.ToString() == "货物运输业增值税专用发票") ? "f" : "c");
                this.SelectInfor.Add(this.Reasons);
                this.SelectInfor.Add(this.DraweeRB.Checked ? "0" : "1");
                try
                {
                    HySqdTianKai kai = new HySqdTianKai();
                    kai.TabText = ("开具红字货物运输业增值税专用发票信息表");
                    kai.InitSqdMx(InitSqdMxType.Add, this.SelectInfor);
                    if (!kai.BlueInvErr)
                    {
                        kai.Show(FormMain.control_0);
                    }
                }
                catch (BaseException exception)
                {
                    ExceptionHandler.HandleError(exception);
                }
                catch (Exception exception2)
                {
                    if (exception2.Message.Equals("BlueRateRevoked"))
                    {
                        MessageManager.ShowMsgBox("INP-431404");
                    }
                    else
                    {
                        ExceptionHandler.HandleError(exception2);
                    }
                }
                base.Close();
            }
        }