public static void ChuyenBan(int idtable_old, int idtable_new) { string query = "USP_ChuyenBan @idtable_old , @idtable_new "; SqlServerHelper.ExecuteNonQuery(query, new object[] { idtable_old, idtable_new }); }
public static void InsertHoaDonBan(int idtable) { string query = "USP_InsertHoaDonBan @idtable "; SqlServerHelper.ExecuteNonQuery(query, new object[] { idtable }); }
public static void DeleteHoaDonBan(int idtable) { string query = "delete HOADONBAN where MABA = " + idtable + ""; SqlServerHelper.ExecuteNonQuery(query); }
public static void ThemBanAn(string TenBA, int SoCho, string ViTri) { string query = "INSERT INTO BANAN(TENBA, SOCHO, VITRI, TrangThai) VALUES ( @TENBA , @SOCHO , @VITRI , 0) "; SqlServerHelper.ExecuteNonQuery(query, new object[] { TenBA, SoCho, ViTri }); }
public static void CapNhatBanAn(int MaBA, string TenBA, int SoCho, string Vitri) { string query = "UPDATE BANAN SET TENBA = @TENBA , SOCHO = @SOCHO , VITRI = @VITRI WHERE MABA = @MABA"; SqlServerHelper.ExecuteNonQuery(query, new object[] { TenBA, SoCho, Vitri, MaBA }); }
public static void SuaTrangThaiBA(int idtable, int trangthai) { string query = "update BANAN set TRANGTHAI = " + trangthai + " where MABA = " + idtable + ""; SqlServerHelper.ExecuteNonQuery(query); }
public static void TraMon(int mahdb, int mamh, int soluong) { string query = "USP_TraMon @mahdb , @mamh , @soluong "; SqlServerHelper.ExecuteNonQuery(query, new object[] { mahdb, mamh, soluong }); }
public static void DeleteChiTietBan(int mahdb) { string query = "delete CHITIETBAN where MAHDB = " + mahdb + ""; SqlServerHelper.ExecuteNonQuery(query); }
public static void InsertChiTietBan(int mahdb, int mamh, int soluong) { string query = "USP_InsertChiTietBan @mahdb , @mamh , @soluong "; SqlServerHelper.ExecuteNonQuery(query, new object[] { mahdb, mamh, soluong }); }
public static void UpdateHoaDonBan(int idtable) { string query = "update HOADONBAN set STATUS = 1 where MABA = " + idtable + ""; SqlServerHelper.ExecuteNonQuery(query); }