private void buttonKyLuatNhanSu_Click(object sender, EventArgs e) { DataGridViewCellCollection cell = dataGridViewQuyetDinhKyLuat.CurrentRow.Cells; DTO.KyLuat kyLuat = new DTO.KyLuat(cell[0].Value.ToString(), DateTime.ParseExact(cell[1].Value.ToString(), "M/d/yyyy hh:mm:ss tt", null), DateTime.ParseExact(cell[2].Value.ToString(), "M/d/yyyy hh:mm:ss tt", null), cell[3].Value.ToString(), cell[4].Value.ToString(), cell[5].Value.ToString(), cell[6].Value.ToString()); this.Hide(); KyLuatNhanVien formKyLuatNhanVien = new KyLuatNhanVien(kyLuat); formKyLuatNhanVien.FormClosed += FormKyLuatNhanVien_FormClosed; formKyLuatNhanVien.Show(); }
private void buttonChiTiet_Click(object sender, EventArgs e) { DataGridViewCellCollection cell = dataGridViewQuyetDinhKyLuat.CurrentRow.Cells; Trace.WriteLine(cell); DTO.KyLuat kyLuat = new DTO.KyLuat(cell[0].Value.ToString(), DateTime.ParseExact(cell[1].Value.ToString(), "M/d/yy", null), DateTime.ParseExact(cell[2].Value.ToString(), "M/d/yyyy hh:mm:ss tt", null), cell[3].Value.ToString(), cell[4].Value.ToString(), cell[5].Value.ToString(), cell[6].Value.ToString()); this.Hide(); ChiTietQuyetDinhKyLuat formChiTietQuyetDinhKyLuat = new ChiTietQuyetDinhKyLuat(kyLuat); formChiTietQuyetDinhKyLuat.FormClosed += FormChiTietQuyetDinhKyLuat_FormClosed; formChiTietQuyetDinhKyLuat.Show(); }
public ChiTietQuyetDinhKyLuat(DTO.KyLuat kyLuat) { InitializeComponent(); textBoxSoQuyetDinh.Text = kyLuat.SoQuyetDinh; textBoxNgayHieuLuc.Text = kyLuat.NgayHieuLuc.ToString("MM/dd/yyyy"); textBoxNgayHetHan.Text = kyLuat.NgayHetHan.ToString("MM/dd/yyyy"); textBoxNoiDung.Text = kyLuat.NoiDung; textBoxLiDo.Text = kyLuat.LiDo; textBoxHinhThuc.Text = kyLuat.HinhThuc; comboBoxTrangThai.Text = kyLuat.TrangThai; buttonLuu.Enabled = false; }
public KyLuatNhanVien(DTO.KyLuat kyLuat) { InitializeComponent(); nhanVienBUS = new NhanVienBUS(); kyLuatBUS = new KyLuatBUS(); textBoxSoQuyetDinh.Text = kyLuat.SoQuyetDinh; textBoxNgayHieuLuc.Text = kyLuat.NgayHieuLuc.ToString("MM/dd/yyyy"); textBoxNgayHetHan.Text = kyLuat.NgayHetHan.ToString("MM/dd/yyyy"); textBoxNoiDung.Text = kyLuat.NoiDung; textBoxLiDo.Text = kyLuat.LiDo; textBoxHinhThuc.Text = kyLuat.HinhThuc; textBoxTrangThai.Text = kyLuat.TrangThai; }