Example #1
0
        private void AddSubscription()
        {
            SubscriptionForm form = new SubscriptionForm();

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                Subscription subscription = new Subscription
                {
                    NameService = form.NameService,
                    Description = form.Description
                };
                logic.AddSubscription(subscription);
                UpdateSubscriptionsGrid();
            }
        }
Example #2
0
 private void EditSelectedSubscription()
 {
     if (ctlSubscriptionGrid.SelectedCells.Count > 0)
     {
         Subscription     subscription = (Subscription)ctlSubscriptionGrid.SelectedCells[0].OwningRow.DataBoundItem;
         SubscriptionForm form         = new SubscriptionForm(subscription);
         if (form.ShowDialog(this) == DialogResult.OK)
         {
             subscription.NameService = form.NameService;
             subscription.Description = form.Description;
             logic.UpdateSubscription(subscription);
         }
     }
     UpdateUsersGrid();
     UpdateSubscriptionsGrid();
 }