Ejemplo n.º 1
0
        public IEnumerable <jmp_province> FindPagedList(int userid, string orderBy, string stime, string etime, string a_name)
        {
            var where = new List <string>();
            if (!string.IsNullOrEmpty(stime))
            {
                where.Add("convert(varchar(10),a.p_time,120)>='" + stime + "' ");
            }
            if (!string.IsNullOrEmpty(etime))
            {
                where.Add(" convert(varchar(10),a.p_time,120)<='" + etime + "' ");
            }
            if (a_name != "所有应用")
            {
                where.Add("b.a_name ='" + a_name + "'");
            }
            where.Add("c.relation_type=" + (int)Relationtype.Agent + "");
            where.Add("c.relation_person_id='" + userid + "'");

            return(_repository.FindListBySql(string.Join(" AND ", where), ""));
        }