public PartGridViewModel(IEnumerable <Part> Parts, IWarehouseStockRepository WarehouseRepository) { rows = new List <PartGridRowModel>(); int i = 1; foreach (Part _part in Parts) { string _partSpec = _part.Specification; string _partMaterial = _part.MaterialName; int _stock = 0;//WarehouseRepository.GetTotalStock(_partSpec); rows.Add(new PartGridRowModel(i, _part, _stock)); i++; } Page = 1; Total = 200; Records = 10; }
public WorkHourController(ITaskRepository TaskRepository, IPartRepository PartRepository, IProjectRepository ProjectRepository, IUserRepository UserRepository, ICNCItemRepository CNCItemRepository, IQCInfoRepository QCInfoRepository, IWarehouseStockRepository WarehouseStockRepository, IMachineRepository MachineRepository, ICNCMachInfoRepository CNCMachInfoRepository, ISteelGroupProgramRepository SteelGroupProgramRepository, ISteelProgramRepository SteelProgramRepository, IEDMSettingRepository EDMSettingRepository, IEDMDetailRepository EDMDetailRepository, IQCPointProgramRepository QCPointProgramRepository, ISystemConfigRepository SystemConfigRepository, IQCSteelPointRepository QCSteelPointRepository, ISteelCAMDrawingRepository SteelCAMDrawingRepository, ISteelDrawingCADPartRepository SteelDrawingCADPartRepository, ICAMDrawingRepository CAMDrawingRepository, IProjectPhaseRepository ProjectPhaseRepository, IPOContentRepository POContentRepository, IQCTaskRepository QCTaskRepository, IQCCmmReportRepository QCCmmReportRepository, IQCCmmFileSettingRepository QCCmmFileSettingRepository, IPRContentRepository PRContentRepository, IPurchaseRequestRepository PurchanseRequestRepository, ICharmillRepository CharmillRepository, IEDMTaskRecordRepository EDMTaskRepository, IDepartmentRepository DepartmentRepository, IMGSettingRepository MGSettingRepository, IWEDMSettingRepository WEDMSettingRepository, ITaskHourRepository TaskHourRepository, IMachinesInfoRepository MachinesInfoRepository, ITaskTypeRepository TaskTypeRepositroy, IWH_WorkTypeRepository WorkTypeRepository) { _taskRepository = TaskRepository; _partRepository = PartRepository; _projectRepository = ProjectRepository; _userRepository = UserRepository; _cncItemRepository = CNCItemRepository; _qcInfoRepository = QCInfoRepository; _whStockRepository = WarehouseStockRepository; _machineRepository = MachineRepository; _machInfoRepository = CNCMachInfoRepository; _steelGroupProgramRepository = SteelGroupProgramRepository; _steelProgramRepository = SteelProgramRepository; _edmSettingRepository = EDMSettingRepository; _edmDetailRepository = EDMDetailRepository; _qcPointProgramRepository = QCPointProgramRepository; _systemConfigRepository = SystemConfigRepository; _qcSteelPointRepository = QCSteelPointRepository; _steelCAMDrawingRepository = SteelCAMDrawingRepository; _steelDrawingCADPartRepository = SteelDrawingCADPartRepository; _camDrawingRepository = CAMDrawingRepository; _projectPhaseRepository = ProjectPhaseRepository; _poContentRepository = POContentRepository; _qcTaskRepository = QCTaskRepository; _qcCmmReportRepository = QCCmmReportRepository; _qcCmmFileSettingRepository = QCCmmFileSettingRepository; _prContentRepository = PRContentRepository; _prRepository = PurchanseRequestRepository; _charmillRepository = CharmillRepository; _edmRecordRepository = EDMTaskRepository; _departmentRepository = DepartmentRepository; _mgSettingRepository = MGSettingRepository; _wedmSettingRepository = WEDMSettingRepository; _taskHourRepository = TaskHourRepository; _machinesinfoRepository = MachinesInfoRepository; _taskTyprRepository = TaskTypeRepositroy; _workTyprRepository = WorkTypeRepository; }