Beispiel #1
0
        private void btnXoa_Click(object sender, EventArgs e)
        {
            DialogResult check = MessageBox.Show("Bạn có muốn xóa không", "Thông báo", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            if (check == DialogResult.Yes)
            {
                ENTITY.NhaXuatBan nxb = new ENTITY.NhaXuatBan();
                nxb.ID_NhaXuatBan = txtMaNXB.Text.Trim();
                DAL.NhaXuatBan_Controler nx = new DAL.NhaXuatBan_Controler();
                nx.deleteNhaXuatBan(nxb);
            }
            showLsvNXB();
            lockControl();
        }
Beispiel #2
0
 private void btnLuu_Click(object sender, EventArgs e)
 {
     ENTITY.NhaXuatBan n = new ENTITY.NhaXuatBan();
     n.ID_NhaXuatBan = txtMaNXB.Text.Trim();
     n.TenNXB        = txtTenNXB.Text.Trim();
     n.DiaChi        = txtDiaChi.Text.Trim();
     n.SDT           = txtSDT.Text.Trim();
     DAL.NhaXuatBan_Controler nxb = new DAL.NhaXuatBan_Controler();
     if (kt == true)
     {
         nxb.insertNhanXuatBan(n);
     }
     else
     {
         nxb.editNhanXuatBan(n);
     }
     lockControl();
     showLsvNXB();
 }