コード例 #1
0
        /// <summary>
        /// 添加一个中间表的数据
        /// </summary>
        /// <param name="rod"></param>
        /// <returns></returns>
        public int AddROrderDesk(ROrderDesk rod)
        {
            string 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)));
        }
コード例 #2
0
        //删除
        public int UpdateDesk(int id)
        {
            string sql = "update DeskInfo set DelFlag=1 where DeskId=@id";

            return(SqliteHelper.ExecuteNonQuery(sql, new SQLiteParameter("@id", id)));
        }
コード例 #3
0
        //删除会员
        /// <summary>
        /// 根据会员id删除该会员
        /// </summary>
        /// <param name="memmberId">会员id</param>
        /// <returns>软删除</returns>
        public int DeleteMemmber(int memmberId)
        {
            string sql = "update MemmberInfo set DelFlag=1 where MemmberId=@MemmberId";

            return(SqliteHelper.ExecuteNonQuery(sql, new SQLiteParameter("@MemmberId", memmberId)));
        }
コード例 #4
0
        /// <summary>
        /// 删除该房间下的所有餐桌
        /// </summary>
        /// <param name="RoomId"></param>
        /// <returns></returns>
        public int DeleteDeskInfo(int RoomId)
        {
            string sql = "update DeskInfo set DelFlag=1 where RoomId=@RoomId";

            return(SqliteHelper.ExecuteNonQuery(sql, new SQLiteParameter("@RoomId", RoomId)));
        }
コード例 #5
0
        //根据房间的id获取正在使用的餐桌
        public object GetDeskState(int roomId)
        {
            string sql = "select count(*) from DeskInfo where DelFlag=0 and DeskState=1 and RoomId=@RoomId";

            return(SqliteHelper.ExecuteScalar(sql, new SQLiteParameter("@RoomId", roomId)));
        }
コード例 #6
0
        //删除商品类别
        public int DeleteCategoryInfoByCatId(int catId)
        {
            string sql = "update CategoryInfo set DelFlag=1 where CatId=@CatId";

            return(SqliteHelper.ExecuteNonQuery(sql, new SQLiteParameter("@CatId", catId)));
        }
コード例 #7
0
        /// <summary>
        /// 删除当前选中的菜
        /// </summary>
        /// <param name="ROrderProId">中间表id</param>
        /// <returns></returns>
        public int DeleteROrderInfoProduct(int ROrderProId)
        {
            string sql = "update R_OrderInfo_Product set DelFlag=1 where ROrderProId=@ROrderProId";

            return(SqliteHelper.ExecuteNonQuery(sql, new SQLiteParameter("@ROrderProId", ROrderProId)));
        }
コード例 #8
0
        /// <summary>
        /// 根据Id删除商品信息
        /// </summary>
        /// <param name="catId"></param>
        /// <returns></returns>
        public int DeleteCategoryInfoById(int catId)
        {
            var sql = "update CategoryInfo set DelFlag=1 where CatId=" + catId;

            return(SqliteHelper.ExecuteNonQuery(sql));
        }
コード例 #9
0
        /// <summary>
        /// 通过会员级别查询级别名称
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        public object GetMemberTypeByType(int type)
        {
            var sql = "select MemTpName from MemmberType where MemType=" + type;

            return(SqliteHelper.ExecuteScalar(sql));
        }
コード例 #10
0
        /// <summary>
        /// 通过RoomId删除房间
        /// </summary>
        public int DeleteRoomInfoByRoomId(int id)
        {
            var sql = "update RoomInfo set Delflag=1 where RoomId=" + id;

            return(SqliteHelper.ExecuteNonQuery(sql));
        }
コード例 #11
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)));
        }
コード例 #12
0
        /// <summary>
        /// 通过OrderId查询订单金额
        /// </summary>
        /// <param name="orderId"></param>
        /// <returns></returns>
        public object GetMoneyByOrderId(int orderId)
        {
            var sql = "select OrderMoney from OrderInfo where DelFlag=0 and OrderId=" + orderId;

            return(SqliteHelper.ExecuteScalar(sql));
        }
コード例 #13
0
        /// <summary>
        /// 根据餐桌的id查询正在使用的订单的id
        /// </summary>
        /// <param name="deskId"></param>
        /// <returns></returns>
        public int GetOrderIdByDeskId(int deskId)
        {
            string sql = "select OrderInfo.OrderId from R_Order_Desk inner join OrderInfo on OrderInfo.OrderId=R_Order_Desk.OrderId where OrderState=1 and DeskId=@DeskId";

            return(Convert.ToInt32(SqliteHelper.ExecuteScalar(sql, new SQLiteParameter("@DeskId", deskId))));
        }
コード例 #14
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)));
        }