protected void UpdateButton_Click(object sender, EventArgs e) { if (NameTextBox.Text == "") { Status.Text = "Please Enter Name"; } else { int id = Convert.ToInt32(Request.QueryString["Id"]); addNotificationRepository.UpdateEventData(id, NameTextBox.Text, MandetoryCheckBox.Checked, ConfidentialCheckBox.Checked); addNotificationRepository.DeleteChannel(id); if (Intranet.Checked) { addNotificationRepository.InsertEventChannel(id, 1); } if (EmailsCheckBox.Checked) { addNotificationRepository.InsertEventChannel(id, 2); } if (UnaBotCheckBox.Checked) { addNotificationRepository.InsertEventChannel(id, 3); } if (SmsCheckBox.Checked) { addNotificationRepository.InsertEventChannel(id, 4); } Response.Redirect("Notifications.aspx"); } }
protected void AddButton_Click1(object sender, EventArgs e) { if (NameTextBox.Text == "") { Label1.Text = "Please Enter Name"; } else { AddNotificationRepository addNotificationRepository = new AddNotificationRepository(); int Eid; Eid = addNotificationRepository.InsertEvent(NameTextBox.Text, Convert.ToInt32(SourceDropList.SelectedValue), ConfidentialEventCheckBox.Checked, MandetoryEventCheckBox.Checked); for (int Count = 0; Count < 4; Count++) { if (ChannelCheckBoxList.Items[Count].Selected) { addNotificationRepository.InsertEventChannel(Eid, Convert.ToInt32(ChannelCheckBoxList.Items[Count].Value)); } } Response.Redirect("Notifications.aspx"); } }