当前位置: 首页>>代码示例>>C#>>正文


C# Manager.CreateReport方法代码示例

本文整理汇总了C#中Manager.CreateReport方法的典型用法代码示例。如果您正苦于以下问题:C# Manager.CreateReport方法的具体用法?C# Manager.CreateReport怎么用?C# Manager.CreateReport使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Manager的用法示例。


在下文中一共展示了Manager.CreateReport方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Main

        internal static void Main()
        {
            Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");

            Kitchen kitchen = new Kitchen();

            // Testing ServingArea.cs
            ServingArea.Tables[2].TableStatus = TableStatus.Occupied;
            ServingArea.Tables[5].TableStatus = TableStatus.Reserved;

            foreach (var item in ServingArea.Tables)
            {
                Console.WriteLine(item.TableStatus);
            }

            Console.WriteLine();

            // Testing Hostess
            Hostess hostess = new Hostess("Penka", "12345", "password");
            hostess.ReserveTable(ServingArea.Tables[2], ClientType.Regular);
            hostess.ReserveTable(ServingArea.Tables[1], ClientType.Special);
            hostess.CancelReservation(ServingArea.Tables[5]);

            Console.WriteLine();
            Console.WriteLine(ServingArea.Tables[2].TableStatus);
            Console.WriteLine(ServingArea.Tables[1].TableStatus);
            Console.WriteLine(ServingArea.Tables[5].TableStatus);
            Console.WriteLine();

            // Testing Waiters
            MenuItem menu = new MenuItem();
            IList<MenuItem> menuList = menu.InitializeMenu();

            Waiter waiter = new Waiter("Todor", "56789", "password");
            waiter.AddMenuItemToOrder(ServingArea.Tables[1], menuList[2]);
            waiter.AddMenuItemToOrder(ServingArea.Tables[1], menuList[1]);
            waiter.AddMenuItemToOrder(ServingArea.Tables[1], menuList[0]);
            waiter.RemoveItemFromOrder(ServingArea.Tables[1], menuList[0]);
            waiter.CalculateCheck(ServingArea.Tables[1]);
            waiter.PrintCheck(ServingArea.Tables[1]);

            waiter.CloseTable(ServingArea.Tables[1], CheckPaymentMethod.Cash);

            waiter.AddMenuItemToOrder(ServingArea.Tables[3], menuList[5]);
            waiter.CalculateCheck(ServingArea.Tables[3]);
            waiter.CloseTable(ServingArea.Tables[3], CheckPaymentMethod.Card);
            waiter.AddMenuItemToOrder(ServingArea.Tables[2], menuList[11]);
            waiter.CalculateCheck(ServingArea.Tables[2]);
            waiter.CloseTable(ServingArea.Tables[2], CheckPaymentMethod.Card);

            Waiter waiter2 = new Waiter("Alex", "88888", "password8");
            waiter2.AddMenuItemToOrder(ServingArea.Tables[7], menuList[8]);
            waiter2.CalculateCheck(ServingArea.Tables[7]);
            waiter2.PrintCheck(ServingArea.Tables[7]);
            waiter2.CloseTable(ServingArea.Tables[7], CheckPaymentMethod.Cash);
            Console.WriteLine();

            // Testing Manager
            Manager manager = new Manager("Ivan", "67456745", "pass");
            manager.CreateReport("03/04/15", "09/04/15");
            Console.WriteLine();
            manager.CreateEmployeeReport(waiter, "03/04/15", "09/04/15");

            // Testing Kitchen
            Console.WriteLine("Orders received by Kitchen:");
            foreach (var item in DishesToCook)
            {
                Console.WriteLine(item.ToString());
            }
        }
开发者ID:LafForce,项目名称:TelerikAcademyHWs,代码行数:70,代码来源:StartRestaurant.cs


注:本文中的Manager.CreateReport方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。