Exemple #1
0
        //合台合并支付
        protected void btnMontage_Click(object sender, EventArgs e)
        {
            string[]   id  = Hiddenid.Text.TrimEnd(',').Split(',');
            List <int> ids = new List <int>();

            foreach (string z in id)
            {
                tm_Tabie tm_Tabie = Core.Container.Instance.Resolve <IServiceTabie>().GetEntity(Int32.Parse(z));
                //判断餐台状态是否未就餐中
                if (tm_Tabie.TabieState < 4)
                {
                    Alert.ShowInTop("未就餐的餐台不能进行合台付款!", "错误操作", MessageBoxIcon.Error);
                    return;
                }
                else
                {
                    ids.Add(tm_Tabie.ID);
                }
            }
            if (ids.Count > 1)
            {
                //创建合并付款编号
                string MergeNO = string.Format("XSHT{0}", DateTime.Now.ToString("yyyyMMddHHmmss"));
                foreach (int u in ids)
                {
                    //获取餐台信息
                    tm_Tabie tabieInfo = Core.Container.Instance.Resolve <IServiceTabie>().GetEntity(u);
                    //获取餐台当前就餐信息
                    if (tabieInfo.CurrentUsingID > 0)
                    {
                        //更新就餐信息的合并付款编号信息
                        tm_TabieUsingInfo tabieUsingInfo = Core.Container.Instance.Resolve <IServiceTabieUsingInfo>().GetEntity(tabieInfo.CurrentUsingID);
                        tabieUsingInfo.MergeNO = MergeNO;
                        Core.Container.Instance.Resolve <IServiceTabieUsingInfo>().Update(tabieUsingInfo);
                    }
                }
                //跳转到合并付款页面
                PageContext.RegisterStartupScript(WindowPay.GetShowReference("~/Dinner/DMergePay.aspx?id=" + MergeNO, "合台付款"));
            }
            else
            {
                Alert.ShowInTop("至少选择两个未结算的餐台进行合台!", "错误操作", MessageBoxIcon.Error);
            }
        }
Exemple #2
0
        /// <summary>
        /// 加载就餐相关信息
        /// </summary>
        private void LoadData()
        {
            //权限检查
            CheckPowerWithButton("CoreCateringView", btnNew);

            tm_TabieUsingInfo Usingentity = Core.Container.Instance.Resolve <IServiceTabieUsingInfo>().GetEntity(TabieUsingID);

            //绑定开台时间
            dltStart.Text = Usingentity.OpenTime.ToString();
            //绑定团购信息
            ddlGroup.SelectedValue = Usingentity.GroupMoneys.ToString();
            tbGroup.Text           = Usingentity.GroupCardNO;

            tbxPeople.Text = Usingentity.Population.ToString();
            tbxVipID.Text  = Usingentity.VipID;
            tm_Tabie entity = Core.Container.Instance.Resolve <IServiceTabie>().GetEntity(TabieID);

            groupTabie.Title              = string.Format("{0}区{1}【消费单号:{2}】", entity.Diningarea_Tabie.AreaName, entity.TabieName, Usingentity.OrderNO);
            btnPay.OnClientClick          = WindowPay.GetShowReference("~/Dinner/DPay.aspx?id=" + TabieUsingID + "&TabieId=" + TabieID, "付款");
            Grid1.PageSize                = ConfigHelper.PageSize;
            ddlGridPageSize.SelectedValue = ConfigHelper.PageSize.ToString();
            //绑定就餐点餐信息
            BindTabieDishesInfo();
        }