Beispiel #1
0
        void wizProd_Closed(object sender, EventArgs e)
        {
            CombinationWizard wizCombin = sender as CombinationWizard;

            if (wizCombin.CombinId != System.Guid.Empty)
            {
                BindList();
                this.Update();
            }
        }
Beispiel #2
0
 private void ShowItem()
 {
     if (lvList.SelectedItem != null)
     {
         Guid id = Guid.Empty;
         if (Guid.TryParse(lvList.SelectedItem.SubItems[2].Text, out id))
         {
             CombinationWizard wizProd = new CombinationWizard();
             wizProd.CombinId = id;
             wizProd.Closed  += new EventHandler(wizProd_Closed);
             wizProd.ShowDialog();
         }
     }
 }
Beispiel #3
0
        private void SetAttributes()
        {
            txtStkCode.MaxLength = 10;      // dbo.Product.STKCODE VARCHAR(10)

            #region 設定 clickable Appendix 1 label
            //lblAppendix1.AutoSize = true;                         // 減少 whitespace,有字嘅位置先可以 click
            lblAppendix1.Cursor = Cursors.Hand;                   // cursor over 顯示 hand cursor
            lblAppendix1.Click += (s, e) =>                       // 彈出 wizard
            {
                var dialog = new CombinationWizard();
                dialog.AppendixType = ProductHelper.Appendix.Appendix1;
                dialog.FormClosed  += (sender, eventArgs) =>    // 關閉後 refresh 個 combo box items
                {
                    FillAppendix1List();
                };
                dialog.ShowDialog();
            };
            #endregion

            #region 設定 clickable Appendix 2 label
            //lblAppendix2.AutoSize = true;                         // 減少 whitespace,有字嘅位置先可以 click
            lblAppendix2.Cursor = Cursors.Hand;                   // cursor over 顯示 hand cursor
            lblAppendix2.Click += (s, e) =>                       // 彈出 wizard
            {
                var dialog = new CombinationWizard();
                dialog.AppendixType = ProductHelper.Appendix.Appendix2;
                dialog.FormClosed  += (sender, eventArgs) =>    // 關閉後 refresh 個 combo box items
                {
                    FillAppendix2List();
                };
                dialog.ShowDialog();
            };
            #endregion

            #region 設定 clickable Appendix 3 label
            //lblAppendix3.AutoSize = true;                         // 減少 whitespace,有字嘅位置先可以 click
            lblAppendix3.Cursor = Cursors.Hand;                   // cursor over 顯示 hand cursor
            lblAppendix3.Click += (s, e) =>                       // 彈出 wizard
            {
                var dialog = new CombinationWizard();
                dialog.AppendixType = ProductHelper.Appendix.Appendix3;
                dialog.FormClosed  += (sender, eventArgs) =>    // 關閉後 refresh 個 combo box items
                {
                    FillAppendix3List();
                };
                dialog.ShowDialog();
            };
            #endregion
        }
Beispiel #4
0
        private void fab_OnClick(object sender, EventArgs e)
        {
            var wizard = new CombinationWizard();

            wizard.ShowDialog();
        }
Beispiel #5
0
        void cmdMenuClick(object sender, MenuItemEventArgs e)
        {
            if (!(e.MenuItem.Tag == null))
            {
                switch (e.MenuItem.Tag.ToString().ToLower())
                {
                case "product_code":
                    ProductWizard wizProduct = new ProductWizard();
                    wizProduct.EditMode = EnumHelper.EditMode.Add;
                    wizProduct.ShowDialog();
                    break;

                case "product_code_fast":
                    QuickWizard wizProduct_Fast = new QuickWizard();
                    wizProduct_Fast.ShowDialog();
                    break;

                case "product_code_batch":
                    BatchWizard wizProduct_Batch = new BatchWizard();
                    wizProduct_Batch.ShowDialog();
                    break;

                case "product_code_batch_posting":
                    ApproveWizard wizProduct_Auth = new ApproveWizard();
                    wizProduct_Auth.ShowDialog();
                    break;

                case "product_code_mass_update":
                    ModifyWizard wizProduct_MU = new ModifyWizard();
                    wizProduct_MU.ShowDialog();
                    break;

                case "productcodeimport":
                    RT2020.Product.Import.ProductCodeImport prodImport = new RT2020.Product.Import.ProductCodeImport();
                    prodImport.ShowDialog();
                    break;

                case "product_appendix1":
                    ProductAppendixWizard wizAppendix1 = new ProductAppendixWizard();
                    wizAppendix1.EditMode     = EnumHelper.EditMode.Add;
                    wizAppendix1.AppendixMode = ProductHelper.Appendix.Appendix3;
                    wizAppendix1.ShowDialog();
                    break;

                case "product_appendix2":
                    ProductAppendixWizard wizAppendix2 = new ProductAppendixWizard();
                    wizAppendix2.EditMode     = EnumHelper.EditMode.Add;
                    wizAppendix2.AppendixMode = ProductHelper.Appendix.Appendix3;
                    wizAppendix2.ShowDialog();
                    break;

                case "product_appendix3":
                    ProductAppendixWizard wizAppendix3 = new ProductAppendixWizard();
                    wizAppendix3.EditMode     = EnumHelper.EditMode.Add;
                    wizAppendix3.AppendixMode = ProductHelper.Appendix.Appendix3;
                    wizAppendix3.ShowDialog();
                    break;

                case "product_class1":
                    //ProductClassWizard wizClass1 = new ProductClassWizard(typeof(ProductClass1));
                    ProductClassWizard wizClass1 = new ProductClassWizard();
                    wizClass1.ClassMode = ProductHelper.Classes.Class1;
                    wizClass1.EditMode  = EnumHelper.EditMode.Add;
                    wizClass1.ShowDialog();
                    break;

                case "product_class2":
                    //ProductClassWizard wizClass2 = new ProductClassWizard(typeof(ProductClass2));
                    ProductClassWizard wizClass2 = new ProductClassWizard();
                    wizClass2.ClassMode = ProductHelper.Classes.Class2;
                    wizClass2.EditMode  = EnumHelper.EditMode.Add;
                    wizClass2.ShowDialog();
                    break;

                case "product_class3":
                    //ProductClassWizard wizClass3 = new ProductClassWizard(typeof(ProductClass3));
                    ProductClassWizard wizClass3 = new ProductClassWizard();
                    wizClass3.ClassMode = ProductHelper.Classes.Class3;
                    wizClass3.EditMode  = EnumHelper.EditMode.Add;
                    wizClass3.ShowDialog();
                    break;

                case "product_class4":
                    //ProductClassWizard wizClass4 = new ProductClassWizard(typeof(ProductClass4));
                    ProductClassWizard wizClass4 = new ProductClassWizard();
                    wizClass4.ClassMode = ProductHelper.Classes.Class4;
                    wizClass4.EditMode  = EnumHelper.EditMode.Add;
                    wizClass4.ShowDialog();
                    break;

                case "product_class5":
                    //ProductClassWizard wizClass5 = new ProductClassWizard(typeof(ProductClass5));
                    ProductClassWizard wizClass5 = new ProductClassWizard();
                    wizClass5.ClassMode = ProductHelper.Classes.Class5;
                    wizClass5.EditMode  = EnumHelper.EditMode.Add;
                    wizClass5.ShowDialog();
                    break;

                case "product_class6":
                    //ProductClassWizard wizClass6 = new ProductClassWizard(typeof(ProductClass6));
                    ProductClassWizard wizClass6 = new ProductClassWizard();
                    wizClass6.ClassMode = ProductHelper.Classes.Class6;
                    wizClass6.EditMode  = EnumHelper.EditMode.Add;
                    wizClass6.ShowDialog();
                    break;

                case "combination":
                    CombinationWizard wizCombin = new CombinationWizard();
                    wizCombin.ShowDialog();
                    break;

                case "analysiscode":
                    AnalysisCodeWizardAio wizAnalysis = new AnalysisCodeWizardAio();
                    //wizAnalysis.EditMode = EnumHelper.EditMode.Add;
                    wizAnalysis.ShowDialog();
                    break;

                case "postendertype":
                    RT2020.Settings.PosTenderTypeWizard wizTender = new RT2020.Settings.PosTenderTypeWizard();
                    wizTender.ShowDialog();
                    break;

                case "product master list":
                    RT2020.Product.Reports.RptProductMasterList productlist = new RT2020.Product.Reports.RptProductMasterList();
                    productlist.ShowDialog();
                    break;

                case "product barcode list":
                    RT2020.Product.Reports.RptProductBarcodeList productBarcodeList = new RT2020.Product.Reports.RptProductBarcodeList();
                    productBarcodeList.ShowDialog();
                    break;

                case "appendix1 list":
                    RT2020.Product.Reports.RptAppendixList a1List = new RT2020.Product.Reports.RptAppendixList();
                    a1List.AppendixType = "Appendix1";
                    a1List.ShowDialog();
                    break;

                case "appendix2 list":
                    RT2020.Product.Reports.RptAppendixList a2List = new RT2020.Product.Reports.RptAppendixList();
                    a2List.AppendixType = "Appendix2";
                    a2List.ShowDialog();
                    break;

                case "appendix3 list":
                    RT2020.Product.Reports.RptAppendixList a3List = new RT2020.Product.Reports.RptAppendixList();
                    a3List.AppendixType = "Appendix3";
                    a3List.ShowDialog();
                    break;

                case "class1 list":
                    RT2020.Product.Reports.RptClassList c1List = new RT2020.Product.Reports.RptClassList();
                    c1List.ClassType = "Class1";
                    c1List.ShowDialog();
                    break;

                case "class2 list":
                    RT2020.Product.Reports.RptClassList c2List = new RT2020.Product.Reports.RptClassList();
                    c2List.ClassType = "Class2";
                    c2List.ShowDialog();
                    break;

                case "class3 list":
                    RT2020.Product.Reports.RptClassList c3List = new RT2020.Product.Reports.RptClassList();
                    c3List.ClassType = "Class3";
                    c3List.ShowDialog();
                    break;

                case "class4 list":
                    RT2020.Product.Reports.RptClassList c4List = new RT2020.Product.Reports.RptClassList();
                    c4List.ClassType = "Class4";
                    c4List.ShowDialog();
                    break;

                case "class5 list":
                    RT2020.Product.Reports.RptClassList c5List = new RT2020.Product.Reports.RptClassList();
                    c5List.ClassType = "Class5";
                    c5List.ShowDialog();
                    break;

                case "class6 list":
                    RT2020.Product.Reports.RptClassList c6List = new RT2020.Product.Reports.RptClassList();
                    c6List.ClassType = "Class6";
                    c6List.ShowDialog();
                    break;

                case "currency list":
                    RT2020.Settings.Reports.RptCurrencyList currencyList = new RT2020.Settings.Reports.RptCurrencyList();
                    currencyList.ShowDialog();
                    break;

                case "dimension list":
                    RT2020.Product.Reports.RptDimensionList dimList = new RT2020.Product.Reports.RptDimensionList();
                    dimList.ShowDialog();
                    break;

                case "payment list":
                    RT2020.Product.Reports.RptPaymentList paymentList = new RT2020.Product.Reports.RptPaymentList();
                    paymentList.ShowDialog();
                    break;

                case "a1combin list":
                    RT2020.Product.Reports.RptAppendix1CombinList a1combinList = new RT2020.Product.Reports.RptAppendix1CombinList();
                    a1combinList.ShowDialog();
                    break;

                case "a2combin list":
                    RT2020.Product.Reports.RptAppendix2CombinList a2combinList = new RT2020.Product.Reports.RptAppendix2CombinList();
                    a2combinList.ShowDialog();
                    break;

                case "a3combin list":
                    RT2020.Product.Reports.RptAppendix3CombinList a3combinList = new RT2020.Product.Reports.RptAppendix3CombinList();
                    a3combinList.ShowDialog();
                    break;
                }
            }
        }