Exemplo n.º 1
0
        public ActionResult ClientObligations([DataSourceRequest] DataSourceRequest request, int?clientId)
        {
            Contract.Requires <ArgumentNullException>(request.IsNotNull());
            int resolvedClientId       = this.ResolveClientId(clientId);
            ObligationsViewModel model = this.clientProfileManager.GetObligationsViewModel(resolvedClientId);

            ObligationViewModel[] properies = model.Obligations.ToArray();

            return(Json(properies.ToDataSourceResult(request), JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 2
0
        public ActionResult Obligations(ObligationsViewModel model)
        {
            if (!this.ModelState.IsValid)
            {
                return(this.View(model));
            }

            model.ClientId = this.ResolveClientId(model.ClientId);
            this.clientProfileManager.SaveObligations(model);
            return(this.RedirectToAction("Property"));
        }
Exemplo n.º 3
0
        public ObligationsViewModel GetObligationsViewModel(int resolvedClientId)
        {
            Contract.Requires <ArgumentOutOfRangeException>(resolvedClientId.IsPositive());
            IEnumerable <Obligation> obligations = this.clientProfileService.GetClientObligations(resolvedClientId);

            var model = new ObligationsViewModel
            {
                ClientId    = resolvedClientId,
                Obligations = MapToObligationViewModel(obligations.ToList())
            };

            return(model);
        }
Exemplo n.º 4
0
 public void SaveObligations(ObligationsViewModel model)
 {
     throw new NotImplementedException();
 }