public ActionResult SetCarrierIsSee(long id, bool isChecked) { if (CurrenUser.IsAdmin()) { var cus = carrierService.GetById(id); cus.IsSee = isChecked; carrierService.Commited(); } return(Json("ok", JsonRequestBehavior.AllowGet)); }
private PolicyBudgetsModel MapCarrier(PolicyBudgetsModel PB) { var policy = _policyService.GetById(PB.PolicyId); var client = _clinetService.GetById(PB.ClientId); var carrier = _carrierService.GetById(policy.CarId); PB.CarrierName = carrier?.Name; PB.ClientName = client?.Name; return(PB); }
public PolicyModel GetById(int Id) { var entity = _policyRepository.GetById(Id); if (entity != null) { var policy = new PolicyModel() { Id = entity.Id, IsActive = (bool)entity.IsActive, PolicyNumber = entity.PolicyNumber, CarId = entity.CarId, CoverageId = entity.CoverageId, ProductId = entity.ProductId, EffectiveDate = entity.EffectiveDate, EndDate = entity.EndDate, IsGroupInsurance = (bool)entity.IsGroupInsurance, AddUser = entity.AddUser, AddDate = entity.AddDate, RevUser = entity.RevUser, RevDate = entity.RevDate }; var carrier = _carrierService.GetById(policy.CarId); var coverage = _commonService.GetCoverageById(policy.CoverageId); var product = _commonService.GetProductById(policy.ProductId); MapSelectedCarrier(policy, carrier); MapSelectedProduct(policy, product); MapSelectedCoverage(policy, coverage); return(policy); } return(null); }
public ActionResult Edit(string id) { var entity = _carrierService.GetById(id); var carrierViewModel = new CarrierViewModel(); carrierViewModel.MapperCarrierDTO(entity.GetDTO()); return(View(carrierViewModel)); }
// GET: Carrier/EditCareerDetails/1 public ActionResult EditCarrierDetails(int id) { var carrier = _carrierService.GetById(id); return(View(carrier)); }
public Carrier GetById(int carrierId) { return(_carrierService.GetById(carrierId)); }
public Carrier GetCarrierById(string carrierId) { return(_carrierService.GetById(carrierId)); }