Beispiel #1
0
        /// <summary>
        /// 通过RoomId删除房间
        /// </summary>
        public int DeleteRoomInfoByRoomId(int id)
        {
            var sql = "update RoomInfo set Delflag=1 where RoomId=" + id;

            return(SqliteHelper.ExecuteNonQuery(sql));
        }
Beispiel #2
0
        /// <summary>
        /// 添加一个中间表的数据
        /// </summary>
        public int AddROrderDesk(R_Order_Desk rod)
        {
            var sql = "insert into R_Order_Desk(OrderId,DeskId) values(@OrderId,@DeskId)";

            return(SqliteHelper.ExecuteNonQuery(sql, new SQLiteParameter("@OrderId", rod.OrderId), new SQLiteParameter("@DeskId", rod.DeskId)));
        }
Beispiel #3
0
        /// <summary>
        /// 删除该房间
        /// </summary>
        /// <param name="roomId"></param>
        /// <returns></returns>
        public int DeleteRoomById(int roomId)
        {
            string sql = "update RoomInfo set DelFlag=1 where RoomId=@RoomId";

            return(SqliteHelper.ExecuteNonQuery(sql, new SQLiteParameter("@RoomId", roomId)));
        }
Beispiel #4
0
        /// <summary>
        /// 通过OrderId保存订单总消费
        /// </summary>
        public int UpdateMoneyByOrderId(int orderId, int money)
        {
            var sql = "update OrderInfo set OrderMoney=@OrderMoney where OrderId=@OrderId";

            return(SqliteHelper.ExecuteNonQuery(sql, new SQLiteParameter("@OrderMoney", money), new SQLiteParameter("@OrderId", orderId)));
        }
Beispiel #5
0
        /// <summary>
        /// 更新订单表中的金额
        /// </summary>
        /// <param name="orderId">订单id</param>
        /// <returns></returns>
        public int UpdateOrderMoney(int orderId, decimal money)
        {
            string sql = "update OrderInfo set OrderMoney=@OrderMoney,BeginTime=SubTime where DelFlag=0 and OrderId=@OrderId";

            return(SqliteHelper.ExecuteNonQuery(sql, new SQLiteParameter("@OrderId", orderId), new SQLiteParameter("@OrderMoney", money)));
        }
Beispiel #6
0
        /// <summary>
        /// 退菜
        /// </summary>
        /// <param name="rOrderId"></param>
        /// <returns></returns>
        public int DeleteROrderProductById(int rOrderId)
        {
            var sql = "update R_OrderInfo_Product set DelFlag=1 where ROrderProId=@ROrderProId";

            return(SqliteHelper.ExecuteNonQuery(sql, new SQLiteParameter("@ROrderProId", rOrderId)));
        }