public static int CheckHangTonKho(int mamh, int soluong) { string query = "USP_CheckHangTonKho @mamh , @soluong "; int chk = (int)SqlServerHelper.ExecuteScalar(query, new object[] { mamh, soluong }); return(chk); }
public static double TongTien(int mahdb) { string query = "USP_TongTien @mahdb "; try { int data = (int)SqlServerHelper.ExecuteScalar(query, new object[] { mahdb }); return(data); } catch { return(0); } }
public static int LayHoaDonTheoBan(int idtable) { string query = "select mahdb from hoadonban where MABA = " + idtable + " "; try { int id = (int)SqlServerHelper.ExecuteScalar(query); return(id); } catch (System.Exception ex) { return(-1); } }
public static int LayHoaDonBanMax() { return((int)SqlServerHelper.ExecuteScalar("select MAX(MAHDB) from HoaDonBan")); }