private void btnAdcontact_Click(object sender, EventArgs e) { EventView eventViewManage = new EventView(loggedInUser, false); this.Hide(); eventViewManage.ShowDialog(); this.Close(); }
private void btnPastEvents_Click(object sender, EventArgs e) { Boolean pastEvent = true; EventView eventViewManage = new EventView(loggedInUser, pastEvent); this.Hide(); eventViewManage.ShowDialog(); this.Close(); }
private void button_action_delete_event(object sender, EventArgs e) { if (sender is Button) { Button temp = (Button)sender; // FlowLayoutPanel flowLayout = (FlowLayoutPanel)temp.Parent; TableLayoutPanel tableLayoutPanel = (TableLayoutPanel)temp.Parent; // MessageBox.Show(sender.ToString()); EventDisplayController eventDisplayController = (EventDisplayController)tableLayoutPanel.Parent; string event_id = eventDisplayController.id; int userId = loggedInUser.Id; //MessageBox.Show(name + email + mobileNo); if (MessageBox.Show("Do you wish to delete Contact ", "Delete Eevent", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == System.Windows.Forms.DialogResult.Yes) { EventModelManager eventModelManager = new EventModelManager(); Boolean deleteStatus = eventModelManager.deleteEvent(event_id, userId); if (deleteStatus) { MessageBox.Show("Successfully deleted Event"); EventView eventView = new EventView(loggedInUser, false); this.Hide(); eventView.ShowDialog(); this.Close(); } else { MessageBox.Show("Db error"); } } } }