using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using xabaraCOM;

public partial class webXabara_user_del : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        admin a = new admin();
        sqlServer sql = new sqlServer();
        javasrcipt js = new javasrcipt();
        a.check("|userDel|");

        string userCardID = Request.QueryString["id"].ToString();
        DataTable dt;
        dt = sql.getDataTable("select top 1 * from moneyDetail where subtractMoney>0 and uID='" + userCardID + "'");
        if (dt.Rows.Count > 0)
        {
            js.div(false, "信息关联", "text", "当前用户有消费记录，请勿删除！", 350, 150, Server.UrlDecode(url.currently), "goto");
        }
        else
        {
            string returnValue = sql.del("XabaraUser", "userCardID", xabara.safeSql(Request.QueryString["id"].Trim()).ToString(), string.Empty, false, "userImg");
            sql.log(a.uid, "admin", "删除用户：" + userCardID);
            js.div(false, "", "text", returnValue, 350, 150, Server.UrlDecode(url.before), "goto");
        }
        dt.Dispose();
    }
}