Example #1
0
 protected void lbtn_Xoa_Click(object sender, EventArgs e)
 {
     if (objCheckPermision.Permission(objCheckPermision.LayQuyen("strDanhMuc_Xoa")))
     {
         foreach (ListViewDataItem lvit in listView.Items)
         {
             string id;
             if (((HiddenField)lvit.FindControl("hfID")).Value != "")
             {
                 id = ((HiddenField)lvit.FindControl("hfID")).Value;
             }
             else
             {
                 ltr_Notice.Text = objComm.ShowNotice(
                     false, "Cập nhật thông tin thất bại.\nLỗi trong quá trình nhận dạng mã danh mục");
                 return;
             }
             if (((ASPxCheckBox)lvit.FindControl("ckb_Choose")).Checked)
             {
                 CatalogDAO.Delete(id);
             }
         }
         ltr_Notice.Text = objComm.ShowNotice(true, "Xóa danh mục đã chọn thành công!");
         BinList();
     }
     else
     {
         objComm.wr(
             "<script language='javascript'>alert('Bạn không có quyền thực hiện chức năng này.');location.href='thong-tin-danh-muc';</script>");
     }
 }
Example #2
0
 // Retrieve the list of products on catalog promotion
 public static DataTable GetProductsOnCatalogPromotion(string pageNumber, out int howManyPages)
 {
     return(CatalogDAO.GetProductsOnCatalogPromotion(pageNumber, out howManyPages));
 }
Example #3
0
 // retrieve the list of categories in a department
 public static DataTable GetCategoriesInDepartment(string departmentId)
 {
     return(CatalogDAO.GetCategoriesInDepartment(departmentId));
 }
Example #4
0
 // Get product details
 public static ProductDetails GetProductDetails(string productId)
 {
     return(CatalogDAO.GetProductDetails(productId));
 }
Example #5
0
 // Create a new Category
 public static bool CreateCategory(string departmentId, string name, string description)
 {
     return(CatalogDAO.CreateCategory(departmentId, name, description));
 }
Example #6
0
 // Search the product catalog
 public static DataTable Search(string searchString, string allWords, string pageNumber, out int howManyPages)
 {
     return(CatalogDAO.Search(searchString, allWords, pageNumber, out howManyPages));
 }
Example #7
0
 // Delete department
 public static bool DeleteDepartment(string id)
 {
     return(CatalogDAO.DeleteDepartment(id));
 }
Example #8
0
 // removes a product from a category
 public static bool RemoveProductFromCategory(string productId, string categoryId)
 {
     return(CatalogDAO.RemoveProductFromCategory(productId, categoryId));
 }
Example #9
0
 // deletes a product from the product catalog
 public static bool DeleteProduct(string productId)
 {
     return(CatalogDAO.DeleteProduct(productId));
 }
Example #10
0
 // assign a product to a new category
 public static bool AssignProductToCategory(string productId, string categoryId)
 {
     return(CatalogDAO.AssignProductToCategory(productId, categoryId));
 }
Example #11
0
 // move product to a new category
 public static bool MoveProductToCategory(string productId, string oldCategoryId, string newCategoryId)
 {
     return(CatalogDAO.MoveProductToCategory(productId, oldCategoryId, newCategoryId));
 }
Example #12
0
 // get categories that do not contain a specified product
 public static DataTable GetCategoriesWithoutProduct(string productId)
 {
     return(CatalogDAO.GetCategoriesWithoutProduct(productId));
 }
Example #13
0
 // Update an existing product
 public static bool UpdateProduct(string productId, string name, string description, string price, string image1FileName, string image2FileName, string onDepartmentPromotion, string onCatalogPromotion)
 {
     return(CatalogDAO.UpdateProduct
                (productId, name, description, price, image1FileName, image2FileName, onDepartmentPromotion, onCatalogPromotion));
 }
Example #14
0
 // retrieve the list of products in a category
 public static DataTable GetAllProductsInCategory(string categoryId)
 {
     return(CatalogDAO.GetAllProductsInCategory(categoryId));
 }
Example #15
0
 // retrieve the list of products featured for a department
 public static DataTable GetProductsOnDepartmentPromotion(string departmentId, string pageNumber, out int howManyPages, int ord)
 {
     return(CatalogDAO.GetProductsOnDepartmentPromotion(departmentId, pageNumber, out howManyPages, ord));
 }
Example #16
0
 // gets product recommendations
 public static DataTable GetRecommendations(string productId)
 {
     return(CatalogDAO.GetRecommendations(productId));
 }
Example #17
0
 // retrieve the list of products in a category
 public static DataTable GetProductsInCategory(string categoryId, string pageNumber, out int howManyPages, int odb)
 {
     return(CatalogDAO.GetProductsInCategory(categoryId, pageNumber, out howManyPages, odb));
 }
Example #18
0
 // Retrieve the list of departments
 public static DataTable GetDepartments()
 {
     return(CatalogDAO.GetDepartments());
 }
Example #19
0
 // Update department details
 public static bool UpdateDepartment(string id, string name, string description)
 {
     return(CatalogDAO.UpdateDepartment(id, name, description));
 }
Example #20
0
 // get department details
 public static DepartmentDetails GetDepartmentDetails(string departmentId)
 {
     return(CatalogDAO.GetDepartmentDetails(departmentId));
 }
Example #21
0
 // Add a new department
 public static bool AddDepartment(string name, string description)
 {
     return(CatalogDAO.AddDepartment(name, description));
 }
Example #22
0
 // Get category details
 public static CategoryDetails GetCategoryDetails(string categoryId)
 {
     return(CatalogDAO.GetCategoryDetails(categoryId));
 }
Example #23
0
 // Update category details
 public static bool UpdateCategory(string id, string name, string description)
 {
     return(CatalogDAO.UpdateCategory(id, name, description));
 }
Example #24
0
 public CatalogBUS()
 {
     dao = new CatalogDAO();
 }