Beispiel #1
0
        public static DataTable QuanLyKho()
        {
            string query = "USP_QuanLyKho";

            DataTable data = SqlServerHelper.ExecuteQuery(query);

            return(data);
        }
Beispiel #2
0
        public static DataTable ThongKe(DateTime fromday, DateTime today)
        {
            string query = "USP_ThongKe @fromday , @today ";

            DataTable data = SqlServerHelper.ExecuteQuery(query, new object[] { fromday, today });

            return(data);
        }
        public static DataTable HienThiHoaDon(int idtable)
        {
            string query = "HienThiHoaDon @idtable ";

            DataTable data = SqlServerHelper.ExecuteQuery(query, new object[] { idtable });

            return(data);
        }
Beispiel #4
0
        public static List <BanAnDTO> DanhSachBanAnList()
        {
            DataTable ans   = new DataTable();
            string    query = "SELECT * FROM BANAN";

            ans = SqlServerHelper.ExecuteQuery(query);

            List <BanAnDTO> ketqua = new List <BanAnDTO>();

            ketqua.Clear();
            foreach (DataRow row in ans.Rows)
            {
                BanAnDTO banan = new BanAnDTO(row);
                ketqua.Add(banan);
            }

            return(ketqua);
        }
Beispiel #5
0
        public static void XoaBanAn(int MaBA)
        {
            string query = "DELETE FROM BANAN WHERE MABA = @MABA";

            SqlServerHelper.ExecuteQuery(query, new object[] { MaBA });
        }
Beispiel #6
0
        public static DataTable DanhSachBanTrong()
        {
            string query = "select * from BANAN where TRANGTHAI = 0";

            return(SqlServerHelper.ExecuteQuery(query));
        }
Beispiel #7
0
        public static DataTable DanhSachBanAn()
        {
            string query = "SELECT * FROM BANAN";

            return(SqlServerHelper.ExecuteQuery(query));
        }