public void ProcessRequest(HttpContext context) { string result = "{{\"msg\":\"{0}\",\"result\":\"{1}\"}}"; CommConfig config = CommConfig.GetConfig(); string name = WebHelper.GetString("name"); AdminInfo admin = Admins.Instance.GetAdminByName(name); if (admin != null && admin.ID != WebHelper.GetInt("id")) { HttpContext.Current.Response.Write(string.Format(result, "用户名已使用", "error")); } else { HttpContext.Current.Response.Write(string.Format(result, "用户名通过验证", "success")); } WebHelper.SetNotCache(); }
public void ProcessRequest(HttpContext context) { string result = "{{\"msg\":\"{0}\",\"result\":\"{1}\",\"isdel\":\"{2}\",\"id\":\"{3}\"}}"; CommConfig config = CommConfig.GetConfig(); string phone = WebHelper.GetString("phone"); int corpid = WebHelper.GetInt("corpid"); CustomerInfo customer = Customers.Instance.GetCustomerByPhone(phone, corpid); if (customer != null) { HttpContext.Current.Response.Write(string.Format(result, "该客户电话已经存在", "error", customer.DelState, customer.ID)); } else { HttpContext.Current.Response.Write(string.Format(result, "该客户电话通过验证", "success", string.Empty, string.Empty)); } WebHelper.SetNotCache(); }