public EncomendaController(JJMSContext context, FornecedorController fController, UtilizadorController uController, CartaoController caController) { _context = context; _fController = fController; _uController = uController; _caController = caController; }
public FuncionarioController(JJMSContext context, UtilizadorController uController, EncomendaController eController, FornecedorController fController) { _context = context; _uController = uController; _eController = eController; _fController = fController; }
public MenuClienteController(JJMSContext context, EncomendaController eController, UtilizadorController uController, ClienteController cController, FuncionarioController fController) { _context = context; _uController = uController; _eController = eController; _cController = cController; _fController = fController; }
public MenuFuncionarioController(JJMSContext context, EncomendaController eController, FuncionarioController fController, ClienteController cController, FornecedorController fornController, UtilizadorController uController) { this._context = context; this._eController = eController; this._fController = fController; this._cController = cController; this._fornController = fornController; this._uController = uController; }
/// <summary> /// Checks input and if all is right, save the Cliente to the DataBase /// </summary> /// <param name="user"></param> /// <param name="password"></param> /// <param name="email"></param> /// <param name="morada"></param> /// <param name="telefone"></param> /// <returns>returns the correspondent Action</returns> public ActionResult Registar(string user, string password, string email, string morada, string telefone) { if (_uController.emailAssociado(email)) { return(EmailEmUso()); } if (this.telefoneValido(telefone) == false) { return(TelefoneInvalido()); } if (this.passwordSegura(password) == false) { return(PasswordInsegura()); } Cliente nCliente = _context.newCliente(user, UtilizadorController.hashFunction(password), email, morada, telefone); _context.Clientes.Add(nCliente); _context.SaveChanges(); return(Sucesso()); }
public ClienteController(JJMSContext context, UtilizadorController uController) { _context = context; _uController = uController; }