/// <summary> /// 生成查询sql语句 /// </summary> private string GetSelectSql() { int i = 0; StringBuilder sb = new StringBuilder(); sb.Append(UserSystem.BinUserSelectSql("UserName", TB_UserName.Text.Trim(), ref i)); sb.Append(UserSystem.BinUserSelectSql("UserID", this.TB_LoginName.Text.Trim(), ref i)); sb.Append(UserSystem.BinUserSelectSql("stationNameHtml", this.txtUnitName.Value.Trim(), ref i)); sb.Append(UserSystem.BinUserSelectSql("Phone", this.TB_Tel.Text.Trim(), ref i)); sb.Append(UserSystem.BinUserSelectSql("Mobile", this.TB_Mtel.Text.Trim(), ref i)); sb.Append(UserSystem.BinUserSelectSql("MailBox", this.TB_Email.Text.Trim(), ref i)); sb.Append(UserSystem.BinUserSelectSql("SortID", this.TB_WorkCode.Text.Trim(), ref i)); if (sltIsAllow.SelectedValue == "2") { } else { if (i > 0) { sb.Append(" and "); } sb.Append("status = " + sltIsAllow.SelectedValue); } //Response.Write(sb.ToString()); return(sb.ToString()); }