public async Task <ActionResult> ClientsList() { var clientList = new AddClientRequestView(); try { clientList.ClientList = await ClientServicClient.GetAllClientList(); } catch (Exception e) { ViewBag.Message = e.Message; } return(View(clientList)); }
public async Task <ActionResult> RegisterClient() { var modelView = new AddClientRequestView(); if (Session["User"] != null && Session["Role"].ToString() == "Admin") { try { modelView.TeamListForUser = await TeamServiceClient.GetAllTeam(); } catch (Exception e) { ViewBag.Message = e.Message; } } return(View(modelView)); }
public async Task <ActionResult> ClientsList() { var clientList = new AddClientRequestView(); if (Session["User"] != null) { try { clientList.ClientList = await ClientServicClient.GetAllClientByUser(Session["User"].ToString()); } catch (Exception e) { ViewBag.Message = e.Message; } } return(View(clientList)); }
public async Task <ActionResult> RegisterClient(AddClientRequestView addClientRequest) { if (ModelState.IsValid) { try { await ClientServicClient.RegisterClient(addClientRequest); ViewBag.Message = "Done :)"; //return RedirectToAction("RegisterClient"); } catch (Exception e) { ViewBag.Message = "Sikertelen regisztráció!!"; } } addClientRequest.TeamListForUser = await TeamServiceClient.GetAllTeam(); return(View(addClientRequest)); }