예제 #1
0
        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 });
        }
예제 #2
0
        public static void DeleteHoaDonBan(int idtable)
        {
            string query = "delete HOADONBAN where MABA = " + idtable + "";

            SqlServerHelper.ExecuteNonQuery(query);
        }
예제 #3
0
 public static int LayHoaDonBanMax()
 {
     return((int)SqlServerHelper.ExecuteScalar("select MAX(MAHDB) from HoaDonBan"));
 }
예제 #4
0
        public static void XoaBanAn(int MaBA)
        {
            string query = "DELETE FROM BANAN WHERE MABA = @MABA";

            SqlServerHelper.ExecuteQuery(query, new object[] { MaBA });
        }
예제 #5
0
        public static void InsertHoaDonBan(int idtable)
        {
            string query = "USP_InsertHoaDonBan @idtable ";

            SqlServerHelper.ExecuteNonQuery(query, new object[] { idtable });
        }
예제 #6
0
        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 });
        }
예제 #7
0
        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 });
        }
예제 #8
0
        public static DataTable DanhSachBanTrong()
        {
            string query = "select * from BANAN where TRANGTHAI = 0";

            return(SqlServerHelper.ExecuteQuery(query));
        }
예제 #9
0
        public static void SuaTrangThaiBA(int idtable, int trangthai)
        {
            string query = "update BANAN set TRANGTHAI = " + trangthai + " where MABA = " + idtable + "";

            SqlServerHelper.ExecuteNonQuery(query);
        }
예제 #10
0
        public static DataTable DanhSachBanAn()
        {
            string query = "SELECT * FROM BANAN";

            return(SqlServerHelper.ExecuteQuery(query));
        }
예제 #11
0
        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 });
        }
예제 #12
0
        public static void DeleteChiTietBan(int mahdb)
        {
            string query = "delete CHITIETBAN where MAHDB = " + mahdb + "";

            SqlServerHelper.ExecuteNonQuery(query);
        }
예제 #13
0
        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 });
        }
예제 #14
0
        public static void UpdateHoaDonBan(int idtable)
        {
            string query = "update HOADONBAN set STATUS = 1 where MABA = " + idtable + "";

            SqlServerHelper.ExecuteNonQuery(query);
        }