private void DgwIssueBook_CellClick(object sender, DataGridViewCellEventArgs e) { if (dgwIssueBook.Rows.Count.Equals(0)) { return; } string issueID = dgwIssueBook.CurrentRow.Cells["IssueID"].Value.ToString(); dtoIssue = bllIssue.GetByID(issueID); txtIssueID.Text = dtoIssue.IssueID; txtLendingStaffID.Text = dtoIssue.StaffID; dtoLendingStaff = bllStaff.GetByID(dtoIssue.StaffID); txtLendingStaffName.Text = dtoLendingStaff.StaffName; txtIssueBookDate.Text = dtoIssue.IssueDate.ToString("dd / MM / yyyy"); txtIssueNotes.Text = dtoIssue.Notes; // btnReturn.Enabled = true; btnLost.Enabled = true; }
private void DgwStaffInfo_CellClick(object sender, DataGridViewCellEventArgs e) { if (dgwStaffInfo.Rows.Count.Equals(0)) { return; } // staff string staffID = dgwStaffInfo.CurrentRow.Cells["StaffID"].Value.ToString(); dtoStaff = bllStaff.GetByID(staffID); txtStaffID.Text = dtoStaff.StaffID; txtDateOfBirth.Text = dtoStaff.DateOfBirth.ToString("dd/MM/yyyy"); txtAddress.Text = dtoStaff.Address; txtEnable.Text = StringHelper.ActionStatus.GetByKey(dtoStaff.Status).Display; txtStaffName.Text = dtoStaff.StaffName; txtGender.Text = StringHelper.Gender.GetByKey(dtoStaff.Gender).Display; txtPhone.Text = dtoStaff.Phone; txtUserName.Text = dtoStaff.UserName; // btnUpdateStaff.Enabled = true; LoadImage(); }