Esempio n. 1
0
        /// <summary>
        /// Handles the Click event of the btnOK control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        /// 创建人:桂书丛
        /// 创建日期:2013-02-27
        private void btnOK_Click(object sender, EventArgs e)
        {
            ModelCMS_ConsumptionReg tempCMS_ConsumptionReg = AddBuffetsRegInfo();

            if (tempCMS_ConsumptionReg == null)
            {
                XtraMessageBox.Show("开台失败,请确定信息输入正确", "抱歉!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;
            }
            if (ClassAssist.BuffetOperator.UpdateBuffetInfo(this.BuffetControl, VariedEnum.BuffetStatus.占用, this.MarkID))
            {
                BUT_SysLog.InsertSysLog(VariedEnum.LogType.数据操作, frmAssist.frmLogin.SysUser.UserID, "新开餐台:" + myModelCMS_Buffets.Name);
                this.Close();
            }
            if (this.chkAuto.Checked == false)
            {
                return;
            }
            frmDineRegister myfrmDineRegister = new frmDineRegister(this.BuffetControl, tempCMS_ConsumptionReg);

            myfrmDineRegister.ShowDialog();
        }
Esempio n. 2
0
 /// <summary>
 /// 获得消费详细信息
 /// </summary>
 /// <param name="paramMarkID"></param>
 private void GetConsumptionInfo(string paramMarkID)
 {
     try
     {
         DataTable tempDataTable = new BUCMS_ConsumptionDish().GetOrder(true, "MarkID", paramMarkID, false);
         if (tempDataTable.Rows[0]["菜品编号"].ToString() == string.Empty)
         {
             if (XtraMessageBox.Show("当前餐台暂未消费任何项,是否先增加消费", "是否要增加消费后再结账?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
             {
                 frmDineRegister myfrmDineRegister = new frmDineRegister(this.BuffetControl);
                 myfrmDineRegister.Owner = this;
                 myfrmDineRegister.Show();
                 this.IsShown = false;
             }
         }
         this.gridControlItem.DataSource = tempDataTable;
         GetConsumptionRegModel(tempDataTable);
         FillConsumptionRegModelInfo();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }