本文整理汇总了C#中AdminController.SeatCustomer方法的典型用法代码示例。如果您正苦于以下问题:C# AdminController.SeatCustomer方法的具体用法?C# AdminController.SeatCustomer怎么用?C# AdminController.SeatCustomer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AdminController
的用法示例。
在下文中一共展示了AdminController.SeatCustomer方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ReservationSummaryListView_OnItemCommand
protected void ReservationSummaryListView_OnItemCommand(object sender, ListViewCommandEventArgs e)
{
// Check the command name and add the reservation for the specified seats.
if (e.CommandName.Equals("Seat"))
{
MessageUserControl.TryRun(() =>
{
// Get the data
var reservationId = int.Parse(e.CommandArgument.ToString());
var selectedItems = new List<byte>();
foreach (ListItem item in ReservationTableListBox.Items)
{
if (item.Selected)
selectedItems.Add(byte.Parse(item.Text.Replace("Table ", "")));
}
var when = Mocker.MockDate.Add(Mocker.MockTime);
// Seat the reservation customer
var controller = new AdminController();
controller.SeatCustomer(when, reservationId, selectedItems, int.Parse(WaiterDropDownList.SelectedValue));
// Refresh the gridview
SeatingGridView.DataBind();
ReservationsRepeater.DataBind();
ReservationTableListBox.DataBind();
}, "Customer Seated", "Reservation customer has arrived and has been seated");
}
}