Ejemplo n.º 1
0
 public ctrlGroupEdit(Group group)
 {
     _group = group;
 }
Ejemplo n.º 2
0
 private ListViewItem CreateGroupRow(Group group)
 {
     return new ListViewItem(group.Name)
     {
         Tag = group.Id,
         SubItems =
         {
             string.Join(", ", _data.UserInGroups
                                    .Where(uig => uig.UserId == group.Id)
                                    .Join(_data.Users, uid => uid.UserId, u => u.Id, (uid, g) => g)
                                    .GroupBy(g => g.Id)
                                    .Select(g => g.First().Name)
                                    .Take(10))
         }
     };
 }
Ejemplo n.º 3
0
        public static void ShowGroupEdit(Group group, Func<Group, Task> afterSave = null)
        {
            var mc = new ctrlGroupEdit(group);

            mc.AfterSave = async g =>
            {
                if (afterSave != null)
                    await afterSave(g);

                mc.ParentForm?.Close();
            };

            ShowControlInForm(mc, ShowInFormControlSize.ControlSize);
        }