private string StrWhere(AgentIntentionSearch condition) { string where = string.Empty; if (!string.IsNullOrWhiteSpace(condition.keyword)) { where += string.Format(" and (a.Name like '%{0}%' or a.Phone like '%{0}%')", condition.keyword); } return(where); }
private ActionResult GetMy_yixiangs(AgentIntentionSearch condition, string where) { PageJsonModel <AgentIntention> page = new PageJsonModel <AgentIntention>(); page.pageIndex = condition.pageIndex; page.pageSize = condition.pageSize; page.strForm = string.Format(@" AgentIntention "); page.strSelect = " * "; page.strWhere = where; page.strOrder = "ID desc"; page.LoadList(); return(Json(page.pageResponse, JsonRequestBehavior.AllowGet)); }
public ActionResult LoadMy_yixiang(AgentIntentionSearch condition) { string where = string.Empty; if (!string.IsNullOrWhiteSpace(condition.keyword)) { where += string.Format(" and (Name like '%{0}%' or Phone like '%{0}%')", condition.keyword); } where += string.Format(" and ChiefUser='******' ", CurrentUser.UserName); return(GetMy_yixiangs(condition, where)); }
public ActionResult GetPage(AgentIntentionSearch condition) { string where = StrWhere(condition); PageJsonModel <AgentIntention> page = new PageJsonModel <AgentIntention>(); page.pageIndex = condition.pageIndex; page.pageSize = condition.pageSize; page.strForm = " AgentIntention a left join C_User us on a.ChiefUser=us.UserName "; page.strSelect = " a.*,us.Name ChiefUser_Name "; page.strWhere = where; page.strOrder = " a.ID desc"; page.LoadList(); return(Json(page.pageResponse, JsonRequestBehavior.AllowGet)); }