private ctLothuoc getLothuocupdate(int i) { ctLothuoc c = new ctLothuoc(); c.Mathuoc = dg_ctiet.Rows[i].Cells[0].Value.ToString().Trim(); c.Soluong = dg_ctiet.Rows[i].Cells[2].Value.ToString().Trim(); c.Solothuoc = dg_ctiet.Rows[i].Cells[6].Value.ToString().Trim(); return(c); }
private ctLothuoc getCTLoThuoc(int i) { ctLothuoc l = new ctLothuoc(); l.Solothuoc = txt_solo.Text; l.Mathuoc = dg_ctiet.Rows[i].Cells[0].Value.ToString().Trim(); l.Soluong = dg_ctiet.Rows[i].Cells[2].Value.ToString().Trim(); l.NgaySX = dg_ctiet.Rows[i].Cells[4].Value.ToString().Trim(); l.HanSD = dg_ctiet.Rows[i].Cells[5].Value.ToString().Trim(); l.Gianhap = dg_ctiet.Rows[i].Cells[3].Value.ToString().Trim(); return(l); }
public void delete(ctLothuoc c) { openC(); SqlCommand cmd = new SqlCommand("sp_delete_ctLothuoc", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add(new SqlParameter("@solothuoc", c.Solothuoc)); cmd.ExecuteNonQuery(); closeC(); }
public void insert(ctLothuoc c) { openC(); SqlCommand cmd = new SqlCommand("sp_insert_ctLothuoc", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add(new SqlParameter("@solothuoc", c.Solothuoc)); cmd.Parameters.Add(new SqlParameter("@mathuoc", c.Mathuoc)); cmd.Parameters.Add(new SqlParameter("@soluong", c.Soluong)); cmd.Parameters.Add(new SqlParameter("@ngaySX", c.NgaySX)); cmd.Parameters.Add(new SqlParameter("@hanSD", c.HanSD)); cmd.Parameters.Add(new SqlParameter("@gianhap", c.Gianhap)); cmd.ExecuteNonQuery(); closeC(); }
public void delete(ctLothuoc c) { ct.delete(c); }
public void update(ctLothuoc c) { ct.update(c); }
public void insert(ctLothuoc c) { ct.insert(c); }