Example #1
0
 public JsonResult Get(int start, int limit, ExtGridSearch condition)
 {
     int totalCount = 0;
     var list = WMFactory.Jobs.FindByPage(start, limit, out totalCount,
                                               o => o.OrderByDescending(x => x.IsTop).ThenByDescending(x=>x.CreateTime),
                                               null, condition);
     //转换
     var result = from j in list
                  select new
                  {
                      Id=j.Id,
                      JobName=j.JobName,
                      JobSeekers=j.Seekers.Count(),
                      Responsibilities=j.Responsibilities,
                      Skills=j.Skills,
                      NeedNum=j.NeedNum,
                      Email=j.Email,
                      IsTop=j.IsTop,
                      IsShow=j.IsShow,
                      CreateUser=j.CreateUser,
                      CreateTime=j.CreateTime,
                      ModifyUser=j.ModifyUser,
                      ModifyTime=j.ModifyTime
                  };
     return Json(new { data = result, total = totalCount }, JsonRequestBehavior.AllowGet);
 }
Example #2
0
 public JsonResult Get(int start, int limit, ExtGridSearch condition)
 {
     int totalCount = 0;
     var list = WMFactory.HRCourse.FindByPage(start, limit, out totalCount,
                                               o => o.OrderByDescending(x => x.CreateTime),
                                               null, condition);
     var result = from c in list
                  select new
                  {
                      Id = c.Id,
                      CourseName = c.CourseName,
                      TeacherType = c.TeacherType,
                      SignUpType = c.SignUpType,
                      OrgName = c.OrgName,
                      Fee = c.Fee,
                      TrainingNum = c.TrainingNum,
                      RegisterNum=c.Users.Count(),
                      Venue = c.Venue,
                      StartDate = c.StartDate,
                      EndDate = c.EndDate,
                      CourseDesc = c.CourseDesc,
                      IsShow = c.IsShow,
                      CreateUser = c.CreateUser,
                      CreateTime = c.CreateTime,
                      ModifyUser = c.ModifyUser,
                      ModifyTime = c.ModifyTime
                  };
     return Json(new { data = result, total = totalCount }, JsonRequestBehavior.AllowGet);
 }
 public JsonResult Get(int start, int limit, ExtGridSearch condition)
 {
     int totalCount = 0;
     var list = WMFactory.GLGameUserInfo.FindByPage(start, limit, out totalCount,
                                               o => o.OrderByDescending(x => x.CreateTime),
                                               null, condition);
     return Json(new { data = list, total = totalCount }, JsonRequestBehavior.AllowGet);
 }
 public JsonResult Get(int start, int limit, Guid accountId, ExtGridSearch condition)
 {
     int totalCount = 0;
     var list = WMFactory.WX_QR_CodeScanFans.FindByPage(start, limit, out totalCount,
                                               o => o.OrderByDescending(x => x.CreateTime),
                                                 f => f.AccountId == accountId, condition);
     return Json(new { data = list, total = totalCount }, JsonRequestBehavior.AllowGet);
 }
Example #5
0
 public JsonResult Get(int start, int limit, ExtGridSearch condition)
 {
     int totalCount = 0;
     Guid TntId = Guid.Parse(AuthToken.CurrentUser.GroupId);
     var list = WMFactory.WXAccount.FindByPage(start, limit, out totalCount,
                                               o => o.OrderByDescending(x => x.CreateTime),
                                               f => f.TntId == TntId, condition);
     return Json(new { data = list, total = totalCount }, JsonRequestBehavior.AllowGet);
 }
 public JsonResult Get(int start, int limit, ExtGridSearch condition)
 {
     int totalCount = 0;
     Guid tntId = Guid.Parse(AuthToken.CurrentUser.GroupId);
     var list = WMFactory.ITSMEngineer.FindByPage(start, limit, out totalCount,
                                               o => o.OrderBy(x => x.EgrName),
                                               f => f.TntId == tntId, condition);
     return Json(new { data = list, total = totalCount }, JsonRequestBehavior.AllowGet);
 }
Example #7
0
 public JsonResult Get(int start, int limit, ExtGridSearch condition)
 {
     int totalCount = 0;
     Guid tntId = Guid.Parse(AuthToken.CurrentUser.GroupId);
     var list = WMFactory.ITSMEvent.FindByPage(start, limit, out totalCount,
                                               o => o.OrderByDescending(x => x.CreateTime),
                                               f => f.TntId == tntId, condition);
     //只在第一页并且不查询的时候起作用
     if (list.Count() > 0 && start == 0 && condition.fields == null && condition.query == null)
     {
         Session["lastGetTime"] = list.Max(f => f.CreateTime);
     }
     return Json(new { data = list, total = totalCount }, JsonRequestBehavior.AllowGet);
 }
 public JsonResult Get(int start, int limit,Guid courseId, ExtGridSearch condition)
 {
     int totalCount = 0;
     var list = WMFactory.HRLKCourseUser.FindByPage(start, limit, out totalCount,
                                               o => o.OrderByDescending(x => x.CreateTime),
                                               f=>f.Cid==courseId, condition);
     var result = from s in list
                  select new
                  {
                      Id = s.Id,
                      UserName = s.User.UserName,
                      EmployeeID = s.User.EmployeeID,
                      CreateTime = s.CreateTime
                  };
     return Json(new { data = result, total = totalCount }, JsonRequestBehavior.AllowGet);
 }
Example #9
0
 public JsonResult Get(int start, int limit, ExtGridSearch condition, Guid jobId)
 {
     int totalCount = 0;
     var list = WMFactory.JobSeeker.FindByPage(start, limit, out totalCount,
                                               o => o.OrderByDescending(x => x.CreateTime),
                                               s => s.JobId == jobId, condition);
     var result = from s in list
                  select new
                  {
                      Id=s.Id,
                      JobId=s.JobId,
                      CreateTime=s.CreateTime,
                      CreateUser=s.CreateUser,
                      EmployeeId=s.EmployeeId,
                      Remark=s.Remark,
                      SkrName=s.SkrName,
                      SkrSex=s.SkrSex,
                      Telphone=s.Telphone
                  };
     return Json(new { data = result, total = totalCount }, JsonRequestBehavior.AllowGet);
 }
 public JsonResult Get(Guid lid, ExtGridSearch condition)
 {
     var list = WMFactory.HRCourseAttend.CourseSignHistory(o => o.OrderBy(x => x.CreateTime), f => f.Lid == lid);
     return Json(new { data = list }, JsonRequestBehavior.AllowGet);
 }