Пример #1
0
        public ActionResult CrewsGridData(string sidx, string sord, int page, int rows)
        {
            uls_dbDataContext ulsdb_dc = new uls_dbDataContext();
            var svc_crews = ulsdb_dc.GetGridSvcCrews();

            var dataJson = new
            {
                total    =
                    page = 1,
                records  = 10000,
                rows     = (from s in svc_crews
                            select new
                {
                    id = s.crew_num,
                    cell = new string[] {
                        Convert.ToString(s.crew_num),
                        s.svc_foreman.svc_foreman_nm,
                        Convert.ToString(s.svc_foreman_id)
                    }
                }).ToArray()
            };

            return(Json(dataJson, JsonRequestBehavior.AllowGet));
        }