private void btnJoinedGroups_Click_1(object sender, EventArgs e) { using (var frm = new CreateGroupForm(LoggedInUser.Email)) { frm.ShowDialog(); } }
private void createNewGroupToolStripMenuItem_Click(object sender, EventArgs e) { using (CreateGroupForm frm = new CreateGroupForm(LoggedInUser.Email)) { frm.ShowDialog(); } }
public ActionResult Create(CreateGroupForm form) { CreateGroup createGroup = new CreateGroup(_db, Requester(), form); var g = createGroup.Execute(); return(RedirectToAction("Messages", new { g.Id })); }
public async Task <ServiceResult <GroupDetail> > CreateGroup([FromBody] CreateGroupForm createGroupForm) { var result = await AccountService.UserFromId(createGroupForm.UserId); if (result.State != ServiceResultEnum.Exist) { return(NotFound <GroupDetail>(null, result.Detail)); } var newGroup = await GroupService.NewGroup(result.ExtraData, createGroupForm.GroupName); return(newGroup.State == ServiceResultEnum.Success ? Success(newGroup.ExtraData.ToDetail(), newGroup.Detail) : Fail <GroupDetail>(null, newGroup.Detail)); }
public ActionResult Create() { var categories = _db.Categories.Select(c => new SelectListItem { Text = c.Name, Value = c.Id.ToString() } ).ToList(); var vm = new CreateGroupForm { Categories = categories }; return(View(vm)); }
public CreateGroup(ApplicationDbContext db, ApplicationUser requester, CreateGroupForm form) : base(db, requester) { this.form = form; }
private void openGroupFormLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { CreateGroupForm frm = new CreateGroupForm(this); frm.ShowDialog(); }