public bool UpdateBuyleadCountInCategories(List <int> CateLV1, List <int> CateLV2, List <int> CateLV3) { var svCategory = new Category.CategoryService(); var lstCateLV1 = CateLV1.Distinct(); var lstCateLV2 = CateLV2.Distinct(); var lstCateLV3 = CateLV3.Distinct(); foreach (var it in lstCateLV3) { IsResult = svCategory.UpdateBuyleadCount(3, it); } foreach (var it in lstCateLV2) { IsResult = svCategory.UpdateBuyleadCount(2, it); } foreach (var it in lstCateLV1) { IsResult = svCategory.UpdateBuyleadCount(1, it); } return(IsResult); }
public bool UpdateBuyleadCountInCategories(int CateLV1, int CateLV2, int CateLV3) { var svCategory = new Category.CategoryService(); IsResult = svCategory.UpdateBuyleadCount(3, CateLV3); IsResult = svCategory.UpdateBuyleadCount(2, CateLV2); IsResult = svCategory.UpdateBuyleadCount(1, CateLV1); return(IsResult); }
public bool MoveBuyleadInCateLV(int oldcatelv1, int oldcatelv2, int oldcatelv3, int newcatelv1, int newcatelv2, int newcatelv3) { var svCategory = new Category.CategoryService(); using (var trans = new TransactionScope()) { MoveBuyleadInCate(3, oldcatelv3, newcatelv3, oldcatelv3); MoveBuyleadInCate(2, oldcatelv2, newcatelv2, newcatelv3); MoveBuyleadInCate(1, oldcatelv1, newcatelv1, newcatelv3); trans.Complete(); IsResult = true; } using (var trans = new TransactionScope()) { #region Update Buylead Count svCategory.UpdateBuyleadCount(3, oldcatelv3); svCategory.UpdateBuyleadCount(2, oldcatelv2); svCategory.UpdateBuyleadCount(1, oldcatelv1); svCategory.UpdateBuyleadCount(3, newcatelv3); svCategory.UpdateBuyleadCount(2, newcatelv2); svCategory.UpdateBuyleadCount(1, newcatelv1); #endregion trans.Complete(); IsResult = true; } return(IsResult); }