private void Initialize() { try { user = new Logic.Projects.User(BTSS.Common.Core.ProjectConnectionString, BTSS.Common.Core.ProjectDataProvider); validation = new BTSS.Common.Validation(); validation.Validate(this); InitializeGrid(); if (Operation == BTSS.Common.Core.Operation.UPDATE || Operation == BTSS.Common.Core.Operation.VIEW) { DataRow dr; dr = user.GetUserDetails(UserId); textBoxID.Text = UserId; textBoxLastName.Text = dr["user_last_name"].ToString(); textBoxFirstName.Text = dr["user_first_name"].ToString(); textBoxUserName.Text = dr["user_name"].ToString(); textBoxUserName.Tag = dr["user_name"].ToString(); accountName = dr["user_name"].ToString().Substring(4, dr["user_name"].ToString().Length - 4).ToString(); if (Operation == BTSS.Common.Core.Operation.VIEW) { userControlButtonsSave.Visible = false; Lock(); } } LoadGroupAccess(); textBoxLastName.Focus(); } catch (Exception) { throw; } }
private void Initialize() { try { user = new Logic.Projects.User(BTSS.Common.Core.ProjectConnectionString, BTSS.Common.Core.ProjectDataProvider); validation = new BTSS.Common.Validation(); validation.Validate(this); SetControlListingAccessRights(); menuStrip = new ContextMenuStrip(); menuStrip.Items.Add("Display Projects"); menuStrip.Items[0].Click += new EventHandler(displayProjectsMenuStrip_ItemClicked); userControlListing.dataGridViewList.CellMouseDown +=new DataGridViewCellMouseEventHandler(dataGridViewList_CellMouseDown); } catch (Exception) { throw; } }