Example #1
0
        public override void OnNewObjButtonClick(object sender, EventArgs e)
        {
            EditGroup    newG   = new EditGroup(); // Create a new group
            DialogResult dialog = newG.ShowDialog(this);

            if (dialog != DialogResult.OK)
            {
                return;
            }

            Dictionary <string, string> formData = new Dictionary <string, string> {
                { "name", newG.newName },
                { "subject", newG.newSubject }
            };

            APIHandler.CreateGroup(formData);
            RefreshList();
        }
Example #2
0
        private void editLinkLabel_Clicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            EditGroup    edit   = new EditGroup(this.group);
            DialogResult dialog = edit.ShowDialog();

            if (dialog != DialogResult.OK)
            {
                return;
            }

            Dictionary <string, string> formData = new Dictionary <string, string> {
                { "name", edit.newName },
                { "subject", edit.newSubject }
            };

            APIHandler.UpdateGroup(this.group, formData);
            MessageBox.Show("Group has been updated successfully.");
            ParentRefreshList();
        }