public ActionResult GetGridData(SearchFilter search, string StateCode, string DistrictCode, string ProjectCode, string CenterType)
 {
     try
     {
         int RecCount = 0;
         var items    = _secBuss.GetGridData(search, StateCode, DistrictCode, ProjectCode, CenterType);
         if (items.Count == 0)
         {
             return(null);
         }
         var total    = (int)Math.Ceiling(RecCount / (float)search.rows);        //	get page count
         var jsonData = new
         {
             total   = total,
             page    = (total < search.page ? 1 : search.page),                                  //	set the current page
             records = items.Count,
             rows    = items,
         };
         return(Json(jsonData, JsonRequestBehavior.AllowGet));
     }
     catch (Exception ex)
     {
         return(Content(ex.InnerException.Message));
     }
 }