// GET: api/T_SouvenirItems/5 public T_SouvinerItemViewModel Get(int id) { return(T_SouvinerItemRepo.GetById(id)); }
//POST Create //[HttpPost] //public ActionResult Create(T_SouvinerItemViewModel model) //{ // if (ModelState.IsValid) // { // Responses responses = (T_SouvinerItemRepo.update(model)); // if (responses.Success) // { // return Json(new { success = true }, JsonRequestBehavior.AllowGet); // } // else // { // return Json(new { success = false, massage = "Error msg" }, JsonRequestBehavior.AllowGet); // } // } // return Json(new { success = false, massage = "Invalid" }, JsonRequestBehavior.AllowGet); //} //Get Edit //[CustomAuthorize(Roles = "Devision", AccessLevel = "W")] public ActionResult Edit(int Id) { return(View("_Edit", T_SouvinerItemRepo.GetById(Id))); }
//Post Edit //[HttpPost] //public ActionResult Edit(T_SouvinerItemViewModel model) //{ // if (ModelState.IsValid) // { // Responses responses = (T_SouvinerItemRepo.update(model)); // if (responses.Success) // { // return Json(new { success = true }, JsonRequestBehavior.AllowGet); // } // else // { // return Json(new { success = false, massage = "Error msg" }, JsonRequestBehavior.AllowGet); // } // } // return Json(new { success = false, massage = "Invalid" }, JsonRequestBehavior.AllowGet); //} //Get Delete public ActionResult Delete(int id) { return(View("_Delete", T_SouvinerItemRepo.GetById(id))); }
//Post Delete //[HttpPost] //public ActionResult DeleteConfirm(int id) //{ // Responses responses = (T_SouvinerItemRepo.Delete(id)); // if (responses.Success) // { // return Json(new { success = true }, JsonRequestBehavior.AllowGet); // } // return Json(new { success = false, massage = "Error" }, JsonRequestBehavior.AllowGet); //} //Get Detail public ActionResult View(int id) { return(View("_View", T_SouvinerItemRepo.GetById(id))); }