예제 #1
0
 public static int xoa_tb(Thietbi a)
 {
     SqlParameter[] para = new SqlParameter[]
     {
         new SqlParameter("@matb", a.Matb),
     };
     return(DataProvider.ExecuteNonQuery("xoa_tb", para));
 }
예제 #2
0
 public static int sua_tb(Thietbi a)
 {
     SqlParameter[] para = new SqlParameter[]
     {
         new SqlParameter("@matb", a.Matb),
         new SqlParameter("@tentb", a.Tentb),
         new SqlParameter("@loaitb", a.Loaitb),
         new SqlParameter("@soluong", a.Soluong),
         new SqlParameter("@namsx", a.Namsx),
         new SqlParameter("@hangsx", a.Hangsx),
         new SqlParameter("@giatb", a.Giatb),
         new SqlParameter("@manql", a.Manql)
     };
     return(DataProvider.ExecuteNonQuery("sua_tb", para));
 }
예제 #3
0
        private void btnXoa_Click(object sender, EventArgs e)
        {
            Thietbi a = new Thietbi();

            a.Matb    = txt_matb.Text.Trim();
            a.Tentb   = txt_tentb.Text.Trim();
            a.Giatb   = int.Parse(txt_giatb.Text.Trim());
            a.Loaitb  = txt_loaitb.Text.Trim();
            a.Soluong = int.Parse(txt_sl.Text.Trim());
            a.Hangsx  = txt_hangsx.Text.Trim();
            a.Namsx   = int.Parse(txt_namsx.Text.Trim());
            a.Manql   = int.Parse(txt_manql.Text.Trim());
            if (a.Matb == null)
            {
                MessageBox.Show("Không được để trống mã thiết bị!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            if (BUS.BUS.xoa_tb(a) == 1)
            {
                MessageBox.Show("Xóa thành công");
                txt_matb.Enabled = false;
            }
            xuat();
        }
예제 #4
0
 public static int xoa_tb(Thietbi a)
 {
     return(DAO.xoa_tb(a));
 }
예제 #5
0
 public static int sua_tb(Thietbi a)
 {
     return(DAO.sua_tb(a));
 }
예제 #6
0
 public static int them_tb(Thietbi a)
 {
     return(DAO.them_tb(a));
 }