Beispiel #1
0
        public void RemoveAppointmentTest()
        {
            // Arrange
            AppointmentRemove appointment = new AppointmentRemove();

            // Act
            var result = appointment.DeleteAppointment(1002);

            // Assert
            Assert.IsTrue(result);
        }
Beispiel #2
0
        /// <summary>
        /// This Action calls for the button which can delete an Appointment
        /// </summary>
        /// <returns>The form view which contains list of Appointments after deleting a paricular Appointment</returns>
        public ActionResult RemoveAppointmentData(int id)
        {
            if (Session["userId"] == null)
            {
                return(Redirect("~"));
            }
            AppointmentRemove Appointment = new AppointmentRemove();

            Appointment.DeleteAppointment(id);
            return(RedirectToAction("Appointments"));
        }