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"); } } }
protected void btnThem_Click(object sender, EventArgs e) { string tendon = txtDonVi.Text; bool kq = dv.Insert(tendon); if (kq == true) { Load(); } else { Response.Write("<script>alert('Không thêm được !');</script>"); } }
public int Insert(DonViTinh obj) { return(dao.Insert(obj)); }
public Int64 Insert(DonViTinhDTO _nv) { return(nvDAO.Insert(_nv)); }
/// <summary> /// Thêm đơn vị tính /// </summary> public static void Insert(EDonViTinh eDonViTinh, ref byte errorDVT) { DonViTinhDAO.Insert(eDonViTinh, ref errorDVT); }