Esempio n. 1
0
        private void initConfig()
        {
            cSupWS = new ControlSupplierSiteWebService(Cm);

            initCompoment();
            pB1.Visible                = false;
            lvwColumnSorter            = new ListViewColumnSorter();
            lvwColumnSorter.Order      = SortOrder.Descending;
            lvwColumnSorter.SortColumn = 0;
            lv1.Sort();
            txtFileName.Text = Cm.initC.AutoGlPeriod;

            lv1.Columns.Add("NO", 50);
            lv1.Columns.Add("List File", formwidth - 50 - 40 - 100, HorizontalAlignment.Left);
            lv1.Columns.Add("   process   ", 100, HorizontalAlignment.Center);
            lv1.ListViewItemSorter = lvwColumnSorter;

            lb2.Text = lb2.Text + " " + Cm.xcustGlPwebservice_run;
            if (Cm.xcustTaxCodewebservice_run.ToLower().Equals("on"))
            {
                cSupWS.setXcustSupTbl(lv1, this, pB1);
            }
            //int i = 1;
        }
Esempio n. 2
0
        static void Main()
        {
            Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
            //Application.EnableVisualStyles();
            // Application.SetCompatibleTextRenderingDefault(false);

            MaterialListView    lv1;
            MaterialProgressBar pB1;
            Form form1;

            string[] args = Environment.GetCommandLineArgs();
            //args = args == null ? Environment.GetCommandLineArgs():args;



            ControlMain Cm = new ControlMain();

            lv1   = new MaterialListView();
            pB1   = new MaterialProgressBar();
            form1 = new Form();


            Cm.args = args;
            Cm.setAgrument();
            // Cm.GetConfig();

            // MessageBox.Show("Mastername ="  + Cm.initC.Mastername);

            // MessageBox.Show("args =" + args.ToString() + "," + args.Length, "");

            ControlAPInvoiceWebService         cApInvWS      = new ControlAPInvoiceWebService(Cm);
            ControlApSourceWebService          cApWS         = new ControlApSourceWebService(Cm);
            ControlBlanketHeader               cBlKH         = new ControlBlanketHeader(Cm);
            ControlBlanketLine                 cBlKL         = new ControlBlanketLine(Cm);
            ControlBuMstWebService             cIBuWS        = new ControlBuMstWebService(Cm);
            ControlCatMappingMstWebService     cICatmWS      = new ControlCatMappingMstWebService(Cm);
            ControlCSTPeriodMstWebService      cICSTPeriodWS = new ControlCSTPeriodMstWebService(Cm);
            ControlCurrencyMstWebService       cICurWS       = new ControlCurrencyMstWebService(Cm);
            ControlGlCodeCombinationWebService cGlCWS        = new ControlGlCodeCombinationWebService(Cm);
            ControlGlEntityWebService          cGlWS         = new ControlGlEntityWebService(Cm);
            ControlGlLedger             cGLG    = new ControlGlLedger(Cm);
            ControlGlPeriodWebService   cGlPWS  = new ControlGlPeriodWebService(Cm);
            ControlLocatorMstWebService cLCT    = new ControlLocatorMstWebService(Cm);
            ControlItemMstWebService    cItemWS = new ControlItemMstWebService(Cm);
            ControlLocationsWebService  cLcWS   = new ControlLocationsWebService(Cm);
            // ControlPoRWebService cPoRWS = new ControlPoRWebService(Cm);
            ControlSubInvMstWebService     cISubWS     = new ControlSubInvMstWebService(Cm);
            ControlSupplierSiteWebService  cSupSWS     = new ControlSupplierSiteWebService(Cm);
            ControlSupplierWebService      cSupWS      = new ControlSupplierWebService(Cm);
            ControlTaxCodeWebService       cTxCWS      = new ControlTaxCodeWebService(Cm);
            ControlUomConvertMstWebService cIUomConvWS = new ControlUomConvertMstWebService(Cm);
            ControlUomMstWebService        cIUomWS     = new ControlUomMstWebService(Cm);
            ControlValueSet         cVS     = new ControlValueSet(Cm);
            ControlOrgMstWebService cIOrgWS = new ControlOrgMstWebService(Cm);



            //MessageBox.Show("args "+ args.Length, "");

            /*if (System.Diagnostics.Process.GetCurrentProcess().ProcessName.ToLower().Equals("xcustvalueset"))
             * {
             *  Application.Run(new XcustValueSet(Cm));
             * }
             * else if (System.Diagnostics.Process.GetCurrentProcess().ProcessName.ToLower().Equals("xcustvalueset"))
             * {
             *  Application.Run(new XcustValueSet(Cm));
             * }
             * else if (System.Diagnostics.Process.GetCurrentProcess().ProcessName.ToLower().Equals("XCustItemMstWebService"))
             * {
             *  Application.Run(new XCustItemMstWebService(Cm));
             * }
             * else if (System.Diagnostics.Process.GetCurrentProcess().ProcessName.ToLower().Equals("XCustSubInvMstWebService"))
             * {
             *  Application.Run(new XCustSubInvMstWebService(Cm));
             * }
             * else if (System.Diagnostics.Process.GetCurrentProcess().ProcessName.ToLower().Equals("XCustUomMstWebService"))
             * {
             *  Application.Run(new XCustUomMstWebService(Cm));
             * }
             * else if (System.Diagnostics.Process.GetCurrentProcess().ProcessName.ToLower().Equals("XCustCurrencyMstWebService"))
             * {
             *  Application.Run(new XCustCurrencyMstWebService(Cm));
             * }
             * else if (System.Diagnostics.Process.GetCurrentProcess().ProcessName.ToLower().Equals("XCustBuMstWebService"))
             * {
             *  Application.Run(new XCustBuMstWebService(Cm));
             * }
             * else if (System.Diagnostics.Process.GetCurrentProcess().ProcessName.ToLower().Equals("XCustUomConvertMstWebService"))
             * {
             *  Application.Run(new XCustUomConvertMstWebService(Cm));
             * }
             * else
             * {
             *  //Application.Run(new XCustPoRWebService(Cm));
             *  //Application.Run(new XCustGlPeriodWebService(Cm));
             *  //Application.Run(new XCustApSourceWebService(Cm));
             *  //Application.Run(new XCustGlEntityWebService(Cm));
             *  //Application.Run(new XCustTaxCodeWebService(Cm));
             *  //Application.Run(new XCustSupplierSiteWebService(Cm));
             *  //Application.Run(new XCustSupplierWebService(Cm));
             *  //Application.Run(new XCustGlEntityWebService(Cm));
             *
             *  //Application.Run(new XCustUomMstWebService(Cm));  //kts****
             *  //Application.Run(new XCustBuMstWebService(Cm));  //kts
             *  //Application.Run(new XCustCurrencyMstWebService(Cm));  //kts
             *  //Application.Run(new XCustSubInvMstWebService(Cm));  //kts **
             *  Application.Run(new XcustValueSet(Cm));  //kts
             *  //Application.Run(new XcustItemLocator(Cm));  //kts
             *  //Application.Run(new XCustItemMstWebService(Cm));  //kts
             *  //Application.Run(new XCustUomConvertMstWebService(Cm));  //kts
             *  //Application.Run(new XCustCSTPeriodMstWebService(Cm));  //kts
             *  //Application.Run(new XCustCatMappingMstWebService(Cm));  //kts
             *
             *  //Application.Run(new XCustSubInvMstWebService(Cm));  //kts
             *
             *
             *  //Application.Run(new XcustBlanketHeader(Cm));
             *
             *  //Application.Run(new XCustBlanketLine(Cm));
             *  //Application.Run(new XCustGlLedger(Cm));
             *
             *  //Application.Run(new XCustUomMstWebService(Cm));  //kts
             *  //Application.Run(new XCustGlCodeCombinationWebService(Cm));
             *  //Application.Run(new XCustLocationsWebService(Cm));
             * }
             */

            //Application.Run(new XCustUomConvertMstWebService(Cm));
            //Application.Run(new XCustItemMstWebService(Cm));
            //Application.Run(new XcustSyncMaster(Cm));
            //Application.Run(new XcustValueSet(Cm));

            if (args.Length >= 2 && args[1].ToString().ToLower() == "schedule")
            {
                //MessageBox.Show("args =" + args[1].ToString() + "," + args.Length + "," + Cm.initC.Mastername, "");

                if (Cm.initC.Mastername == "XCustAPInvoiceWebService")
                {
                    cApInvWS.setXcustAPTbl(lv1, form1, pB1);
                }
                else if (Cm.initC.Mastername == "XCustApSourceWebService")
                {
                    cApWS.setXcustApTbl(lv1, form1, pB1);
                }
                else if (Cm.initC.Mastername == "XCustBlanketHeader")
                {
                    cBlKH.setXcustBlkHTbl(lv1, form1, pB1);
                }
                else if (Cm.initC.Mastername == "XCustBlanketLine")
                {
                    cBlKL.setXcustBlkLTbl(lv1, form1, pB1);
                }
                else if (Cm.initC.Mastername == "XCustBuMstWebService")
                {
                    cIBuWS.setXcustBUTbl(lv1, form1, pB1);
                }
                else if (Cm.initC.Mastername == "XCustCatMappingMstWebService")
                {
                    cICatmWS.setXcustCatMappingTbl(lv1, form1, pB1);
                }
                else if (Cm.initC.Mastername == "XCustCSTPeriodMstWebService")
                {
                    cICSTPeriodWS.setXcustCSTPeriodTbl(lv1, form1, pB1);
                }
                else if (Cm.initC.Mastername == "XCustCurrencyMstWebService")
                {
                    cICurWS.setXcustCURTbl(lv1, form1, pB1);
                }
                else if (Cm.initC.Mastername == "XCustGlCodeCombinationWebService")
                {
                    cGlCWS.setXcustGlCTbl(lv1, form1, pB1);
                }
                else if (Cm.initC.Mastername == "XCustGlEntityWebService")
                {
                    cGlWS.setXcustGlTbl(lv1, form1, pB1);
                }
                else if (Cm.initC.Mastername == "XCustGlLedger")
                {
                    cGLG.setXcustGlLedgerTbl(lv1, form1, pB1);
                }
                else if (Cm.initC.Mastername == "XCustGlPeriodWebService")
                {
                    cGlPWS.setXcustGlPTbl(lv1, form1, pB1);
                }
                else if (Cm.initC.Mastername == "XcustItemLocator")
                {
                    cLCT.setXcustLocatorTbl(lv1, form1, pB1);
                }
                else if (Cm.initC.Mastername == "XCustItemMstWebService")
                {
                    cItemWS.setXcustITEMTbl(lv1, form1, pB1);
                }
                else if (Cm.initC.Mastername == "XCustLocationsWebService")
                {
                    cLcWS.setXcustGlCTbl(lv1, form1, pB1);
                }
                else if (Cm.initC.Mastername == "XCustSubInvMstWebService")
                {
                    cISubWS.setXcustSUBTbl(lv1, form1, pB1);
                }
                else if (Cm.initC.Mastername == "XCustSupplierSiteWebService")
                {
                    cSupSWS.setXcustSupTbl(lv1, form1, pB1);
                }
                else if (Cm.initC.Mastername == "XCustSupplierWebService")
                {
                    cSupWS.setXcustSupTbl(lv1, form1, pB1);
                }
                else if (Cm.initC.Mastername == "XCustTaxCodeWebService")
                {
                    cTxCWS.setXcustTxCTbl(lv1, form1, pB1);
                }
                else if (Cm.initC.Mastername == "XCustUomConvertMstWebService")
                {
                    cIUomConvWS.setXcustUOMConvertTbl(lv1, form1, pB1);
                }
                else if (Cm.initC.Mastername == "XCustUomMstWebService")
                {
                    cIUomWS.setXcustUOMTbl(lv1, form1, pB1);
                }
                else if (Cm.initC.Mastername == "XcustValueSet")
                {
                    cVS.setXcustValueTbl(lv1, form1, pB1);
                }
                else if (Cm.initC.Mastername == "XcustOrgMstWebService")
                {
                    //MessageBox.Show("XcustOrgMstWebService =" + args[1].ToString() + "," + args.Length, "");
                    cIOrgWS.setXcustOrgMstTbl(lv1, form1, pB1);
                }
                else
                {
                    cApInvWS.setXcustAPTbl(lv1, form1, pB1);
                    cApWS.setXcustApTbl(lv1, form1, pB1);
                    cBlKH.setXcustBlkHTbl(lv1, form1, pB1);
                    cBlKL.setXcustBlkLTbl(lv1, form1, pB1);
                    cIBuWS.setXcustBUTbl(lv1, form1, pB1);
                    cICatmWS.setXcustCatMappingTbl(lv1, form1, pB1);
                    cICSTPeriodWS.setXcustCSTPeriodTbl(lv1, form1, pB1);
                    cICurWS.setXcustCURTbl(lv1, form1, pB1);
                    cGlCWS.setXcustGlCTbl(lv1, form1, pB1);
                    cGlWS.setXcustGlTbl(lv1, form1, pB1);
                    cGLG.setXcustGlLedgerTbl(lv1, form1, pB1);
                    cGlPWS.setXcustGlPTbl(lv1, form1, pB1);
                    cLCT.setXcustLocatorTbl(lv1, form1, pB1);
                    cItemWS.setXcustITEMTbl(lv1, form1, pB1);
                    cLcWS.setXcustGlCTbl(lv1, form1, pB1);
                    cISubWS.setXcustSUBTbl(lv1, form1, pB1);
                    cSupSWS.setXcustSupTbl(lv1, form1, pB1);
                    cSupWS.setXcustSupTbl(lv1, form1, pB1);
                    cTxCWS.setXcustTxCTbl(lv1, form1, pB1);
                    cIUomConvWS.setXcustUOMConvertTbl(lv1, form1, pB1);
                    cIUomWS.setXcustUOMTbl(lv1, form1, pB1);
                    cVS.setXcustValueTbl(lv1, form1, pB1);
                    cIOrgWS.setXcustOrgMstTbl(lv1, form1, pB1);
                }
            }
            else
            {
                Application.Run(new XcustSyncMaster(Cm));
            }
        }
Esempio n. 3
0
 private void btnRead_Click(object sender, EventArgs e)
 {
     cSupWS.setXcustSupTbl(lv1, this, pB1);
 }
Esempio n. 4
0
 private void btnRead_Click(object sender, EventArgs e)
 {
     if (Cm.initC.Mastername == "XCustAPInvoiceWebService")
     {
         cApInvWS.setXcustAPTbl(lv1, this, pB1);
     }
     else if (Cm.initC.Mastername == "XCustApSourceWebService")
     {
         cApWS.setXcustApTbl(lv1, this, pB1);
     }
     else if (Cm.initC.Mastername == "XCustBlanketHeader")
     {
         cBlKH.setXcustBlkHTbl(lv1, this, pB1);
     }
     else if (Cm.initC.Mastername == "XCustBlanketLine")
     {
         cBlKL.setXcustBlkLTbl(lv1, this, pB1);
     }
     else if (Cm.initC.Mastername == "XCustBuMstWebService")
     {
         cIBuWS.setXcustBUTbl(lv1, this, pB1);
     }
     else if (Cm.initC.Mastername == "XCustCatMappingMstWebService")
     {
         cICatmWS.setXcustCatMappingTbl(lv1, this, pB1);
     }
     else if (Cm.initC.Mastername == "XCustCSTPeriodMstWebService")
     {
         cICSTPeriodWS.setXcustCSTPeriodTbl(lv1, this, pB1);
     }
     else if (Cm.initC.Mastername == "XCustCurrencyMstWebService")
     {
         cICurWS.setXcustCURTbl(lv1, this, pB1);
     }
     else if (Cm.initC.Mastername == "XCustGlCodeCombinationWebService")
     {
         cGlCWS.setXcustGlCTbl(lv1, this, pB1);
     }
     else if (Cm.initC.Mastername == "XCustGlEntityWebService")
     {
         cGlWS.setXcustGlTbl(lv1, this, pB1);
     }
     else if (Cm.initC.Mastername == "XCustGlLedger")
     {
         cGLG.setXcustGlLedgerTbl(lv1, this, pB1);
     }
     else if (Cm.initC.Mastername == "XCustGlPeriodWebService")
     {
         cGlPWS.setXcustGlPTbl(lv1, this, pB1);
     }
     else if (Cm.initC.Mastername == "XcustItemLocator")
     {
         cLCT.setXcustLocatorTbl(lv1, this, pB1);
     }
     else if (Cm.initC.Mastername == "XCustItemMstWebService")
     {
         cItemWS.setXcustITEMTbl(lv1, this, pB1);
     }
     else if (Cm.initC.Mastername == "XCustLocationsWebService")
     {
         cLcWS.setXcustGlCTbl(lv1, this, pB1);
     }
     else if (Cm.initC.Mastername == "XCustSubInvMstWebService")
     {
         cISubWS.setXcustSUBTbl(lv1, this, pB1);
     }
     else if (Cm.initC.Mastername == "XCustSupplierSiteWebService")
     {
         cSupSWS.setXcustSupTbl(lv1, this, pB1);
     }
     else if (Cm.initC.Mastername == "XCustSupplierWebService")
     {
         cSupWS.setXcustSupTbl(lv1, this, pB1);
     }
     else if (Cm.initC.Mastername == "XCustTaxCodeWebService")
     {
         cTxCWS.setXcustTxCTbl(lv1, this, pB1);
     }
     else if (Cm.initC.Mastername == "XCustUomConvertMstWebService")
     {
         cIUomConvWS.setXcustUOMConvertTbl(lv1, this, pB1);
     }
     else if (Cm.initC.Mastername == "XCustUomMstWebService")
     {
         cIUomWS.setXcustUOMTbl(lv1, this, pB1);
     }
     else if (Cm.initC.Mastername == "XcustValueSet")
     {
         cVS.setXcustValueTbl(lv1, this, pB1);
     }
     else if (Cm.initC.Mastername == "XcustOrgMstWebService")
     {
         cIOrgWS.setXcustOrgMstTbl(lv1, this, pB1);
     }
     else
     {
         cApInvWS.setXcustAPTbl(lv1, this, pB1);
         cApWS.setXcustApTbl(lv1, this, pB1);
         cBlKH.setXcustBlkHTbl(lv1, this, pB1);
         cBlKL.setXcustBlkLTbl(lv1, this, pB1);
         cIBuWS.setXcustBUTbl(lv1, this, pB1);
         cICatmWS.setXcustCatMappingTbl(lv1, this, pB1);
         cICSTPeriodWS.setXcustCSTPeriodTbl(lv1, this, pB1);
         cICurWS.setXcustCURTbl(lv1, this, pB1);
         cGlCWS.setXcustGlCTbl(lv1, this, pB1);
         cGlWS.setXcustGlTbl(lv1, this, pB1);
         cGLG.setXcustGlLedgerTbl(lv1, this, pB1);
         cGlPWS.setXcustGlPTbl(lv1, this, pB1);
         cLCT.setXcustLocatorTbl(lv1, this, pB1);
         cItemWS.setXcustITEMTbl(lv1, this, pB1);
         cLcWS.setXcustGlCTbl(lv1, this, pB1);
         cISubWS.setXcustSUBTbl(lv1, this, pB1);
         cSupSWS.setXcustSupTbl(lv1, this, pB1);
         cSupWS.setXcustSupTbl(lv1, this, pB1);
         cTxCWS.setXcustTxCTbl(lv1, this, pB1);
         cIUomConvWS.setXcustUOMConvertTbl(lv1, this, pB1);
         cIUomWS.setXcustUOMTbl(lv1, this, pB1);
         cVS.setXcustValueTbl(lv1, this, pB1);
         cIOrgWS.setXcustOrgMstTbl(lv1, this, pB1);
     }
 }