Пример #1
0
        public List <OrderViewModel> GetOrderByAccount(string id)
        {
            DataTable dtb = SqlDb_Ultis.ExeStoredToDataTable("Tbl_OrderSelectByAccount", "@Id", id);
            var       lst = Ultis.DataTableToList <OrderViewModel>(dtb);

            return(lst);
        }
Пример #2
0
        public List <CommentViewModel> GetCommentByProductId(Guid id)
        {
            DataTable dtb = SqlDb_Ultis.ExeStoredToDataTable("Tbl_CommentSelectByProductId", "@Id", id);
            var       lst = Ultis.DataTableToList <CommentViewModel>(dtb);

            return(lst);
        }
Пример #3
0
        public List <ProductAttributeViewModel> GetAllProducAttributebySP(Guid masanpham)
        {
            DataTable dtb = SqlDb_Ultis.ExeStoredToDataTable("LoadAttr", "@Id", masanpham);
            var       lst = Ultis.DataTableToList <ProductAttributeViewModel>(dtb);

            return(lst);
        }
Пример #4
0
        public List <NewsViewModel> GetAllNews()
        {
            DataTable dtb = SqlDb_Ultis.ExeStoredToDataTable("Tbl_NewsSelectAll");
            var       lst = Ultis.DataTableToList <NewsViewModel>(dtb);

            return(lst);
        }
Пример #5
0
        public List <ProductGroupViewModel> GetAllProductGroup()
        {
            DataTable dtb = SqlDb_Ultis.ExeStoredToDataTable("Tbl_ProductGroupSelectAll");
            var       lst = Ultis.DataTableToList <ProductGroupViewModel>(dtb);

            return(lst);
        }
Пример #6
0
        public List <OrderDetailViewModel> GetOrderDetailByOrder(Guid id)
        {
            DataTable dtb = SqlDb_Ultis.ExeStoredToDataTable("Tbl_OrderDetailSelectByOrder", "@Id", id);
            var       lst = Ultis.DataTableToList <OrderDetailViewModel>(dtb);

            return(lst);
        }
        public List <ProductAttributeValueViewModel> GetProductAttributeValueByProId(Guid Id)
        {
            DataTable dtb = SqlDb_Ultis.ExeStoredToDataTable("Product_Attribute_ValueSelectByProId", "@Id", Id);
            var       lst = Ultis.DataTableToList <ProductAttributeValueViewModel>(dtb);

            return(lst);
        }
Пример #8
0
        public List <OrderViewModel> GetAllOrder()
        {
            DataTable dtb = SqlDb_Ultis.ExeStoredToDataTable("Tbl_OrderSelectAll");
            var       lst = Ultis.DataTableToList <OrderViewModel>(dtb);

            return(lst);
        }
Пример #9
0
        public List <MenuViewModel> GetMenuByPId(Guid id)
        {
            DataTable dtb = SqlDb_Ultis.ExeStoredToDataTable("Tbl_MenuSelectByPID", "@Id", id);
            var       lst = Ultis.DataTableToList <MenuViewModel>(dtb);

            return(lst);
        }
Пример #10
0
        public List <MenuViewModel> GetAllMenu()
        {
            DataTable dtb = SqlDb_Ultis.ExeStoredToDataTable("Tbl_MenuSelectAll");
            var       lst = Ultis.DataTableToList <MenuViewModel>(dtb);

            return(lst);
        }
        public List <ProductAttributeValueViewModel> GetAllProductAttributeValue()
        {
            DataTable dtb = SqlDb_Ultis.ExeStoredToDataTable("Product_Attribute_ValueSelectAll");
            var       lst = Ultis.DataTableToList <ProductAttributeValueViewModel>(dtb);

            return(lst);
        }
Пример #12
0
        public List <AccountViewModel> GetAllAccount()
        {
            DataTable dtb = SqlDb_Ultis.ExeStoredToDataTable("Tbl_AccountSelectAll");
            var       lst = Ultis.DataTableToList <AccountViewModel>(dtb);

            return(lst);
        }
Пример #13
0
        public List <RoleDetailViewModel> GetAllAccountGroup()
        {
            DataTable dtb = SqlDb_Ultis.ExeStoredToDataTable("Tbl_DetailRoleSelectAll");
            var       lst = Ultis.DataTableToList <RoleDetailViewModel>(dtb);

            return(lst);
        }
Пример #14
0
        public RoleViewModel GetRoleById(Guid Id)
        {
            DataTable     dtb  = SqlDb_Ultis.ExeStoredToDataTable("Tbl_RoleSelectByID", "@Id", Id);
            RoleViewModel role = new RoleViewModel();

            foreach (DataRow item in dtb.Rows)
            {
                role = Ultis.GetItem <RoleViewModel>(item);
            }
            return(role);
        }
Пример #15
0
        public RoleDetailViewModel GetAccountGroupById(Guid Id)
        {
            DataTable           dtb   = SqlDb_Ultis.ExeStoredToDataTable("Tbl_DetailRoleSelectByID", "@Id", Id);
            RoleDetailViewModel accgr = new RoleDetailViewModel();

            foreach (DataRow item in dtb.Rows)
            {
                accgr = Ultis.GetItem <RoleDetailViewModel>(item);
            }
            return(accgr);
        }
Пример #16
0
        public CommentViewModel GetCommentById(Guid id)
        {
            DataTable        dtb  = SqlDb_Ultis.ExeStoredToDataTable("Tbl_CommentSelectByID", "@Id", id);
            CommentViewModel role = new CommentViewModel();

            foreach (DataRow item in dtb.Rows)
            {
                role = Ultis.GetItem <CommentViewModel>(item);
            }
            return(role);
        }
Пример #17
0
        public MenuViewModel GetMenuById(Guid id)
        {
            DataTable     dtb  = SqlDb_Ultis.ExeStoredToDataTable("Tbl_MenuSelectByID", "@Id", id);
            MenuViewModel role = new MenuViewModel();

            foreach (DataRow item in dtb.Rows)
            {
                role = Ultis.GetItem <MenuViewModel>(item);
            }
            return(role);
        }
Пример #18
0
        public CompanyInfoViewModel GetCompanyInfo()
        {
            DataTable            dtb  = SqlDb_Ultis.ExeStoredToDataTable("Tbl_InforCompanySelectAll");
            CompanyInfoViewModel role = new CompanyInfoViewModel();

            foreach (DataRow item in dtb.Rows)
            {
                role = Ultis.GetItem <CompanyInfoViewModel>(item);
            }
            return(role);
        }
        public ProductAttributeValueViewModel GetProductAttributeValueById(Guid Id)
        {
            DataTable dtb = SqlDb_Ultis.ExeStoredToDataTable("Product_Attribute_ValueSelectByID", "@Id", Id);
            ProductAttributeValueViewModel role = new ProductAttributeValueViewModel();

            foreach (DataRow item in dtb.Rows)
            {
                role = Ultis.GetItem <ProductAttributeValueViewModel>(item);
            }
            return(role);
        }
Пример #20
0
        public ProductGroupViewModel GetProductGroupById(Guid Id)
        {
            DataTable             dtb  = SqlDb_Ultis.ExeStoredToDataTable("Tbl_ProductGroupSelectByID", "@Id", Id);
            ProductGroupViewModel role = new ProductGroupViewModel();

            foreach (DataRow item in dtb.Rows)
            {
                role = Ultis.GetItem <ProductGroupViewModel>(item);
            }
            return(role);
        }
Пример #21
0
        public OrderDetailViewModel GetOrderEtailById(Guid proid, Guid oid)
        {
            DataTable            dtb  = SqlDb_Ultis.ExeStoredToDataTable("Tbl_OrderDetailSelectByID", "@ProductId", proid, "@OrderID", oid);
            OrderDetailViewModel role = new OrderDetailViewModel();

            foreach (DataRow item in dtb.Rows)
            {
                role = Ultis.GetItem <OrderDetailViewModel>(item);
            }
            return(role);
        }
Пример #22
0
        public OrderViewModel GetOrderById(Guid id)
        {
            DataTable      dtb  = SqlDb_Ultis.ExeStoredToDataTable("Tbl_OrderSelectByID", "@Id", id);
            OrderViewModel role = new OrderViewModel();

            foreach (DataRow item in dtb.Rows)
            {
                role = Ultis.GetItem <OrderViewModel>(item);
            }
            return(role);
        }
Пример #23
0
        public NewsViewModel GetNewsById(Guid Id)
        {
            DataTable     dtb  = SqlDb_Ultis.ExeStoredToDataTable("Tbl_NewsSelectByID", "@Id", Id);
            NewsViewModel role = new NewsViewModel();

            foreach (DataRow item in dtb.Rows)
            {
                role = Ultis.GetItem <NewsViewModel>(item);
            }
            return(role);
        }
Пример #24
0
        public AccountViewModel GetAccountByEmail(string email)
        {
            DataTable dtb = SqlDb_Ultis.ExeStoredToDataTable("Tbl_AccountSelectByEmail",
                                                             "@Email", email);
            AccountViewModel acc = new AccountViewModel();

            foreach (DataRow item in dtb.Rows)
            {
                acc = Ultis.GetItem <AccountViewModel>(item);
            }
            return(acc);
        }
Пример #25
0
        public AccountViewModel GetAccountById(Guid Id)
        {
            DataTable dtb = SqlDb_Ultis.ExeStoredToDataTable("Tbl_AccountSelectByID",
                                                             "@Id", Id);
            AccountViewModel acc = new AccountViewModel();

            foreach (DataRow item in dtb.Rows)
            {
                acc = Ultis.GetItem <AccountViewModel>(item);
            }
            return(acc);
        }
Пример #26
0
        public AccountViewModel GetAccountByUserName(string userName)
        {
            DataTable dtb = SqlDb_Ultis.ExeStoredToDataTable("Tbl_AccountSelectByUserName1",
                                                             "@UserName", userName);
            AccountViewModel acc = new AccountViewModel();

            foreach (DataRow item in dtb.Rows)
            {
                acc = Ultis.GetItem <AccountViewModel>(item);
            }
            return(acc);
        }
Пример #27
0
        public string GetRoleByGroup(string group)
        {
            DataTable dtb = SqlDb_Ultis.ExeStoredToDataTable("GetRoleByGroup", "@group", group);
            string    rs;

            if (dtb.Rows.Count > 0)
            {
                rs = dtb.Rows[0][0].ToString() ?? String.Empty;
            }
            else
            {
                rs = "";
            }
            return(rs);
        }