public UserGroups(UserGroupAPIs userGroupAPIs, UserGroupIndex userGroupIndex, bool removeVersusRename) { InitializeComponent(); try { this.userGroupAPIs = userGroupAPIs; this.userGroupIndex = userGroupIndex; this.removeVersusRename = removeVersusRename; this.textexCode.TextChanged += textexNewUserGroupID_TextChanged; this.textexName.TextChanged += textexNewUserGroupID_TextChanged; this.textexDescription.TextChanged += textexNewUserGroupID_TextChanged; this.textexCode.ReadOnly = this.userGroupIndex != null && this.removeVersusRename; this.textexName.ReadOnly = this.userGroupIndex != null && this.removeVersusRename; this.textexDescription.ReadOnly = this.userGroupIndex != null && this.removeVersusRename; this.Text = this.userGroupIndex != null ? (this.removeVersusRename ? "Delete group" : "Rename group") : "Add new group"; this.buttonOK.Text = this.userGroupIndex != null ? (this.removeVersusRename ? "Delete" : "Rename") : "Add"; if (this.userGroupIndex != null) { this.textexCode.Text = this.userGroupIndex.Code; this.textexName.Text = this.userGroupIndex.Name; this.textexDescription.Text = this.userGroupIndex.Description; } } catch (Exception exception) { ExceptionHandlers.ShowExceptionMessageBox(this, exception); } }
public UserControls() { InitializeComponent(); try { this.userControlRepository = CommonNinject.Kernel.Get <IUserControlRepository>(); this.userControlAPIs = new UserControlAPIs(CommonNinject.Kernel.Get <IUserControlAPIRepository>()); this.userGroupAPIs = new UserGroupAPIs(CommonNinject.Kernel.Get <IUserGroupAPIRepository>()); this.comboActiveOption.SelectedIndex = 0; this.fastUserControlIndexes.ShowGroups = true; this.fastUserControlIndexes.AboutToCreateGroups += fastGroups_AboutToCreateGroups; this.fastUserGroupDetails.ShowGroups = true; this.fastUserGroupDetails.AboutToCreateGroups += fastGroups_AboutToCreateGroups; this.fastUserSalespersons.ShowGroups = true; this.fastUserSalespersons.AboutToCreateGroups += fastGroups_AboutToCreateGroups; this.onDataLogs = this.userControlRepository.GetOnDataLogs(); this.onEventLogs = this.userControlRepository.GetOnEventLogs(); this.bindingOnDataLogs = this.checkOnDataLogs.DataBindings.Add("Checked", this, "OnDataLogs", true, DataSourceUpdateMode.OnPropertyChanged); this.bindingOnEventLogs = this.checkOnEventLogs.DataBindings.Add("Checked", this, "OnEventLogs", true, DataSourceUpdateMode.OnPropertyChanged); this.textexLegalNotice.Text = this.userControlRepository.GetLegalNotice(); this.labelUpdateSuccessfullly.Text = ""; this.separatorLegalNotice.Visible = false; } catch (Exception exception) { ExceptionHandlers.ShowExceptionMessageBox(this, exception); } }
public UserGroupControls() { InitializeComponent(); try { this.userGroupAPIs = new UserGroupAPIs(CommonNinject.Kernel.Get <IUserGroupAPIRepository>()); this.fastUserGroups.ShowGroups = true; this.fastUserGroups.AboutToCreateGroups += fastGroups_AboutToCreateGroups; this.fastUserGroupDetails.ShowGroups = true; this.fastUserGroupDetails.AboutToCreateGroups += fastGroups_AboutToCreateGroups; this.gridexUserGroupControls.AutoGenerateColumns = false; this.gridexUserGroupControls.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; this.gridexUserGroupReports.AutoGenerateColumns = false; this.gridexUserGroupReports.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; this.bindingListUserGroupControls = new BindingList <UserGroupControlDTO>(); this.gridexUserGroupControls.DataSource = this.bindingListUserGroupControls; this.bindingListUserGroupControls.ListChanged += bindingListUserGroupControls_ListChanged; this.bindingListUserGroupReports = new BindingList <UserGroupReportDTO>(); this.gridexUserGroupReports.DataSource = this.bindingListUserGroupReports; this.bindingListUserGroupReports.ListChanged += bindingListUserGroupReports_ListChanged; StackedHeaderDecorator stackedHeaderDecoratorControl = new StackedHeaderDecorator(this.gridexUserGroupControls); StackedHeaderDecorator stackedHeaderDecoratorReport = new StackedHeaderDecorator(this.gridexUserGroupReports); } catch (Exception exception) { ExceptionHandlers.ShowExceptionMessageBox(this, exception); } }
public UserGroupAvailableMembers(UserGroupAPIs userGroupAPIs, int userGroupID, string userGroupName) { InitializeComponent(); try { this.userGroupID = userGroupID; this.userGroupName = userGroupName; this.userGroupAPIs = userGroupAPIs; this.fastUserGroupAvailableMembers.ShowGroups = true; this.fastUserGroupAvailableMembers.AboutToCreateGroups += fastUserGroupAvailableMembers_AboutToCreateGroups; this.fastUserGroupAvailableMembers.SetObjects(this.userGroupAPIs.GetUserGroupAvailableMembers(this.userGroupID)); this.fastUserGroupAvailableMembers.Sort(this.olvUserType, SortOrder.Ascending); } catch (Exception exception) { ExceptionHandlers.ShowExceptionMessageBox(this, exception); } }
public UserControlAvailableGroups(UserControlAPIs userControlAPIs, UserGroupAPIs userGroupAPIs, string securityIdentifier, string userName) { InitializeComponent(); try { this.securityIdentifier = securityIdentifier; this.userName = userName; this.userControlAPIs = userControlAPIs; this.userGroupAPIs = userGroupAPIs; this.fastUserControlAvailableGroups.ShowGroups = true; this.fastUserControlAvailableGroups.AboutToCreateGroups += fastUserControlAvailableGroups_AboutToCreateGroups; this.fastUserControlAvailableGroups.SetObjects(this.userControlAPIs.GetUserControlAvailableGroups(this.securityIdentifier)); this.fastUserControlAvailableGroups.Sort(this.olvUserGroup, SortOrder.Ascending); } catch (Exception exception) { ExceptionHandlers.ShowExceptionMessageBox(this, exception); } }