Esempio n. 1
0
 private void clickItemThongTinChiTietDocGia(object sender, EventArgs e)
 {
     if (listViewDocGia.SelectedItems.Count > 0)
     {
         ListViewItem            lvi    = listViewDocGia.SelectedItems[0];
         DocGia                  docGia = lvi.Tag as DocGia;
         ThongTinChiTietDocGiacs temp   = new ThongTinChiTietDocGiacs(docGia.maDocGia);
         temp.Show();
     }
     else
     {
         MessageBox.Show("Bạn phải chọn 1 độc giả");
     }
 }
Esempio n. 2
0
        private void luuThongTinDocGia(object sender, EventArgs e)
        {
            DocGia suaDocGia = new DocGia();

            suaDocGia.maDocGia  = docGia.maDocGia;
            suaDocGia.tenDocGia = txtBoxSuaTenDocGia.Text;
            suaDocGia.donVi     = txtBoxDonVi.Text;
            suaDocGia.ngaySinh  = DateTime.Parse(dateTimeSuaNgaySinh.Text);
            suaDocGia.queQuan   = txtBoxQuequan.Text;
            suaDocGia.sdt       = Int32.Parse(txtBoxSdt.Text);
            if (docGiaBLL.SuaDocGia(suaDocGia))
            {
                ThongTinChiTietDocGiacs thongTinChiTietDocGiacs = new ThongTinChiTietDocGiacs(suaDocGia.maDocGia);
                thongTinChiTietDocGiacs.Show();
            }
            else
            {
                MessageBox.Show("Sửa thông tin lỗi");
            }
            Close();
        }