private void btnSubscriberDelete_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("Are you sure you want to delete this subscriber?",
                         "Deleting",
                         MessageBoxButtons.YesNoCancel,
                         MessageBoxIcon.Question) == DialogResult.Yes)
     {
         var sub = SubscriberHelper.GetSubscribers().Where(x => x.ToString().Equals(lbSubscribers.SelectedItem)).FirstOrDefault();
         SubscriberHelper.DeleteSubscriber(sub.Id);
         LoadSubscribers();
     }
 }
Exemple #2
0
 public ActionResult DeleteConfirmed(int id)
 {
     SubscriberHelper.DeleteSubscriber(id);
     return(RedirectToAction("Index"));
 }