Ejemplo n.º 1
0
 public JsonResult GetAllGRN()
 {
     if (Session["LOGGEDIN"] != null)
     {
         try
         {
             objGRNBll = new LP_GRN_BLL();
             var Data = JsonConvert.SerializeObject(objGRNBll.SelectAll());
             return(Json(new { data = Data, success = true, statuscode = 200, count = Data.Length }, JsonRequestBehavior.AllowGet));
         }
         catch (Exception ex)
         {
             return(Json(new { data = ex.Message, success = false, statuscode = 400, count = 0 }, JsonRequestBehavior.AllowGet));
         }
     }
     else
     {
         return(Json(new { data = "Session Expired", success = false, statuscode = 400, count = 0 }, JsonRequestBehavior.AllowGet));
     }
 }