예제 #1
0
 public void UpdateRole(RoleViewModel viewModel)
 {
     SqlDb_Ultis.ExeNonStored("Tbl_RoleUpDate",
                              "@Id", viewModel.Id,
                              "@Code", viewModel.Code,
                              "@Role", viewModel.Role);
 }
        public List <ProductAttributeValueViewModel> GetAllProductAttributeValue()
        {
            DataTable dtb = SqlDb_Ultis.ExeStoredToDataTable("Product_Attribute_ValueSelectAll");
            var       lst = Ultis.DataTableToList <ProductAttributeValueViewModel>(dtb);

            return(lst);
        }
예제 #3
0
 public void InsertRole(RoleViewModel viewModel)
 {
     SqlDb_Ultis.ExeNonStored("Tbl_RoleInsert",
                              "@Id", viewModel.Id,
                              "@Code", viewModel.Code,
                              "@Role", viewModel.Role);
 }
예제 #4
0
        public List <OrderViewModel> GetOrderByAccount(string id)
        {
            DataTable dtb = SqlDb_Ultis.ExeStoredToDataTable("Tbl_OrderSelectByAccount", "@Id", id);
            var       lst = Ultis.DataTableToList <OrderViewModel>(dtb);

            return(lst);
        }
예제 #5
0
        public List <OrderViewModel> GetAllOrder()
        {
            DataTable dtb = SqlDb_Ultis.ExeStoredToDataTable("Tbl_OrderSelectAll");
            var       lst = Ultis.DataTableToList <OrderViewModel>(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);
        }
예제 #7
0
        public List <Category> GetlAllCategories()
        {
            DataTable dtb = SqlDb_Ultis.ExeSQLToDataTable("Select * from tbl_Category");
            var       lst = Ultis.DataTableToList <Category>(dtb);

            return(lst);
        }
예제 #8
0
        public List <ProductGroupViewModel> GetAllProductGroup()
        {
            DataTable dtb = SqlDb_Ultis.ExeStoredToDataTable("Tbl_ProductGroupSelectAll");
            var       lst = Ultis.DataTableToList <ProductGroupViewModel>(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);
        }
예제 #11
0
        public List <RoleDetailViewModel> GetAllAccountGroup()
        {
            DataTable dtb = SqlDb_Ultis.ExeStoredToDataTable("Tbl_DetailRoleSelectAll");
            var       lst = Ultis.DataTableToList <RoleDetailViewModel>(dtb);

            return(lst);
        }
예제 #12
0
        public List <ProductAttributeViewModel> GetAllProducAttributebySP(Guid masanpham)
        {
            DataTable dtb = SqlDb_Ultis.ExeStoredToDataTable("LoadAttr", "@Id", masanpham);
            var       lst = Ultis.DataTableToList <ProductAttributeViewModel>(dtb);

            return(lst);
        }
예제 #13
0
        public List <AccountViewModel> GetAllAccount()
        {
            DataTable dtb = SqlDb_Ultis.ExeStoredToDataTable("Tbl_AccountSelectAll");
            var       lst = Ultis.DataTableToList <AccountViewModel>(dtb);

            return(lst);
        }
예제 #14
0
        public List <OrderDetailViewModel> GetOrderDetailByOrder(Guid id)
        {
            DataTable dtb = SqlDb_Ultis.ExeStoredToDataTable("Tbl_OrderDetailSelectByOrder", "@Id", id);
            var       lst = Ultis.DataTableToList <OrderDetailViewModel>(dtb);

            return(lst);
        }
예제 #15
0
        public List <NewsViewModel> GetAllNews()
        {
            DataTable dtb = SqlDb_Ultis.ExeStoredToDataTable("Tbl_NewsSelectAll");
            var       lst = Ultis.DataTableToList <NewsViewModel>(dtb);

            return(lst);
        }
예제 #16
0
 public void UpdateAccountGroup(RoleDetailViewModel viewModel)
 {
     SqlDb_Ultis.ExeNonStored("Tbl_DetailRoleUpDate",
                              "@Id", viewModel.Id,
                              "@GroupAccId", viewModel.GroupAccId,
                              "@Role", viewModel.Role);
 }
예제 #17
0
        public List <CommentViewModel> GetCommentByProductId(Guid id)
        {
            DataTable dtb = SqlDb_Ultis.ExeStoredToDataTable("Tbl_CommentSelectByProductId", "@Id", id);
            var       lst = Ultis.DataTableToList <CommentViewModel>(dtb);

            return(lst);
        }
예제 #18
0
 public void UpdateAccountGroup(GroupAccountViewModel viewModel)
 {
     SqlDb_Ultis.ExeNonStored("Tbl_GroupAccountUpdate",
                              "@Id", viewModel.Id,
                              "@GroupCode", viewModel.GroupCode,
                              "@GroupName", viewModel.GroupName);
 }
 public void UpdateProductAttributeValue(ProductAttributeValueViewModel viewModel)
 {
     SqlDb_Ultis.ExeNonStored("Product_Attribute_ValueUpDate",
                              "@Id", viewModel.Id,
                              "@ProductId", viewModel.AttributeId,
                              "@AttributeId", viewModel.ProductId,
                              "@Value", viewModel.Value);
 }
예제 #20
0
 public void UpdateProductAttribute(ProductAttributeViewModel viewModel)
 {
     SqlDb_Ultis.ExeNonStored("Product_AttributeUpDate",
                              "@Id", viewModel.Id,
                              "@AttributeName", viewModel.AttributeName,
                              "@AttributeType", viewModel.AttributeType,
                              "@Status", viewModel.Status);
 }
예제 #21
0
 public void UpdateOrderDetail(OrderDetailViewModel viewModel)
 {
     SqlDb_Ultis.ExeNonStored("Tbl_OrderDetailUpDate",
                              "@OrderId", viewModel.OrderId,
                              "@ProductId", viewModel.ProductId,
                              "@Amount", viewModel.Amount,
                              "@Notes", viewModel.Notes,
                              "@Price", viewModel.Price);
 }
예제 #22
0
 public void UpdateMenu(MenuViewModel viewModel)
 {
     SqlDb_Ultis.ExeNonStored("Tbl_MenuUpDate",
                              "@Title", viewModel.Title,
                              "@Order", viewModel.Order,
                              "@ParrentId", viewModel.ParrentId,
                              "@Id", viewModel.Id,
                              "@Status", viewModel.Status,
                              "@Link", viewModel.Link);
 }
예제 #23
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);
        }
예제 #24
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);
        }
예제 #25
0
 public void UpdateInfo(AccountViewModel viewModel)
 {
     SqlDb_Ultis.ExeNonStored("Tbl_UpdateInfor",
                              "@Id", viewModel.Id,
                              "@FullName", viewModel.FullName,
                              "@Gender", viewModel.Gender,
                              "@Birthday", viewModel.Birthday,
                              "@Email", viewModel.Email,
                              "@PhoneNumber", viewModel.PhoneNumber,
                              "@Address", viewModel.Address);
 }
예제 #26
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);
        }
예제 #27
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);
        }
예제 #28
0
 public void UpdateNewsGroup(NewsGroupViewModel viewModel)
 {
     SqlDb_Ultis.ExeNonStored("Tbl_NewsGroupUpDate",
                              "@Id", viewModel.Id,
                              "@NameGroup", viewModel.NameGroup,
                              "@Description", viewModel.Description,
                              "@Status", viewModel.Status,
                              "@Modifier", viewModel.Modifier,
                              "@ModifyDate", viewModel.ModifyDate,
                              "@Url", viewModel.Url);
 }
예제 #29
0
 public void UpdateProductGroup(ProductGroupViewModel viewModel)
 {
     SqlDb_Ultis.ExeNonStored("Tbl_ProductGroupUpDate",
                              "@Id", viewModel.Id,
                              "@GroupName", viewModel.GroupName,
                              "@Description", viewModel.Description,
                              "@Status", viewModel.Status,
                              "@Modifier", viewModel.Modifier,
                              "@ModifyDate", viewModel.ModifyDate,
                              "@Url", viewModel.Url);
 }
예제 #30
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);
        }