public Datasource.dsData.RoleDetialRow RuleElementInformation(string ElementName) { Datasource.dsData.RoleDetialRow output = UserRuleDetialsTable.NewRoleDetialRow(); if (User.IsAdmin) { output.Selecting = output.Inserting = output.Updateing = output.Deleting = true; return(output); } output.Selecting = output.Inserting = output.Updateing = output.Deleting = false; foreach (Datasource.dsData.RoleDetialRow element in UserRuleDetialsTable) { if (element.MenuItemName == ElementName) { if (element.Selecting) { output.Selecting = true; } if (element.Inserting) { output.Inserting = true; } if (element.Updateing) { output.Updateing = true; } if (element.Deleting) { output.Deleting = true; } } } return(output); }
public CompanyUC(Datasource.dsData.RoleDetialRow RuleElement) { InitializeComponent(); _elementRule = RuleElement; tBLCompanyTableAdapter.Fill(dsData.TBLCompany); if (dsData.TBLCompany.Count == 0) { Datasource.dsData.TBLCompanyRow row = dsData.TBLCompany.NewTBLCompanyRow(); row.Companyname = row.dep = row.foterleft = row.fotermiddel = row.foterright = string.Empty; dsData.TBLCompany.AddTBLCompanyRow(row); row.EndEdit(); } }
private void FillRoleDetial() { DisableMenu(); for (int menuIndex = 0; menuIndex < ribbonControlMain.Items.Count; menuIndex++) { for (int rowIndex = 0; rowIndex < dsRetirementCenter.RoleDetial.Rows.Count; rowIndex++) { Datasource.dsData.RoleDetialRow row = (Datasource.dsData.RoleDetialRow)dsRetirementCenter.RoleDetial.Rows[rowIndex]; if (ribbonControlMain.Items[menuIndex].Name == row.MenuItemName) { ribbonControlMain.Items[menuIndex].ImageIndex = (int)ribbonControlMain.Items[menuIndex].Tag; ribbonControlMain.Items[menuIndex].LargeImageIndex = (int)ribbonControlMain.Items[menuIndex].Tag; } } } }
private void windowsUIView_QueryControl(object sender, QueryControlEventArgs e) { Datasource.dsData.RoleDetialRow RuleElemet = Classes.Managers.UserManager.defaultInstance.RuleElementInformation(e.Document.ControlName); if (e.Control != null) { return; } if (e.Document == docUserSetting) { e.Control = new UserSettingsUC(); } //---------Code else if (e.Document == docCodeCdAssetplace) { e.Control = new CdAssetplaceEditorUC(RuleElemet); } else if (e.Document == docCodecdJob) { e.Control = new CdJobEditorUC(RuleElemet); } else if (e.Document == docCodeCdDepertment) { e.Control = new CdDepertmentEditorUC(RuleElemet); } else if (e.Document == docCodeCdAssetPropertiy) { e.Control = new CdAssetPropertiyEditorUC(RuleElemet); } else if (e.Document == docCodeCdAssetState) { e.Control = new CdAssetStateEditorUC(RuleElemet); } else if (e.Document == docCodeCDComponents) { e.Control = new CDComponentsEditorUC(RuleElemet); } else if (e.Document == docCodeCDInsuranceCo) { e.Control = new CDInsuranceCoEditorUC(RuleElemet); } else if (e.Document == docCodeTBLCompany) { e.Control = new CompanyUC(RuleElemet); } //---------Data else if (e.Document == docDataCdAssetsCategory) { e.Control = new CdAssetsCategoryEditorUC(RuleElemet); } else if (e.Document == docDataTblEmp) { e.Control = new TblEmpEditorUC(RuleElemet); } else if (e.Document == docDataTBLSuppliers) { e.Control = new TBLSuppliersEditorUC(RuleElemet); } else if (e.Document == docDataTBLTwreedOrder) { e.Control = new TBLTwreedOrderEditorUC(RuleElemet); } else if (e.Document == docDataTBLCheck) { e.Control = new TBLCheckUC(RuleElemet); } else if (e.Document == docDataTBLEznEdafa) { e.Control = new TBLEznEdafaUC(RuleElemet); } else if (e.Document == docDataTBLEznSarf) { e.Control = new TBLEznSarfUC(RuleElemet); } //---------Rules else if (e.Document == docRuleUsers) { e.Control = new UsersUC(RuleElemet); } else if (e.Document == docRuleRule) { e.Control = new RolesUC(RuleElemet); } else if (e.Document == docRuleUserRoles) { e.Control = new UserRolesUC(RuleElemet); } else if (e.Document == docRuleRuleDetails) { e.Control = new RuleDetailsUC(RuleElemet); } else if (e.Document == docQryQry001)//Qry { e.Control = new Qry001UC(); } else if (e.Document == docQryQry002) { e.Control = new Qry002UC(); } else if (e.Document == docQryQry003) { e.Control = new Qry003UC(); } }
public CdAssetPropertiyEditorUC(Datasource.dsData.RoleDetialRow RuleElement) { InitializeComponent(); _elementRule = RuleElement; }
public CDComponentsEditorUC(Datasource.dsData.RoleDetialRow RuleElement) { InitializeComponent(); _elementRule = RuleElement; }
public TBLTwreedOrderEditorUC(Datasource.dsData.RoleDetialRow RuleElement) { InitializeComponent(); _elementRule = RuleElement; }
public TBLCheckUC(Datasource.dsData.RoleDetialRow RuleElement) { InitializeComponent(); _elementRule = RuleElement; }