示例#1
0
 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");
         }
     }
 }
示例#2
0
        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>");
            }
        }
示例#3
0
 public int Insert(DonViTinh obj)
 {
     return(dao.Insert(obj));
 }
 public Int64 Insert(DonViTinhDTO _nv)
 {
     return(nvDAO.Insert(_nv));
 }
示例#5
0
 /// <summary>
 /// Thêm đơn vị tính
 /// </summary>
 public static void Insert(EDonViTinh eDonViTinh, ref byte errorDVT)
 {
     DonViTinhDAO.Insert(eDonViTinh, ref errorDVT);
 }