public TrainingTypeController() { //Pega o nome do usuário para exibir na barra de navegação SistemaApi username = new SistemaApi(); try { username = AuthorizationHelper.GetSystem(); ViewBag.User = username.Usuario.ChaveAmericas; if (username != null) { var imgUser = AuthorizationHelper.GetUserImage(username.Usuario.ChaveAmericas); ViewBag.UserPhoto = imgUser; } } catch { var imgUser = AuthorizationHelper.GetUserImage(""); ViewBag.User = ""; ViewBag.UserPhoto = imgUser; } _trainingType = new TrainingTypeService(); _trainingProfile = new TrainingProfileService(); }
public void Init() { _mock = new Mock <IRepositoryDTO <TrainingTypeDTO> >(); _trainingTypeService = new TrainingTypeService(_mock.Object); _trainingTypes = new List <TrainingTypeDTO> { new TrainingTypeDTO { CreatedDate = DateTime.Now, ModifiedDate = DateTime.Now, Description = string.Empty, TypeTraining = "Base", Id = 1 }, new TrainingTypeDTO { CreatedDate = DateTime.Now, ModifiedDate = DateTime.Now, Description = string.Empty, TypeTraining = "CrossFit", Id = 2 }, new TrainingTypeDTO { CreatedDate = DateTime.Now, ModifiedDate = DateTime.Now, Description = string.Empty, TypeTraining = "Elements", Id = 3 }, }; }
public MatrixController() { log.Debug("Matrix Controller called"); // HISTÓRICO _matrizHistoricoService = new MatrizHistoricoService(); // SERVIÇOS REFERENTES A MATRIZ OFICIAL _matrizService = new MatrizWorkzoneService(); _matrizFuncTrainingService = new MatrizFuncTreinamentoService(); _matrizFuncActivityService = new MatrizFuncAtividadeService(); // SERVIÇOS REFERENTES A MATRIZ TEMPORÁRIA _matrizTempService = new MatrizWorkzoneTempService(); _matrizFuncTrainingTempService = new MatrizFuncTreinamentoTempService(); _matrizFuncActivityTempService = new MatrizFuncAtividadeTempService(); // FIM _workzoneXActivity = new WorzoneXActivityService(); _activityXTraining = new ActivityXTrainingService(); _workzoneXFunc = new WorzoneXEmployeeService(); _perfilAtivXperfilItem = new PerfilAtivItemXPerfilItemService(); _workzone = new WorkzoneService(); _activity = new ActivityService(); _training = new TrainingService(); _trainingType = new TrainingTypeService(); _profileTraining = new TrainingProfileService(); _profileActivity = new ActivityProfileService(); _profileItemActivity = new ActivityProfileItemService(); _profileItemTraining = new ProfileItemService(); _activityGroup = new ActivityGroupService(); _trainingGroup = new TrainingGroupService(); _employee = new EmployeeService(); //Pega o nome do usuário para exibir na barra de navegação SistemaApi username = new SistemaApi(); ViewBag.userId = "matriz"; SetImage(); }