private void btnLuu_Click(object sender, EventArgs e) { if (_isAddNew) { if (_DonViTinhDAO.Insert(txtMa.Text, txtTen.Text, txtGhiChu.Text, ckbConQuanLy.Checked)) { MessageBox.Show(this, "Đã Thêm mới một Đơn Vị Tính", "thành công"); } else { MessageBox.Show(this, "Có Lỗi xảy ra", "Lỗi"); } } else { if (_DonViTinhDAO.Update(txtMa.Text, txtTen.Text, txtGhiChu.Text, ckbConQuanLy.Checked)) { MessageBox.Show(this, "Đã Chỉnh Sửa thông tin một Đơn Vị Tính", "thành công"); } else { MessageBox.Show(this, "Có Lỗi xảy ra", "Lỗi"); } } }
public int Update(DonViTinh obj) { return(dao.Update(obj)); }
public Int64 Update(DonViTinhDTO _nv) { return(nvDAO.Update(_nv)); }
/// <summary> /// Cập nhật đơn vị tính /// </summary> public static void Update(EDonViTinh eDonViTinh) { DonViTinhDAO.Update(eDonViTinh); }