public ActionResult SetGroup(ClientManagerFormModel formModel) { try { if (ModelState.IsValid) { foreach (var client in formModel.ClientsList) { if (client.IsSelected) { var toEdit = endPlayerClientService.GetEndPlayerClient(client.ID); if (toEdit != null) { toEdit.ClientGroupID = formModel.ClientsGroupsSL; endPlayerClientService.EditEndPlayerClient(toEdit); } } } endPlayerClientService.SaveEndPlayerClient(); } return(RedirectToAction("Index")); } catch { return(RedirectToAction("Index"));//return View("Index"); } }
public void PoorAuthenticate(string clientidstr) { int clientid = Int32.Parse(clientidstr); var client = endPlayerClientService.GetEndPlayerClient(clientid); if (client != null) { _connections.Add(Context.ConnectionId, clientid); client.IsConnected = true; endPlayerClientService.EditEndPlayerClient(client); endPlayerClientService.SaveEndPlayerClient(); //Clients.Caller.confirm(true); SendCurrentSchedule(client.CampaignID); } //else //{ // Clients.Caller.confirm(false); //} }