public int EmptyMyMenu(string MemberCardNo, string orderId, string SourceAccountId, string type = null)
        {
            ViewBag.SourceAccountId = SourceAccountId;
            ViewBag.OrderId         = orderId;
            ViewBag.MemberCardNo    = MemberCardNo;
            OrderDetailsModel odm = new OrderDetailsModel();
            OrderModel        om  = new OrderModel();
            //  List<OrderDetails> list = odm.getOrderDetaiById(orderId);
            int i;

            //if (list==null&&list.Count== 0)
            //{
            //    i = om.EmptyOrder(orderId);
            //}
            //else
            //{emptyOrdersDetail

            i = odm.EmptyOrderDetails(MemberCardNo, orderId);
            i = om.EmptyOrderStatus(orderId);
            i = om.EmptyOrder(orderId);
            //  if (i == 1)
            //  {
            if (string.IsNullOrEmpty(type))
            {
            }
            // }
            // }
            return(i);
            // return RedirectToAction("MyMenu", "MyMenu", new { MemberCardNo = MemberCardNo, OrderId = orderId, SourceAccountId = SourceAccountId });
        }
        //
        // 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>()));
        }