private void ShowWorkspace(ref Panel wspPane, string Tag) { if (!string.IsNullOrEmpty(Tag)) { switch (Tag.ToLower()) { case "settings.staff": RT2020.Staff.StaffList oStaffList = new RT2020.Staff.StaffList(); oStaffList.DockPadding.All = 6; oStaffList.Dock = DockStyle.Fill; wspPane.Controls.Add(oStaffList); break; case "settings.supplier": RT2020.Supplier.SupplierList oSupplierList = new RT2020.Supplier.SupplierList(); oSupplierList.DockPadding.All = 6; oSupplierList.Dock = DockStyle.Fill; wspPane.Controls.Add(oSupplierList); break; case "settings.workplace": RT2020.Workplace.WorkplaceList oWorkplaceList = new RT2020.Workplace.WorkplaceList(); oWorkplaceList.DockPadding.All = 6; oWorkplaceList.Dock = DockStyle.Fill; wspPane.Controls.Add(oWorkplaceList); break; case "settings.label": RT2020.Settings.SystemLabels oSysLabel = new RT2020.Settings.SystemLabels(); oSysLabel.Dock = DockStyle.Fill; oSysLabel.DockPadding.All = 6; wspPane.Controls.Add(oSysLabel); break; case "settings.info": RT2020.Settings.SystemInfoForm oSysInfo = new RT2020.Settings.SystemInfoForm(); oSysInfo.Dock = DockStyle.Fill; oSysInfo.DockPadding.All = 6; wspPane.Controls.Add(oSysInfo); break; case "settings.monthend": RT2020.Settings.SystemMonthEnd oSysMe = new RT2020.Settings.SystemMonthEnd(); oSysMe.Dock = DockStyle.Fill; oSysMe.DockPadding.All = 6; wspPane.Controls.Add(oSysMe); break; case "settings.security": if (NetSqlAzManHelper.UseNetSqlAzMan) { #region 使用 RT2020 NetSqlAzMan Access Control var netSql = new VWG.Community.NetSqlAzMan.WebConsole() { Dock = DockStyle.Fill, SqlConnectionString = NetSqlAzManHelper.ConnectionString, Theme = ThemeHelper.CurrentTheme }; wspPane.Controls.Add(netSql); #endregion } else { #region 使用 RT2008 Access Control RT2020.Settings.SystemSecurity oSysSec = new RT2020.Settings.SystemSecurity(); oSysSec.Dock = DockStyle.Fill; oSysSec.DockPadding.All = 6; wspPane.Controls.Add(oSysSec); #endregion } break; case "settings.translation": RT2020.Settings.Translation oTranslate = new RT2020.Settings.Translation(); oTranslate.Dock = DockStyle.Fill; oTranslate.DockPadding.All = 6; wspPane.Controls.Add(oTranslate); break; case "settings.phone": var oPhone = new RT2020.Settings.SuperUser.Phone(); oPhone.Dock = DockStyle.Fill; oPhone.DockPadding.All = 6; wspPane.Controls.Add(oPhone); break; } } }
private void ShowWorkspace(ref Panel wspPane, string Tag) { if (!string.IsNullOrEmpty(Tag)) { //Control[] controls = this.Form.Controls.Find("atsPane", true); // 2020.08.28 paulus: RT2020 搬咗個 ActionStripBar 落嚟 wspPane 度 Control[] controls = this.Form.Controls.Find("wspPane", true); switch (Tag.ToLower()) { case "pur_purchaseorders": RT2020.Purchasing.DefaultPOList oPOList = new RT2020.Purchasing.DefaultPOList(); oPOList.DockPadding.All = 6; oPOList.Dock = DockStyle.Fill; wspPane.Controls.Add(oPOList); break; case "pur_poreceiving": RT2020.Purchasing.DefaultRECList oPORecvList = new RT2020.Purchasing.DefaultRECList(); oPORecvList.DockPadding.All = 6; oPORecvList.Dock = DockStyle.Fill; wspPane.Controls.Add(oPORecvList); break; case "pur_settleorders": RT2020.Purchasing.DefaultOSTList oOSTList = new RT2020.Purchasing.DefaultOSTList(); oOSTList.DockPadding.All = 6; oOSTList.Dock = DockStyle.Fill; wspPane.Controls.Add(oOSTList); break; case "pur_blankworksheet": RT2020.Purchasing.Reports.ReceivingSchedule.BlankSheet wizBlankSheet = new RT2020.Purchasing.Reports.ReceivingSchedule.BlankSheet(); wizBlankSheet.ShowDialog(); break; case "pur_worksheet": RT2020.Purchasing.Reports.ReceivingSchedule.Worksheet wizWorksheet = new RT2020.Purchasing.Reports.ReceivingSchedule.Worksheet(); wizWorksheet.ShowDialog(); break; case "pur_history": RT2020.Purchasing.Reports.ReceivingSchedule.History wizHistory = new RT2020.Purchasing.Reports.ReceivingSchedule.History(); wizHistory.ShowDialog(); break; case "pur_printableorders": RT2020.Purchasing.Reports.OfficialDocument.PrintableOrders wizPOrders = new RT2020.Purchasing.Reports.OfficialDocument.PrintableOrders(); wizPOrders.ShowDialog(); break; case "pur_excelmatrix": RT2020.Purchasing.Reports.OfficialDocument.ExcelMatrix wizXlsMatrix = new RT2020.Purchasing.Reports.OfficialDocument.ExcelMatrix(); wizXlsMatrix.ShowDialog(); break; case "pur_ordersummary": RT2020.Purchasing.Reports.OfficialDocument.OrderSummary wizOrderSummary = new RT2020.Purchasing.Reports.OfficialDocument.OrderSummary(); wizOrderSummary.ShowDialog(); break; case "pur_olapordersummary": break; case "settings_supplier": RT2020.Supplier.SupplierList oSupplierList = new RT2020.Supplier.SupplierList(); oSupplierList.DockPadding.All = 6; oSupplierList.Dock = DockStyle.Fill; wspPane.Controls.Add(oSupplierList); 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; } } }