コード例 #1
0
 public void GetAllVisitorsDetails()
 {
     try
     {
         //var AllVisitors = objVisEnti.tblVisitors.ToList().OrderByDescending(m => m.Id);
         var AllVisitors = objVisEnti.uspGetVisitorDetailsNew().ToList();
         ViewBag.AllVisitorsDetalis = AllVisitors;
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #2
0
        public ActionResult LoadData()
        {
            try
            {
                //Creating instance of DatabaseContext class

                using (DBNCSVisitorEntities dc = new DBNCSVisitorEntities())
                {
                    var data = dc.uspGetVisitorDetailsNew().OrderBy(a => a.GovIdNo).ToList();
                    return(Json(new { data = data }, JsonRequestBehavior.AllowGet));
                }
            }
            catch (Exception)
            {
                throw;
            }
        }