private void ShowWorkspace(ref Panel wspPane, string Tag) { if (!string.IsNullOrEmpty(Tag)) { Control[] controls = this.Form.Controls.Find("wspPane", true); // OLAP Viewer RT2020.Inventory.Olap.OlapViewForm oOlapViewer = new RT2020.Inventory.Olap.OlapViewForm(); oOlapViewer.DockPadding.All = 6; oOlapViewer.Dock = DockStyle.Fill; switch (Tag.ToLower()) { case "invt_goodsreceive": RT2020.Inventory.GoodsReceive.DefaultCAPList oRecv = new RT2020.Inventory.GoodsReceive.DefaultCAPList(controls[0]); oRecv.DockPadding.All = 6; oRecv.Dock = DockStyle.Fill; wspPane.Controls.Add(oRecv); break; case "invt_goodsreturn": RT2020.Inventory.GoodsReturn.DefaultREJList oReturn = new RT2020.Inventory.GoodsReturn.DefaultREJList(controls[0]); oReturn.DockPadding.All = 6; oReturn.Dock = DockStyle.Fill; wspPane.Controls.Add(oReturn); break; case "invt_txfer": RT2020.Inventory.Transfer.DefaultTXFList oTxfer = new RT2020.Inventory.Transfer.DefaultTXFList(controls[0]); oTxfer.DockPadding.All = 6; oTxfer.Dock = DockStyle.Fill; wspPane.Controls.Add(oTxfer); break; case "invt_adjustment": RT2020.Inventory.Adjustment.DefaultADJList oAdjust = new RT2020.Inventory.Adjustment.DefaultADJList(controls[0]); oAdjust.DockPadding.All = 6; oAdjust.Dock = DockStyle.Fill; wspPane.Controls.Add(oAdjust); break; case "invt_replenishment": RT2020.Inventory.Replenishment.DefaultRPLList oReplenishment = new RT2020.Inventory.Replenishment.DefaultRPLList(controls[0]); oReplenishment.DockPadding.All = 6; oReplenishment.Dock = DockStyle.Fill; wspPane.Controls.Add(oReplenishment); break; case "invt_stocktake": RT2020.Inventory.StockTake.DefaultSTKTKList oStockTake = new RT2020.Inventory.StockTake.DefaultSTKTKList(controls[0]); oStockTake.DockPadding.All = 6; oStockTake.Dock = DockStyle.Fill; wspPane.Controls.Add(oStockTake); break; case "productcare_product": RT2020.Product.ProductList oProd = new RT2020.Product.ProductList(controls[0]); oProd.DockPadding.All = 6; oProd.Dock = DockStyle.Fill; wspPane.Controls.Add(oProd); break; case "productcare_appendix1": RT2020.Product.AppendixList oAppendix1List = new RT2020.Product.AppendixList(ProductHelper.Appendix.Appendix1, controls[0]); oAppendix1List.DockPadding.All = 6; oAppendix1List.Dock = DockStyle.Fill; wspPane.Controls.Add(oAppendix1List); break; case "productcare_appendix2": RT2020.Product.AppendixList oAppendix2List = new RT2020.Product.AppendixList(ProductHelper.Appendix.Appendix2, controls[0]); oAppendix2List.DockPadding.All = 6; oAppendix2List.Dock = DockStyle.Fill; wspPane.Controls.Add(oAppendix2List); break; case "productcare_appendix3": RT2020.Product.AppendixList oAppendix3List = new RT2020.Product.AppendixList(ProductHelper.Appendix.Appendix3, controls[0]); oAppendix3List.DockPadding.All = 6; oAppendix3List.Dock = DockStyle.Fill; wspPane.Controls.Add(oAppendix3List); break; case "productcare_class1": RT2020.Product.ClassList oClass1List = new RT2020.Product.ClassList("Class1", controls[0]); oClass1List.DockPadding.All = 6; oClass1List.Dock = DockStyle.Fill; wspPane.Controls.Add(oClass1List); break; case "productcare_class2": RT2020.Product.ClassList oClass2List = new RT2020.Product.ClassList("Class2", controls[0]); oClass2List.DockPadding.All = 6; oClass2List.Dock = DockStyle.Fill; wspPane.Controls.Add(oClass2List); break; case "productcare_class3": RT2020.Product.ClassList oClass3List = new RT2020.Product.ClassList("Class3", controls[0]); oClass3List.DockPadding.All = 6; oClass3List.Dock = DockStyle.Fill; wspPane.Controls.Add(oClass3List); break; case "productcare_class4": RT2020.Product.ClassList oClass4List = new RT2020.Product.ClassList("Class4", controls[0]); oClass4List.DockPadding.All = 6; oClass4List.Dock = DockStyle.Fill; wspPane.Controls.Add(oClass4List); break; case "productcare_class5": RT2020.Product.ClassList oClass5List = new RT2020.Product.ClassList("Class5", controls[0]); oClass5List.DockPadding.All = 6; oClass5List.Dock = DockStyle.Fill; wspPane.Controls.Add(oClass5List); break; case "productcare_class6": RT2020.Product.ClassList oClass6List = new RT2020.Product.ClassList("Class6", controls[0]); oClass6List.DockPadding.All = 6; oClass6List.Dock = DockStyle.Fill; wspPane.Controls.Add(oClass6List); break; case "productcare_combination": RT2020.Product.CombinationList oCombinList = new RT2020.Product.CombinationList(controls[0]); oCombinList.DockPadding.All = 6; oCombinList.Dock = DockStyle.Fill; wspPane.Controls.Add(oCombinList); break; case "productcare_analysiscode": RT2020.Product.AnalysisCodeList oAnalysisList = new RT2020.Product.AnalysisCodeList(controls[0]); oAnalysisList.DockPadding.All = 6; oAnalysisList.Dock = DockStyle.Fill; wspPane.Controls.Add(oAnalysisList); break; case "journal_goodsreceive": RT2020.Inventory.GoodsReceive.Reports.JournalWizard wizCAPJournal = new RT2020.Inventory.GoodsReceive.Reports.JournalWizard(); wizCAPJournal.ShowDialog(); break; case "journal_goodsreturn": RT2020.Inventory.GoodsReturn.Reports.JournalWizard wizRETJournal = new RT2020.Inventory.GoodsReturn.Reports.JournalWizard(); wizRETJournal.ShowDialog(); break; case "journal_transfer": RT2020.Inventory.Transfer.Reports.JournalWizard wizTransferJournal = new RT2020.Inventory.Transfer.Reports.JournalWizard(); wizTransferJournal.ShowDialog(); break; case "journal_adjustment": RT2020.Inventory.Adjustment.Reports.JournalWizard wizADJJournal = new RT2020.Inventory.Adjustment.Reports.JournalWizard(); wizADJJournal.ShowDialog(); break; case "journal_replenishment": RT2020.Inventory.Replenishment.Reports.JournalWizard wizRPLJournal = new RT2020.Inventory.Replenishment.Reports.JournalWizard(); wizRPLJournal.ShowDialog(); break; case "journal_stocktake": RT2020.Inventory.StockTake.Reports.JournalWizard wizSTKTKJournal = new RT2020.Inventory.StockTake.Reports.JournalWizard(); wizSTKTKJournal.ShowDialog(); break; case "olap_qohatsnormal": oOlapViewer.ViewerType = RT2020.Controls.InvtUtility.InvtOlapViewerType.QoH_ATS; wspPane.Controls.Add(oOlapViewer); break; case "olap_qohatsnormal_withas": RT2020.Controls.Reporting.OlapViewer oOlapViewerAS = new RT2020.Controls.Reporting.OlapViewer(); oOlapViewerAS.DockPadding.All = 6; oOlapViewerAS.Dock = DockStyle.Fill; oOlapViewerAS.AspxPagePath = @"Inventory\Olap\QohAtsNormalWithOlapConnection.aspx"; wspPane.Controls.Add(oOlapViewerAS); break; case "olap_qohatscutoff": oOlapViewer.ViewerType = RT2020.Controls.InvtUtility.InvtOlapViewerType.QoH_ATS_WithCutOffDate; wspPane.Controls.Add(oOlapViewer); break; case "olap_stockreorder": oOlapViewer.ViewerType = RT2020.Controls.InvtUtility.InvtOlapViewerType.StockReorder; wspPane.Controls.Add(oOlapViewer); break; case "olap_stockinout": oOlapViewer.ViewerType = RT2020.Controls.InvtUtility.InvtOlapViewerType.StockIOHistory; wspPane.Controls.Add(oOlapViewer); break; case "olap_invtopeningclosing": oOlapViewer.ViewerType = RT2020.Controls.InvtUtility.InvtOlapViewerType.OCInventory; wspPane.Controls.Add(oOlapViewer); break; case "olap_stockvaluediscrepancyaudit": oOlapViewer.ViewerType = RT2020.Controls.InvtUtility.InvtOlapViewerType.DiscrepancyAudit; wspPane.Controls.Add(oOlapViewer); break; case "olap_stocktransfer": oOlapViewer.ViewerType = RT2020.Controls.InvtUtility.InvtOlapViewerType.StockTransfer; wspPane.Controls.Add(oOlapViewer); break; case "olap_capsummary": oOlapViewer.ViewerType = RT2020.Controls.InvtUtility.InvtOlapViewerType.CAP_Summary; wspPane.Controls.Add(oOlapViewer); break; case "invthistory_monthlyinout": //RT2020.Inventory.Reports.History.InOutHistory_Monthly wizMonthlyHist = new RT2020.Inventory.Reports.History.InOutHistory_Monthly(); //wizMonthlyHist.ShowDialog(); var monthly = new RT2020.Inventory.Reports.Journal.Monthly(); monthly.DockPadding.All = 6; monthly.Dock = DockStyle.Fill; wspPane.Controls.Add(monthly); break; case "invthistory_inoutlist": //RT2020.Inventory.Reports.History.InOutHistory_List wizInOutList = new RT2020.Inventory.Reports.History.InOutHistory_List(); //wizInOutList.ShowDialog(); var list = new RT2020.Inventory.Reports.Journal.List(); list.DockPadding.All = 6; list.Dock = DockStyle.Fill; wspPane.Controls.Add(list); break; case "invthistory_inoutsummary": //RT2020.Inventory.Reports.History.InOutHistory_Summary wizInOutSummary = new RT2020.Inventory.Reports.History.InOutHistory_Summary(); //wizInOutSummary.ShowDialog(); var summary = new RT2020.Inventory.Reports.Journal.Summary(); summary.DockPadding.All = 6; summary.Dock = DockStyle.Fill; wspPane.Controls.Add(summary); break; case "price_change": RT2020.PriceMgmt.PriceMgmtList wizPriceChangeList = new RT2020.PriceMgmt.PriceMgmtList(controls[0], EnumHelper.PriceMgmtPMType.Price); wizPriceChangeList.DockPadding.All = 6; wizPriceChangeList.Dock = DockStyle.Fill; wspPane.Controls.Add(wizPriceChangeList); break; case "discount_change": RT2020.PriceMgmt.PriceMgmtList wizDiscChangeList = new RT2020.PriceMgmt.PriceMgmtList(controls[0], EnumHelper.PriceMgmtPMType.Discount); wizDiscChangeList.DockPadding.All = 6; wizDiscChangeList.Dock = DockStyle.Fill; wspPane.Controls.Add(wizDiscChangeList); break; case "reason_code": RT2020.PriceMgmt.DiscountReasonList oReasonList = new RT2020.PriceMgmt.DiscountReasonList(controls[0]); oReasonList.DockPadding.All = 6; oReasonList.Dock = DockStyle.Fill; wspPane.Controls.Add(oReasonList); break; case "sales_input": RT2020.EmulatedPoS.DefaultList oSalesInputList = new RT2020.EmulatedPoS.DefaultList(controls[0], EnumHelper.TxType.CAS); oSalesInputList.DockPadding.All = 6; oSalesInputList.Dock = DockStyle.Fill; wspPane.Controls.Add(oSalesInputList); break; case "sales_return": RT2020.EmulatedPoS.DefaultList oSalesReturnList = new RT2020.EmulatedPoS.DefaultList(controls[0], EnumHelper.TxType.CRT); oSalesReturnList.DockPadding.All = 6; oSalesReturnList.Dock = DockStyle.Fill; wspPane.Controls.Add(oSalesReturnList); break; } } }
void cmdMenuClick(object sender, MenuItemEventArgs e) { if (!(e.MenuItem.Tag == null)) { switch (e.MenuItem.Tag.ToString().ToLower()) { case "stocktake_allitems": RT2020.Inventory.StockTake.AllItems wizStkAll = new RT2020.Inventory.StockTake.AllItems(); wizStkAll.ShowDialog(); break; case "stocktake_partial": RT2020.Inventory.StockTake.PartialItems wizStkPartial = new RT2020.Inventory.StockTake.PartialItems(); wizStkPartial.ShowDialog(); break; case "stocktake": RT2020.Inventory.StockTake.Wizard wizStockTake = new RT2020.Inventory.StockTake.Wizard(); wizStockTake.ShowDialog(); break; case "importfromppc": RT2020.Inventory.StockTake.Import.ImportFromPPC wizPPC = new RT2020.Inventory.StockTake.Import.ImportFromPPC(); wizPPC.ShowDialog(); break; case "importfrompos": RT2020.Inventory.StockTake.Import.ImportFromPoS wizPoS = new RT2020.Inventory.StockTake.Import.ImportFromPoS(); wizPoS.ShowDialog(); break; case "importfrompalm": break; case "hhtreview_summation": RT2020.Inventory.StockTake.HHTDataReviewAndSummation wizReview_Summation = new HHTDataReviewAndSummation(); wizReview_Summation.ShowDialog(); break; case "recapture_onhand_quantity": RT2020.Inventory.StockTake.RecaptureOnhand wizRecaptureOnhand = new RT2020.Inventory.StockTake.RecaptureOnhand(); wizRecaptureOnhand.ShowDialog(); break; case "stocktake_approval": RT2020.Inventory.StockTake.Approval wizApproval = new RT2020.Inventory.StockTake.Approval(); wizApproval.ShowDialog(); break; case "stocktake_authorization": RT2020.Inventory.StockTake.Authorization wizAuthStk = new RT2020.Inventory.StockTake.Authorization(); wizAuthStk.ShowDialog(); break; case "rpt_worksheet": RT2020.Inventory.StockTake.Reports.Worksheet wizRptWorksheet = new RT2020.Inventory.StockTake.Reports.Worksheet(); wizRptWorksheet.ShowDialog(); break; case "rpt_history": RT2020.Inventory.StockTake.Reports.History wizRptHistory = new RT2020.Inventory.StockTake.Reports.History(); wizRptHistory.ShowDialog(); break; case "rpt_journal": RT2020.Inventory.StockTake.Reports.JournalWizard wizRptJournal = new RT2020.Inventory.StockTake.Reports.JournalWizard(); wizRptJournal.ShowDialog(); break; case "rpt_hhtworksheet": RT2020.Inventory.StockTake.Reports.HHTWorksheet wizHHTWorksheet = new RT2020.Inventory.StockTake.Reports.HHTWorksheet(); wizHHTWorksheet.ShowDialog(); break; case "rpt_hhthistory": RT2020.Inventory.StockTake.Reports.HHTHistory wizHHTHistory = new RT2020.Inventory.StockTake.Reports.HHTHistory(); wizHHTHistory.ShowDialog(); break; case "rpt_varianceworksheet": RT2020.Inventory.StockTake.Reports.VarianceList wizVarianceWorksheet = new RT2020.Inventory.StockTake.Reports.VarianceList(); wizVarianceWorksheet.ReportType = RT2020.Inventory.StockTake.Reports.VarianceList.VarianceReportType.Worksheet; wizVarianceWorksheet.ShowDialog(); break; case "rpt_variancehistory": RT2020.Inventory.StockTake.Reports.VarianceList wizVarianceHistory = new RT2020.Inventory.StockTake.Reports.VarianceList(); wizVarianceHistory.ReportType = RT2020.Inventory.StockTake.Reports.VarianceList.VarianceReportType.History; wizVarianceHistory.ShowDialog(); break; case "rpt_varianceworksheet_withoutcost": RT2020.Inventory.StockTake.Reports.VarianceList wizVarianceWorksheetWithoutCost = new RT2020.Inventory.StockTake.Reports.VarianceList(); wizVarianceWorksheetWithoutCost.ReportType = RT2020.Inventory.StockTake.Reports.VarianceList.VarianceReportType.WorksheetWithoutCost; wizVarianceWorksheetWithoutCost.ShowDialog(); break; case "rpt_variancehistory_withoutcost": RT2020.Inventory.StockTake.Reports.VarianceList wizVarianceHistoryWithoutCost = new RT2020.Inventory.StockTake.Reports.VarianceList(); wizVarianceHistoryWithoutCost.ReportType = RT2020.Inventory.StockTake.Reports.VarianceList.VarianceReportType.HistoryWithoutCost; wizVarianceHistoryWithoutCost.ShowDialog(); break; } } }