public PersonInformationCreate(CommonExchange.SysAccess userInfo, CommonExchange.Person personInfo, BaseServices.BaseServicesLogic baseServiceManager) : base(userInfo) { this.InitializeComponent(); _personInfo = personInfo; _baseServiceManager = baseServiceManager; this.FormClosing += new FormClosingEventHandler(ClassClosing); this.btnClose.Click += new EventHandler(btnCloseClick); this.btnRecord.Click += new EventHandler(btnRecordClick); }
public PersonInformationCreateUpdate(CommonExchange.SysAccess userInfo, CommonExchange.Person personInfo, BaseServices.BaseServicesLogic baseServiceManager) : base(userInfo) { this.InitializeComponent(); _userInfo = userInfo; _baseServiceManager = baseServiceManager; _personInfo = _personInfoTemp = personInfo; _personInfo.ObjectState = DataRowState.Modified; this.btnClose.Click += new EventHandler(btnCloseClick); this.btnRecord.Click += new EventHandler(btnRecordClick); }
//###############################################CLASS UserInfoAdminUpdate EVENTS################################################## //event is raised when the class is loaded protected override void ClassLoad(object sender, EventArgs e) { try { if (!RemoteServerLib.ProcStatic.IsSystemAccessAdmin(_userInfo)) { throw new Exception("You are not authorized to access this module."); } } catch (Exception ex) { RemoteClient.ProcStatic.ShowErrorDialog(ex.Message, "Error Loading"); this.Close(); } this.lnkPersonArchive.Visible = false; _baseServiceManager = new BaseServices.BaseServicesLogic(_userInfo); _personInfo = _newUserInfo.PersonInfo; this.AssingControlsValue(); this.SetPersonInformationControls(true); this.SetDataGridViewColumns(); this.txtUserName.Text = _newUserInfo.UserName; this.txtPassword.Text = this.txtConfirmPassword.Text = _newUserInfo.Password; if (_newUserInfo.UserStatus) { this.lblStatus.Text = "ACTIVE"; this.lblStatus.ForeColor = Color.Green; } else { this.lblStatus.Text = "DEACTIVATED"; this.lblStatus.ForeColor = Color.Red; } _administarationManager.InitializeAccessRightsDataGridView(this.dgvList, _newUserInfo.AccessRightsGrantedList); }//------------------------
//#########################################CLASS Student EVENTS########################################################### //event is raised when the class is loaded protected override void ClassLoad(object sender, EventArgs e) { this.lnkPersonArchive.Visible = this.lnkVerify.Enabled = false; _baseServiceManager = new BaseServices.BaseServicesLogic(_userInfo); _personInfo = _studentInfo.PersonInfo; this.AssingControlsValue(); this.SetPersonInformationControls(true); if (!_hasEnter && _studentInfo.Equals(_studentInfoTemp)) { _baseServiceManager.InitializePersonRelationshipDataGridView(this.dgvRelationship, _personInfo.PersonRelationshipList, this.lblEmerStatus); RemoteClient.ProcStatic.SetDataGridViewColumns(this.dgvRelationship, false); _hasEnter = true; } this.lblStdStudentId.Text = _studentInfo.StudentId; this.lblStdLastName.Text = _studentInfo.PersonInfo.LastName; this.lblStdFirstName.Text = _studentInfo.PersonInfo.FirstName; this.lblMiddleName.Text = _studentInfo.PersonInfo.MiddleName; this.lblStdCourse.Text = _studentInfo.CourseInfo.CourseTitle; this.lblStdScholarship.Text = _studentInfo.Scholarship; this.chkIsInternational.Checked = _studentInfo.IsInternational; this.txtStudentOtherInformation.Text = _studentInfo.OtherStudentInformation; this.chkForm138.Checked = _studentInfo.HasHsCard; this.chkTranscriptOfRecords.Checked = _studentInfo.HasTor; this.chkHonorableDismissal.Checked = _studentInfo.HasHonDismissal; this.chkGoodMoral.Checked = _studentInfo.HasGoodMoral; this.chkBirthCertificate.Checked = _studentInfo.HasBirthCert; this.chkMarriageContract.Checked = _studentInfo.HasMarriageContract; this.chkPhoto.Checked = _studentInfo.HasLatestPhoto; this.chkNCAE.Checked = _studentInfo.HasNcaeResult; }//--------------------------
//#######################################CLASS EmployeeUpdate EVENTS##################################################### //event is raised when the class is loaded protected override void ClassLoad(object sender, EventArgs e) { this.lnkPersonArchive.Visible = this.lnkVerify.Enabled = false; _baseServiceManager = new BaseServices.BaseServicesLogic(_userInfo); _personInfo = _empInfo.PersonInfo; this.AssingControlsValue(); this.SetPersonInformationControls(true); if (!_hasEnter) { this.InitializeControlsForUpdate(); _baseServiceManager.InitializePersonRelationshipDataGridView(this.dgvRelationship, _personInfo.PersonRelationshipList, lblEmerStatus); RemoteClient.ProcStatic.SetDataGridViewColumns(this.dgvRelationship, false); _hasEnter = true; } _empTemp = (CommonExchange.Employee)_empInfo.Clone(); }//--------------------------------