private void btnSave_Click(object sender, EventArgs e) { CStudentEntity student = dataStudent(); if (CStudentBusiness.editStudent(student) == false) { MessageBox.Show("Save failure!"); return; } else { this.Close(); } }
private bool loadComponent() { this.student = CStudentBusiness.loadStudentInfor(this.strStudentId); if (student == null) { MessageBox.Show("Error load data!"); return(false); } picStudentImage.Image = loadStudentImage(); txtStudentName.Text = student.StudentName; txtGenders.Text = student.Genders?"Nam": "Nữ"; txtDateOfBirth.Text = student.DateOfBirth.Value.ToShortDateString(); txtAddress.Text = student.Address; return(true); }
private void GetStudentId_Event(string strStudentId) { frmAccountSign.Hide(); student = new CStudentEntity(); student = CStudentBusiness.getStudentData(strStudentId); if (childThread.ThreadState == ThreadState.Aborted) { childThread.DisableComObjectEagerCleanup(); ThreadStart childref = new ThreadStart(loadDelay); childThread = new Thread(childref); } childThread.Start(); Thread.Sleep(600); reLblHelloInfor("Hello, " + student.StudentName); this.barManagerAccount.SetPopupContextMenu(this.lblStudentName, this.popupMenuAccount); loadFormTableTime(); }
private bool loadComponent() { this.student = CStudentBusiness.loadStudentInfor(student.StudentId); if (student == null) { MessageBox.Show("Error load data!"); return(false); } picStudentImage.Image = loadStudentImage(); txtStudentName.Text = student.StudentName; if (student.Genders) { rdoGenders.SelectedIndex = 0; } else { rdoGenders.SelectedIndex = 1; } txtDateOfBirth.Text = student.DateOfBirth.Value.ToShortDateString(); txtAddress.Text = student.Address; return(true); }