public void GetUsersList(HttpContext context) { UsersBLL usersbll = new UsersBLL(); List <UsersBackups> list = new List <UsersBackups>(); string LoginName = context.Request.QueryString["LoginName"]; string UsersName = context.Request.QueryString["UsersName"]; string Mobiles = context.Request.QueryString["Mobiles"]; string Where = " u.RecordIsDelete=0 "; DepartmentInfo df = new DepartmentInfo(); DepartmentInfoBLL bll = new DepartmentInfoBLL(); df = bll.GetModel(ComPage.CurrentAdmin.DepartmentID); if (ComPage.CurrentAdmin.UserType != 1) { if ((df == null) || (df != null && df.IsReceiveBusiness != false)) { Where += " AND u.UserID IN(select ID from [dbo].[GetDepartmentChildren](" + ComPage.CurrentAdmin.UserID + "))"; } } if (!string.IsNullOrEmpty(LoginName)) { Where += " AND LoginName like'%" + LoginName + "%' "; } if (!string.IsNullOrEmpty(Mobiles)) { Where += " AND phone like'%" + Mobiles + "%' "; } if (!string.IsNullOrEmpty(UsersName)) { Where += " AND UserName like'%" + UsersName + "%' "; } //if (!string.IsNullOrEmpty(UsersData) && UsersData != "") //{ // Where += " AND (LoginName like'" + UsersData + "%' or phone like'" + UsersData + "%' or UserName like '" + UsersData + "%') "; //} list = usersbll.GetModelListName(Where); var b = SerializerHelper.SerializeObject(new { data = list }); context.Response.Write(b); }