コード例 #1
0
 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));
 }
コード例 #2
0
ファイル: PolicyController.cs プロジェクト: bhaskar2583/idoc
        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);
        }
コード例 #3
0
ファイル: PolicyService.cs プロジェクト: bhaskar2583/idoc
        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);
        }
コード例 #4
0
        public ActionResult Edit(string id)
        {
            var entity           = _carrierService.GetById(id);
            var carrierViewModel = new CarrierViewModel();

            carrierViewModel.MapperCarrierDTO(entity.GetDTO());
            return(View(carrierViewModel));
        }
コード例 #5
0
ファイル: CarrierController.cs プロジェクト: bhaskar2583/idoc
        // GET: Carrier/EditCareerDetails/1
        public ActionResult EditCarrierDetails(int id)
        {
            var carrier = _carrierService.GetById(id);

            return(View(carrier));
        }
コード例 #6
0
 public Carrier GetById(int carrierId)
 {
     return(_carrierService.GetById(carrierId));
 }
コード例 #7
0
 public Carrier GetCarrierById(string carrierId)
 {
     return(_carrierService.GetById(carrierId));
 }