/// <summary> /// /// </summary> /// <param name="model"></param> /// <returns></returns> #region Delete public bool Delete(List <int> FavSupplierID, int LogonCompID) { var svCompany = new Company.CompanyService(); var Contains = SQLWhereListInt(FavSupplierID, "FavSupplierID"); UpdateByCondition <b2bFavCompany>(" IsDelete = 1 ", " CompID = " + LogonCompID + " AND " + Contains); IsResult = svCompany.UpdateProductCount(LogonCompID); return(IsResult); }
/// <summary> /// /// </summary> /// <param name="model"></param> /// <returns></returns> #region Delete public bool Delete(List <int> ProductID, int CompID) { var svCompany = new Company.CompanyService(); var Contains = SQLWhereListInt(ProductID, "ProductID"); UpdateByCondition <b2bFavProduct>(" IsDelete = 1 ", " CompID = " + CompID + " AND " + Contains); IsResult = svCompany.UpdateProductCount(CompID); return(IsResult); }
public bool MoveToJunk(List <int> ProductID, List <int> CateLV1, List <int> CateLV2, List <int> CateLV3, int CompID) { var svCompany = new Company.CompanyService(); var Contains = SQLWhereListInt(ProductID, "ProductID"); UpdateByCondition <b2bProduct>(" ModifiedDate = GETDATE() , IsJunk = 1 , ListNo = 0 ", " CompID = " + CompID + " AND " + Contains); IsResult = svCompany.UpdateProductCount(CompID); UpdateProductCountInCategories(CateLV1, CateLV2, CateLV3); UpdateProductCountInCompany(CompID); return(IsResult); }
public bool Delete(int ProductID, int CateLV1, int CateLV2, int CateLV3, int CompID = 0) { var svCompany = new Company.CompanyService(); var svCategory = new Category.CategoryService(); var sqlWhere = "ProductID = " + ProductID; if (CompID > 0) { sqlWhere += " AND CompID = " + CompID; } UpdateByCondition <b2bProduct>(" ModifiedDate = GETDATE() , IsDelete = 1 , ListNo = 0 ", sqlWhere); if (CompID > 0) { IsResult = svCompany.UpdateProductCount(CompID); } UpdateProductCountInCategories(CateLV1, CateLV2, CateLV3); UpdateProductCountInCompany(CompID); return(IsResult); }