public ActionResult Update(int Id) { ProductCommissionDto dto = _productCommissionContract.Edit(Id); string strStoreName = string.Empty; string strBrandName = string.Empty; string strSeasonName = string.Empty; if (dto != null) { Store store = _storeContract.View(dto.StoreId); if (store != null) { strStoreName = store.StoreName; } Brand brand = _brandContract.View(dto.BrandId); if (brand != null) { strBrandName = brand.BrandName; } Season season = _seasonContract.View(dto.SeasonId); if (season != null) { strSeasonName = season.SeasonName; } } dto.StoreName = strStoreName; dto.BrandName = strBrandName; dto.SeasonName = strSeasonName; return(View(dto)); }
public JsonResult AddPurchase(int ReceiptStorageId, int ReceiptStoreId, bool WithoutMoney = false) { var ispay = _storeContract.View(ReceiptStoreId).StoreType.IsPay; OperationResult oper = _storeCartContract.AddPurchase(ReceiptStorageId, ReceiptStoreId, !ispay); return(Json(oper)); }
public JsonResult GetStoreInfo(int StoreId) { var modStore = _storeContract.View(StoreId); var jobPositionId = _jobPositionContract.JobPositions.Where(x => !x.IsDeleted && x.IsEnabled && x.DepartmentId == modStore.DepartmentId && x.IsLeader).Select(x => x.Id).FirstOrDefault(); var modAdminLeader = _adminContract.Administrators.Where(x => !x.IsDeleted && x.IsEnabled && x.JobPositionId == jobPositionId).Select(x => new { x.Member.MemberName, x.Member.UserPhoto }).FirstOrDefault(); var rdata = new { modStore.StoreName, StorePhoto = modStore.StorePhoto.IsNotNullAndEmpty() ? strWebUrl + modStore.StorePhoto : "", LeaderName = modAdminLeader?.MemberName ?? "", LeaderPhoto = modAdminLeader?.UserPhoto.IsNotNullAndEmpty() == true ? strWebUrl + modAdminLeader.UserPhoto : "" }; return(Json(rdata, JsonRequestBehavior.AllowGet)); }
public ActionResult View(int Id) { var result = _storeContract.View(Id); return(PartialView(result)); }