Example #1
0
 // GET: Product/Edit/5
 public JsonResult GetbyId(int id)
 {
     try
     {
         if (id > 0)
         {
             var _prod = crudFactory.GetProductById(id);
             return(Json(_prod));
         }
         else
         {
             return(Json(new ProductVM()));
         }
     }
     catch (Exception ex)
     {
         return(Json(ex.Message));
     }
 }
        // GET: Product/Edit/5
        public ActionResult GetbyId(int id)
        {
            var _prod = crudFactory.GetProductById(id);

            return(View(_prod));
        }