示例#1
0
 public PreventiveMaintenanceController(SiteService siteService, PlantService plantService, LineService lineService, MachineService machineService, UserService userService, PreventiveMaintenanceService pmServices, UserAssignmentsService uaServices, PreventiveWorkDescriptionService pwdServices, PreventiveReviewHistoryService prhServices, ScheduleTypeService pstServices, VendorCategoryService vcServices, VendorService vendorServices)
 {
     this._siteService    = siteService;
     this._plantService   = plantService;
     this._lineService    = lineService;
     this._machineService = machineService;
     this._userService    = userService;
     this._pmServices     = pmServices;
     this._uaServices     = uaServices;
     this._pwdServices    = pwdServices;
     this._prhServices    = prhServices;
     this._pstServices    = pstServices;
     this._vcServices     = vcServices;
     this._vendorServices = vendorServices;
 }
示例#2
0
        //获取Type状态信息
        public ActionResult GetScheduleType()
        {
            int pageIndex = Request["page"] != null?int.Parse(Request["page"]) : 1;

            int pageSize = Request["rows"] != null?int.Parse(Request["rows"]) : 10;

            int totalCount;
            var temp = ScheduleTypeService.LoadPageEntities(pageIndex, pageSize, out totalCount, x => x.Del == 0, x => x.ID, false);
            var Rtmp = from a in temp
                       select new {
                ID       = a.ID,
                ItemText = a.ItemText
            };

            return(Json(new { rows = Rtmp, total = totalCount }, JsonRequestBehavior.AllowGet));
        }
示例#3
0
        //删除日程状态
        public ActionResult DelType()
        {
            var id   = Convert.ToInt32(Request["id"]);
            var temp = ScheduleTypeService.LoadEntities(x => x.ID == id).FirstOrDefault();

            if (temp == null)
            {
                return(Json(new { msg = "数据库中无要删除的信息!" }, JsonRequestBehavior.AllowGet));
            }
            else
            {
                if (ScheduleTypeService.EditEntity(temp))
                {
                    return(Json(new { ret = "ok" }, JsonRequestBehavior.AllowGet));
                }
                else
                {
                    return(Json(new { msg = "操作错误,没有删除成功!" }, JsonRequestBehavior.AllowGet));
                }
            }
        }
 public ScheduleTypeController(ScheduleTypeService service)
 {
     _service = service;
 }
示例#5
0
 //添加日程状态
 public ActionResult AddSchedule(ScheduleType sdt)
 {
     sdt.Del = 0;
     ScheduleTypeService.AddEntity(sdt);
     return(Json(new { ret = "ok" }, JsonRequestBehavior.AllowGet));
 }