// GET: EventEditing/Edit/5
        public ActionResult Edit(Guid GuestID)
        {
            GuestList guestDetail = new GuestList();

            var guest = guestDetail.GetSingleGuestDetails(GuestID);

            return(View(guest));
        }
        public ActionResult Edit([Bind(Include = "GuestID,FirstName,LastName,isDeacon")] GuestList guestEdit)
        {
            try
            {
                GuestList guestClass = new GuestList();

                var result = guestClass.UpdateSingleGuest(guestEdit);
                return(RedirectToAction("Index", "RegistrationPage", new { area = "" }));
            }
            catch
            {
                return(View());
            }
        }
        public ActionResult Remove(Guid GuestID, Guid eventID)
        {
            try
            {
                // TODO: Add delete logic here
                GuestList guestClass = new GuestList();
                var       result     = guestClass.DeleteSingleGuest(GuestID);

                return(RedirectToAction("Index", new { eventID = eventID }));
            }
            catch
            {
                return(View());
            }
        }
예제 #4
0
        public int UpdateSingleGuest(GuestList guest)
        {
            var result = _dataProvider.UpdateSingleGuest(guest);

            return(result);
        }
        public int UpdateSingleGuest(GuestList guest)
        {
            var Result = ExecuteScalarSpWithDapper <int>("UpdateSingleGuest", new { guest.GuestID, guest.FirstName, guest.LastName, guest.isDeacon });

            return(Result);
        }