/// <summary> /// Initializes a new instance of the /// ActionModelReservationActionNotAllowedReservationActionReason /// class. /// </summary> /// <param name="action">Possible values include: 'CheckIn', /// 'CheckOut', 'Cancel', 'Amend', 'AmendTimeSlices', 'AmendArrival', /// 'AmendDeparture', 'NoShow', 'AssignUnit', 'UnassignUnit'</param> public ActionModelReservationActionNotAllowedReservationActionReason(ReservationAction action, bool isAllowed, IList <ActionReasonModelNotAllowedReservationActionReason> reasons = default(IList <ActionReasonModelNotAllowedReservationActionReason>)) { Action = action; IsAllowed = isAllowed; Reasons = reasons; CustomInit(); }
public ActionResult HistoryReservation() { if ((string)Session["role"] == "Manager") { ViewBag.Reservation = ReservationAction.All_Reservation(); return(View()); } return(Redirect("~/Home/HomePage")); }
public ActionResult List_Reservation() { if (Session["id"] != null) { ViewBag.Table = ReservationAction.Get_All_Reservation(); ReservationAction.Auto_Cancel(); return(View()); } return(Redirect("~/Home/HomePage")); }
public ActionResult Book_Table(int ID_Table) { ReservationAction.Auto_Cancel(); string phone = (string)Session["member_id"]; if (MemberShipAction.Find_MemberShip_By_Phone(phone).score >= 10) { ReservationAction.Create_Reservation(phone, ID_Table); TableAction.Delete_Table(ID_Table); return(Redirect("~/Home/HomePage")); } return(View()); }
public ActionResult MemberInformation() { if (Session["name"] != null) { var id = (string)Session["member_id"]; ViewBag.Customer = MemberShipAction.Find_MemberShip_By_Phone(id); ViewBag.Reservation = ReservationAction.Get_Reservation_By_Phone(id); ViewBag.History = ReservationAction.Get_History_Reservation(id); return(View()); } else { return(Redirect("~/Home/HomePage")); } }
public ActionResult Cancel_By_Customer(int ID_Reservation) { ReservationAction.Auto_Cancel(); using (var db = new DBConnection()) { var reservation = db.DbReservation.Find(ID_Reservation); if (reservation.cancel == false && reservation.checkin == false) { ReservationAction.Cancel_Reservation((string)Session["member_id"], ID_Reservation); } else { if (reservation.seats == 5) { MemberShipAction.Decreate_Score((string)Session["member_id"], 10); } if (reservation.seats == 10) { MemberShipAction.Decreate_Score((string)Session["member_id"], 15); } } return(Redirect("~/Account/MemberInformation")); } }
internal static string ToSerializedValue(this ReservationAction value) { switch (value) { case ReservationAction.CheckIn: return("CheckIn"); case ReservationAction.CheckOut: return("CheckOut"); case ReservationAction.Cancel: return("Cancel"); case ReservationAction.Amend: return("Amend"); case ReservationAction.AmendTimeSlices: return("AmendTimeSlices"); case ReservationAction.AmendArrival: return("AmendArrival"); case ReservationAction.AmendDeparture: return("AmendDeparture"); case ReservationAction.NoShow: return("NoShow"); case ReservationAction.AssignUnit: return("AssignUnit"); case ReservationAction.UnassignUnit: return("UnassignUnit"); } return(null); }
public ActionResult Checkin_Table(string Customer_Phone, int ID) { ReservationAction.Checkin_Reservation(Customer_Phone, ID); ReservationAction.Auto_Cancel(); return(Redirect("~/MemberShip/List_Reservation")); }
public async Task <bool> Post([FromBody] ReservationRequest value) { return(await ReservationAction.Reserve(value)); }