public override void CreateExcel()
        {
            GridRequest request = new GridRequest(Request);
            var filterGroup = request.FilterGroup;
            Expression<Func<PurchaseAndDelivery, bool>> predicate = FilterHelper.GetExpression<PurchaseAndDelivery>(filterGroup);
            var purchaseAndDeliverys = WareHouseContract.PurchaseAndDeliverys.Where(predicate).Select(m => new
            {
                m.Model,
                m.Sn,
                m.AdType,
                m.CreatedTime,
                m.D2,
                m.D3,
                m.D4
            }).ToList().Select(m => new
            {
                m.Model,
                m.Sn,
                AdType = m.AdType.ToDescription(),
                退板时间=m.CreatedTime,
                收板时间=m.D2,
                二次退板时间 = m.D3,
                二次收板时间 = m.D4
            });

            Excel(purchaseAndDeliverys, "PurchaseAndDeliverys" + DateTime.Now.ToString("yyyyMMddhhmmss"));
        }
Exemple #2
0
 public override void CreateExcel()
 {
     GridRequest request = new GridRequest(Request);
     var filterGroup = request.FilterGroup;
     Expression<Func<Cpk, bool>> predicate = FilterHelper.GetExpression<Cpk>(filterGroup);
     var cpks = TestLogContract.Cpks.Where(predicate).Select(m => new
     {
         m.Id,
         m.PlatForm,
         m.ProjectName,
         m.Opcode,
         m.Ip,
         m.Sn,
         m.TestTime,
         m.Result,
         m.Wgsn,
         m.Tch,
         m.Pcl,
         m.TestVal,
         m.MinVal,
         m.MaxVal,
         m.TestDate,
         m.LogFileName,
         m.ZipFileName
     });
     if (cpks.Count() > 300000)
     {
         Response.Write("数量超过300000,不能下载");
         return;
     }
     Excel(cpks, "Cpk" + DateTime.Now.ToString("yyyyMMddhhmmss"));
 }
        public ActionResult GridData(int? id)
        {
            int total;
            GridRequest request = new GridRequest(Request);
            var datas = GetQueryData<IgnoreCard, int>(HrContract.IgnoreCards, out total, request).Select(m => new
            {
                m.Id,
                m.EmpNo

            });
            return Json(new GridData<object>(datas, total), JsonRequestBehavior.AllowGet);
        }
        public override void CreateExcel()
        {
            GridRequest request = new GridRequest(Request);
            var filterGroup = request.FilterGroup;
            Expression<Func<IgnoreCard, bool>> predicate = FilterHelper.GetExpression<IgnoreCard>(filterGroup);
            var ignoreCards = HrContract.IgnoreCards.Where(predicate).Select(m => new
            {
                m.EmpNo
            });

            Excel(ignoreCards, "IgnoreCards" + DateTime.Now.ToString("yyyyMMddhhmmss"));
        }
        public ActionResult GridData(int? id)
        {
            int total;
            GridRequest request = new GridRequest(Request);
            var datas = GetQueryData<ProblemType, int>(SiteManagementContract.ProblemTypes, out total, request).Select(m => new
            {
                m.Id,
                m.Text,
                m.Value,
                m.CreatedTime,

            });
            return Json(new GridData<object>(datas, total), JsonRequestBehavior.AllowGet);
        }
Exemple #6
0
        public ActionResult GridData(int? id)
        {
            int total;
            GridRequest request = new GridRequest(Request);
            var datas = GetQueryData<Station, int>(TestContract.Stations, out total, request).Select(m => new
            {
                m.Name,
                m.Remark,
                m.IsAdmin,
                m.IsLocked,
                m.Id,
                m.IsDeleted,
                m.CreatedTime,

            });
            return Json(new GridData<object>(datas, total), JsonRequestBehavior.AllowGet);
        }
Exemple #7
0
        public override void CreateExcel()
        {
            GridRequest request = new GridRequest(Request);
            var filterGroup = request.FilterGroup;
            Expression<Func<SwipeCard, bool>> predicate = FilterHelper.GetExpression<SwipeCard>(filterGroup);
            var swipeCards = HrContract.SwipeCards.Where(predicate).Select(m => new
            {
                m.Card,
                m.EmpNo,
                m.EmpName,
                m.DoorIo,
                m.SwipeTime,
                m.SwipdeDate
            });

            Excel(swipeCards, "swipeCards" + DateTime.Now.ToString("yyyyMMddhhmmss"));
        }
Exemple #8
0
        public ActionResult GridData()
        {
            int total;
            GridRequest request = new GridRequest(Request);
            var datas = GetQueryData<User, int>(IdentityContract.Users, out total, request).Select(m => new
            {
                m.Name,
                m.NickName,
                m.Password,
                m.IsLocked,
                m.Id,
                m.IsDeleted,
                m.CreatedTime,
                m.Email

            });
            return Json(new GridData<object>(datas, total), JsonRequestBehavior.AllowGet);
        }
 public ActionResult GridData(int? id)
 {
     int total;
     GridRequest request = new GridRequest(Request);
     var datas = GetQueryData<OperationLog, int>(TestLogContract.OperationLogs, out total, request).Select(m => new
     {
         m.Id,
         m.Num,
         m.MoveTimes,
         m.ReadTimes,
         m.ZipTimes,
         m.DeleteTimes,
         m.TotalTimes,
         m.OperationType,
         m.CreatedTime
     });
     return Json(new GridData<object>(datas, total), JsonRequestBehavior.AllowGet);
 }
Exemple #10
0
 public override void CreateExcel()
 {
     GridRequest request = new GridRequest(Request);
     var filterGroup = request.FilterGroup;
     Expression<Func<Problem, bool>> predicate = FilterHelper.GetExpression<Problem>(filterGroup);
     var cpks = SiteManagementContract.Problems.Where(predicate).Select(m => new
     {
         m.ProblemTime,
         m.Department,
         m.Factory,
         m.QuestionFrom,
         m.Detail,
         m.Reason,
         m.Solution,
         m.IsComplete,
         m.IsPeople,
         m.Workers,
         m.Suggestion,
         m.Remark,
         m.Type,
         m.CreatedTime
     });
     Excel(cpks, "Problem" + DateTime.Now.ToString("yyyyMMddhhmmss"));
 }
 public ActionResult GridData(int? id)
 {
     int total;
     GridRequest request = new GridRequest(Request);
     var datas = GetQueryData<PurchaseAndDelivery, int>(WareHouseContract.PurchaseAndDeliverys, out total, request).Select(m => new
     {
         m.Id,
         m.Model,
         m.Sn,
         m.AdType,
         m.CreatedTime,
         m.D2,
         m.D3,
         m.D4
     }).ToList().Select(m => new
     {
         m.Id,
         m.Model,
         m.Sn,
         AdType = m.AdType.ToDescription(),
         m.CreatedTime,
         m.D2,
         m.D3,
         m.D4
     });
     return Json(new GridData<object>(datas, total), JsonRequestBehavior.AllowGet);
 }
Exemple #12
0
 public ActionResult GridData(int? id)
 {
     int total;
     GridRequest request = new GridRequest(Request);
     var datas = GetQueryData<SwipeCard, int>(HrContract.SwipeCards, out total, request).Select(m => new
     {
         m.Id,
         m.Card,
         m.EmpNo,
         m.EmpName,
         m.DoorIo,
         m.SwipeTime,
         m.SwipdeDate
     });
     return Json(new GridData<object>(datas, total), JsonRequestBehavior.AllowGet);
 }
Exemple #13
0
 public ActionResult GridData(int? id)
 {
     int total;
     GridRequest request = new GridRequest(Request);
     var datas = GetQueryData<Problem, int>(SiteManagementContract.Problems, out total, request).
         Where(m=>m.IsDeleted==false).
         Select(m => new
     {
         m.ProblemTime,
         m.Department,
         m.Factory,
         m.QuestionFrom,
         m.Detail,
         m.Reason,
         m.Solution,
         m.IsComplete,
         m.IsPeople,
         m.Workers,
         m.Suggestion,
         m.Remark,
         m.Type,
         m.Id,
         m.CreatedTime
     });
     return Json(new GridData<object>(datas, total), JsonRequestBehavior.AllowGet);
 }
Exemple #14
0
        public ActionResult GridData(int? id)
        {
            int total;
            GridRequest request = new GridRequest(Request);
            var datas = GetQueryData<Cpk, int>(TestLogContract.Cpks, out total, request).Select(m => new
            {
                m.Id,
                m.PlatForm,
                m.ProjectName,
                m.Opcode,
                m.Ip,
                m.Sn,
                m.TestTime,
                m.Result,
                m.Wgsn,
                m.Tch,
                m.Pcl,
                m.TestVal,
                m.MinVal,
                m.MaxVal,
                m.TestDate,
                m.LogFileName,
                m.ZipFileName

            });

            return Json(new GridData<object>(datas, total), JsonRequestBehavior.AllowGet);
        }