Ejemplo n.º 1
0
 protected override void RunCommand()
 {
     try
     {
         if ((hyfpfm == null) || !hyfpfm.HasShow())
         {
             SPFLService service = new SPFLService();
             if (FLBM_lock.isFlbm() && (service.GetMaxBMBBBH() == "0.0"))
             {
                 MessageManager.ShowMsgBox("INP-242133");
             }
             else
             {
                 IFpManager manager = new FpManager();
                 if (manager.CanInvoice((FPLX)11))
                 {
                     string[] current = manager.GetCurrent((FPLX)11);
                     if (current != null)
                     {
                         if (new StartConfirmForm((FPLX)11, current).ShowDialog() == DialogResult.OK)
                         {
                             hyfpfm = new HYInvoiceForm((FPLX)11, current[0], current[1]);
                             if (hyfpfm.InitSuccess)
                             {
                                 hyfpfm.ShowDialog();
                             }
                         }
                     }
                     else
                     {
                         MessageManager.ShowMsgBox(manager.Code());
                     }
                 }
                 else
                 {
                     MessageManager.ShowMsgBox(manager.Code());
                 }
             }
         }
     }
     catch (Exception exception)
     {
         this.log.Error("货物运输业增值税专用发票开具功能加载异常:" + exception.ToString());
         string[] textArray1 = new string[] { exception.ToString() };
         MessageManager.ShowMsgBox("INP-242155", textArray1);
     }
 }
Ejemplo n.º 2
0
 protected override object[] doService(object[] param)
 {
     if (param.Length == 3)
     {
         bool flag   = param[0].Equals("1");
         int  result = 0;
         int.TryParse((string)param[1], out result);
         List <string[]> data = param[2] as List <string[]>;
         if (data != null)
         {
             string[] strArray = data[result];
             FPLX     fplx     = Invoice.ParseFPLX(strArray[0]);
             if (((int)fplx == 0) || ((int)fplx == 2))
             {
                 InvoiceShowForm form  = new InvoiceShowForm(flag, result, data);
                 int             index = form.index;
                 if (form.ShowDialog() != DialogResult.Ignore)
                 {
                     return(new object[] { index, form.data });
                 }
                 object[] objArray = new object[] { param[0], index.ToString(), form.data };
                 return(ServiceFactory.InvokePubService("Aisino.Fwkp.QueryFPMX", objArray));
             }
             if ((int)fplx == 0x33)
             {
                 InvoiceShowForm_DZ m_dz = new InvoiceShowForm_DZ(flag, result, data);
                 int num3 = m_dz.index;
                 if (m_dz.ShowDialog() != DialogResult.Ignore)
                 {
                     return(new object[] { num3, m_dz.data });
                 }
                 object[] objArray2 = new object[] { param[0], num3.ToString(), m_dz.data };
                 return(ServiceFactory.InvokePubService("Aisino.Fwkp.QueryFPMX", objArray2));
             }
             if ((int)fplx == 0x29)
             {
                 InvoiceShowForm_JS m_js = new InvoiceShowForm_JS(flag, result, data);
                 int num4 = m_js.index;
                 if (m_js.ShowDialog() != DialogResult.Ignore)
                 {
                     return(new object[] { num4, m_js.data });
                 }
                 object[] objArray3 = new object[] { param[0], num4.ToString(), m_js.data };
                 return(ServiceFactory.InvokePubService("Aisino.Fwkp.QueryFPMX", objArray3));
             }
             if ((int)fplx == 11)
             {
                 HYInvoiceForm form2 = new HYInvoiceForm(flag, result, data);
                 int           num5  = form2.index;
                 if (form2.ShowDialog() != DialogResult.Ignore)
                 {
                     return(new object[] { num5, form2.data });
                 }
                 object[] objArray4 = new object[] { param[0], num5.ToString(), form2.data };
                 return(ServiceFactory.InvokePubService("Aisino.Fwkp.QueryFPMX", objArray4));
             }
             if ((int)fplx == 12)
             {
                 if (strArray[5].Substring(4, 1) == "1")
                 {
                     JDCInvoiceForm_old _old = new JDCInvoiceForm_old(flag, result, data);
                     int num6 = _old.index;
                     if (_old.ShowDialog() != DialogResult.Ignore)
                     {
                         return(new object[] { num6, _old.data });
                     }
                     object[] objArray5 = new object[] { param[0], num6.ToString(), _old.data };
                     return(ServiceFactory.InvokePubService("Aisino.Fwkp.QueryFPMX", objArray5));
                 }
                 JDCInvoiceForm_new _new = new JDCInvoiceForm_new(flag, result, data);
                 int num7 = _new.index;
                 if (_new.ShowDialog() != DialogResult.Ignore)
                 {
                     return(new object[] { num7, _new.data });
                 }
                 object[] objArray6 = new object[] { param[0], num7.ToString(), _new.data };
                 return(ServiceFactory.InvokePubService("Aisino.Fwkp.QueryFPMX", objArray6));
             }
         }
     }
     return(null);
 }