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

            Json(jsonParse, JsonRequestBehavior.AllowGet);

            return(PartialView("_Detail", jsonParse.data));
        }
Ejemplo n.º 2
0
        public ActionResult Delete(int id)
        {
            var data = MProductRepo.GetId(id);

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

            return(Json(result, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 3
0
 public ActionResult Update(int id)
 {
     return(PartialView("_Update", MProductRepo.GetId(id)));
 }