// // GET: /ProductType/ public ActionResult Index(string SourceAccountId, string RestaurantId, string Status = null, string Date = null, string Time = null, string Type = null, string IsOrder = null, string MemberCardNo = null, string Orderid = null) { Session["SourceAccountId"] = SourceAccountId; ProductTypeModel ptm = new ProductTypeModel(); if (Date != null & Time != null) { if (Time.Equals("0")) { DateTime data = Convert.ToDateTime(Date); data = data.AddHours(9); ViewBag.BookTime = data; } else if (Time.Equals("1")) { DateTime data = Convert.ToDateTime(Date); data = data.AddHours(16); ViewBag.BookTime = data; } } if (!string.IsNullOrEmpty(IsOrder) && IsOrder == "1" && !string.IsNullOrEmpty(Orderid)) { OrderDetailsModel odm = new OrderDetailsModel(); OrderModel om = new OrderModel(); int i; i = odm.EmptyOrderDetails(MemberCardNo, Orderid); i = om.EmptyOrderStatus(Orderid); i = om.EmptyOrder(Orderid); } List<ProductType> pt = null; if (!string.IsNullOrEmpty(RestaurantId)) { if (RestaurantId.ToUpper() == "0E71D411-EFE0-4964-8E3D-2901E0823815") { List<ProductType> onept = ptm.getOneProductType(RestaurantId); ViewBag.FirstMenus = onept; if (onept != null && onept.Count() > 0) pt = ptm.getProductTypebyId(RestaurantId, onept.First().TypeId.ToString()); } else { pt = ptm.getProductType(RestaurantId); } } Session["begindm"] = RestaurantId; string RestaurantId1 = Session["begindm"] != null ? Session["begindm"].ToString() : ""; ViewBag.SourceAccountId = SourceAccountId; ViewBag.Status = Status; ViewBag.FastFood = Type; ViewBag.RestaurantId = RestaurantId; ViewBag.MemberCardNo = MemberCardNo; ViewBag.OrderId = Orderid; return View(pt ?? new List<ProductType>()); }
// // GET: /AutoMenuIndex/ public ActionResult AutoMenuIndex(string id, string name, string Type, string CompanyId, string RstType, string IsOrder = null, string IsNewOrder = null, string orderId = null, string MemberCardNo=null) { // Session["CompanyId"] = id; ViewBag.RestaurantId = id; ViewBag.SourceAccountId = name; ViewBag.Type = Type; ViewBag.CompanyId = CompanyId; ViewBag.RstType = RstType; ViewBag.IsOrder = IsOrder; if (!string.IsNullOrEmpty(IsNewOrder) && IsNewOrder == "NewOrder") { OrderDetailsModel odm = new OrderDetailsModel(); OrderModel om = new OrderModel(); int i; i = odm.EmptyOrderDetails(MemberCardNo, orderId); i = om.EmptyOrder(orderId); } return View(); }