public EditMOCController(IFormsFactory factory, IEditMOCView view, Moc moc, User user) { _factory = factory; _view = view; _user = user; if (moc != null) { _moc = moc; _parts = moc.MocParts.ToList(); } else { _moc = new Moc(); _parts = new List <MocPart>(); } _partsService = new PartService(); _mocService = new MOCService(); _categoryRepository = new Repository <Category>(); _colorRepository = new Repository <Color>(); _currQuery = _partsService.GetAll(); }
public DatabasePartsController(IFormsFactory factory, IDatabasePartsView view) { _factory = factory; _view = view; _partsService = new PartService(); _lSetService = new LSetService(); _categoryRepository = new Repository <Category>(); _currQuery = _partsService.GetAll(); }