public IActionResult Create(paymentType paymentType, string returnUrl = null) { if (ModelState.IsValid) { repository.AddEntity(paymentType); return(RedirectToLocal(returnUrl)); } ViewData["ReturnUrl"] = returnUrl; return(View(paymentType)); }
public IActionResult Create(insurance insurance, IFormFile image, string returnUrl = null) { if (ModelState.IsValid) { repository.AddEntity(insurance, image); return(RedirectToLocal(returnUrl)); } ViewData["ReturnUrl"] = returnUrl; return(View(insurance)); }
public IActionResult Create(orderStatus orderStatus, string returnUrl = null) { if (ModelState.IsValid) { repository.AddEntity(orderStatus); return(RedirectToLocal(returnUrl)); } ViewData["ReturnUrl"] = returnUrl; return(View(orderStatus)); }
public IActionResult Create(dataType dataType, string returnUrl = null) { if (ModelState.IsValid) { dataType = (dataType)repository.AddEntity(dataType); return(RedirectToLocal(returnUrl)); } ViewBag.dataTypes = new SelectList(this.repository.GetDataTypes(), "id", "title"); ViewData["ReturnUrl"] = returnUrl; return(View(dataType)); }
public IActionResult Create(boxCategory boxCategory, IFormFile image, string returnUrl = null) { if (ModelState.IsValid) { repository.AddEntity(boxCategory, image); return(RedirectToLocal(returnUrl)); } ViewBag.boxCategories = new SelectList(this.repository.GetBoxCategories(), "id", "title"); ViewData["ReturnUrl"] = returnUrl; return(View(boxCategory)); }
public IActionResult Create(menu menu, IFormFile image, string returnUrl = null) { if (ModelState.IsValid) { repository.AddEntity(menu, image); return(RedirectToLocal(returnUrl)); } ViewBag.menus = new SelectList(this.repository.GetMenus(), "id", "title", menu.fatherId); ViewData["ReturnUrl"] = returnUrl; return(View(menu)); }