Ejemplo n.º 1
0
        public ActionResult Detail(int id)
        {
            var jsonParse = new
            {
                data = MSouvenirRepo.GetId(id)
            };

            Json(jsonParse, JsonRequestBehavior.AllowGet);

            ViewBag.listUnit = new SelectList(mUnitRepo.get(), "id", "name");
            return(PartialView("_Detail", jsonParse.data));
        }
Ejemplo n.º 2
0
        public ActionResult Delete(int id)
        {
            var data = MSouvenirRepo.GetId(id);

            MSouvenirRepo.Delete(id);
            var result = new
            {
                success      = true,
                item         = data,
                alertType    = "info",
                alertStrong  = "Deleted !",
                alertMessage = "Your Data With Code <strong>(" + data.code + ")</strong> is Deleted"
            };

            return(Json(result, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 3
0
 public ActionResult Update(int id)
 {
     ViewBag.listUnit = new SelectList(mUnitRepo.get(), "id", "name");
     return(PartialView("_Update", MSouvenirRepo.GetId(id)));
 }