Exemplo n.º 1
0
        /// <summary>
        /// 删除订单
        /// </summary>
        /// <param name="context"></param>
        public void DelOrder(HttpContext context)
        {
            var    uid  = context.Request["uid"];
            var    onum = context.Request["onum"].ToString();
            string sql  = $"select type from orders where uid='{uid}' and orderNum='{onum}'";

            if (SqlHelper.ExScalar(sql).ToString() != "已完成")
            {
                context.Response.Write("100");
                return;
            }
            if (bll.DeleteOrder(uid, onum) > 0)
            {
                context.Response.Write("200");
            }
            else
            {
                context.Response.Write("500");
            }
        }