public ActionResult AddOwner(OwnerModel model) { if (ModelState.IsValid) { ownerSesssionRepository.AddOwner(model); return RedirectToAction("AddOwner"); } model.States = GetProvince(); return PartialView("_AddOwner", model); }
public ActionResult AddCorpDoc(OwnerModel _OwnerCorpModel) { if (ModelState.IsValid) { _OwnerCorpSessionRepository.AddOwner(_OwnerCorpModel); return RedirectToAction("AddCorpDoc"); } _OwnerCorpModel.States = GetProvince(); return PartialView("_AddCorpDoc", _OwnerCorpModel); }
public void AddOwner(OwnerModel owner) { var data = GetAll(); var states = CommonFunctions.GetStates(); var p = states.FirstOrDefault(a => a.KeyId == owner.StateID); if (p != null) owner.State = p.Description; if (owner.Id == 0) { if (data.Count > 0) owner.Id = data.Max(a => a.Id) + 1; else owner.Id = 100000; } data.Add(owner); HttpContext.Current.Session[SessionOwnerList] = data; }
public void Update(OwnerModel owner) { DelOwner(owner.Id); AddOwner(owner); }