public async Task <List <PickListData> > GetPickListData(string name) { ContactAccountRepo conrepo = new ContactAccountRepo(); var result = await conrepo.GetPickListData(name); return(result); }
public async Task <ActionResult> GetManagerList(string userName) { ContactAccountRepo conrepo = new ContactAccountRepo(); var result = await conrepo.GetManagerList(userName); return(Json(result, JsonRequestBehavior.AllowGet)); }
public async Task <ActionResult> GetAccount() { ContactAccountRepo conrepo = new ContactAccountRepo(); var result = await conrepo.GetAccount(); return(Json(result, JsonRequestBehavior.AllowGet)); }
public async Task <ActionResult> Index(ContactAccountModel model) { ClaimTeamLoginModel client = (ClaimTeamLoginModel)Session[SessionHelper.claimTeamLogin]; string UserId = client.UserId; ContactAccountRepo conrepo = new ContactAccountRepo(); var result = await conrepo.AddContactAccount(model, UserId); ContactAccountModel rmodel = new ContactAccountModel(); rmodel.PickTitle = await GetPickListData("Title"); rmodel.PickTypes = await GetPickListData("Account Type"); rmodel.AccountManagerId = UserId; pickListServices = new PicklistServicecs(); rmodel.PropertySuburbList = pickListServices.GetPickListItems("H_Suburbs"); rmodel.PropertySuburbList.Insert(0, new PicklistItem()); //Get Suburbs PropertyStateList = new PicklistServicecs(); rmodel.PropertyStateList = pickListServices.GetPickListItems("H_State"); rmodel.PropertyStateList.Insert(0, new PicklistItem()); if (result) { ViewBag.Message = "Success: Save successful"; } else { ViewBag.Message = "Error: Save unsuccessful"; } ModelState.Clear(); if (model.FromProtal) { return(RedirectToAction("AdminList", "AdminList")); } else { return(RedirectToAction("Index", "AccountList")); //return View(rmodel); } //return RedirectToAction("Index"); }