Пример #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 InsertHoaDonBan(int idtable)
        {
            string query = "USP_InsertHoaDonBan @idtable ";

            SqlServerHelper.ExecuteNonQuery(query, new object[] { idtable });
        }
Пример #3
0
        public static void DeleteHoaDonBan(int idtable)
        {
            string query = "delete HOADONBAN where MABA = " + idtable + "";

            SqlServerHelper.ExecuteNonQuery(query);
        }
Пример #4
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 });
        }
Пример #5
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 });
        }
Пример #6
0
        public static void SuaTrangThaiBA(int idtable, int trangthai)
        {
            string query = "update BANAN set TRANGTHAI = " + trangthai + " where MABA = " + idtable + "";

            SqlServerHelper.ExecuteNonQuery(query);
        }
Пример #7
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 });
        }
Пример #8
0
        public static void DeleteChiTietBan(int mahdb)
        {
            string query = "delete CHITIETBAN where MAHDB = " + mahdb + "";

            SqlServerHelper.ExecuteNonQuery(query);
        }
Пример #9
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 });
        }
Пример #10
0
        public static void UpdateHoaDonBan(int idtable)
        {
            string query = "update HOADONBAN set STATUS = 1 where MABA = " + idtable + "";

            SqlServerHelper.ExecuteNonQuery(query);
        }