public ActionResult EditOwnerTenant(int id) { List <OwnerTenantRegistrationModel> list = (List <OwnerTenantRegistrationModel>)Session["ownertenant"]; foreach (OwnerTenantRegistrationModel model in list) { if (id == model.Id) { registrationModel = model; } } registrationModel.lstblock = HttpContext.Application["lstblock"] as List <string>; return(View(registrationModel)); }
public ActionResult AddOwnerTenant(OwnerTenantRegistrationModel model, string operation) { bool is_success = false; if (operation == "Create") { DateTime on_date = Request.RequestContext.HttpContext.Timestamp.Date; model.On_date = on_date.ToShortDateString(); is_success = RegistrationModelManger.CreateOwnerTenant(model); } if (is_success) { return(RedirectToAction("GetAllOwnerTenant")); } return(RedirectToAction("AddOwnerTenant")); }
public ActionResult EditOwnerTenant(OwnerTenantRegistrationModel editdata, string operation) { if (operation == "Update") { bool is_updated = RegistrationModelManger.UpdateOwnerTenant(editdata); if (is_updated) { return(RedirectToAction("GetAllOwnerTenant")); } } else { return(RedirectToAction("GetAllOwnerTenant")); } return(View()); }
public ActionResult AddAssociationMember(string operation, OwnerTenantRegistrationModel model) { if (operation == "Search") { registrationModel = RegistrationModelManger.SearchMember(model); registrationModel.lstdesigination = (List <string>)Session["desigination"]; ModelState.Clear(); return(View(registrationModel)); } else if (operation == "Add") { bool is_success = RegistrationModelManger.AddAssociationMember(model); if (is_success) { return(RedirectToAction("DisplayAssociationMember")); } } registrationModel.lstdesigination = (List <string>)Session["desigination"]; ModelState.Clear(); return(View(registrationModel)); }
public ActionResult AddAssociationMember() { registrationModel = RegistrationModelManger.GetDesigination(); Session["desigination"] = registrationModel.lstdesigination; return(View(registrationModel)); }