public bool Order(TableInfo ti, OrderInfo oi, List <OrderDetailInfo> odis)
 {
     if (ti.TIsFree)//如果餐桌是空闲状态
     {
         return(odDal.Insert(oi, odis) > 0);
     }
     else
     {
         return(true);
     }
 }
Beispiel #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="docid">报刊id</param>
        /// <param name="orderpeopleid">订户id</param>
        /// <param name="ordernum">订购数</param>
        /// <param name="ordermonths">订购多少月</param>
        /// <param name="orderDate">订购起始日期</param>
        /// <param name="inuser">录入员</param>
        /// <param name="posterid">投递员,相当于收订人</param>
        /// <returns></returns>
        public retValue Insert(SqlTransaction tran, string BKDH, int orderpeopleid, int ordernum, int ordermonths, string orderDate, string inuser, int posterid, decimal FullPrice = 0)
        {
            retValue ret = new retValue();
            string   res = dal.Insert(BKDH, orderpeopleid, ordernum, ordermonths, orderDate, inuser, posterid, tran, FullPrice);

            if (string.IsNullOrEmpty(res))
            {
                ret.result = true;
                ret.data   = "保存成功";
            }
            else
            {
                ret.result = false;
                ret.reason = res;
            }
            return(ret);
        }