Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
        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));
        }
Ejemplo n.º 3
0
        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));
        }
Ejemplo n.º 4
0
        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));
        }