Exemplo n.º 1
0
        //[RequireHttps]
        public HttpResponseMessage getme(SearchCondition model)
        {
            int em = 0;

            DAL.Implement.MemberDal.SearchCondition sc = new MemberDal.SearchCondition();
            sc.address    = model.address;
            sc.aftersales = model.aftersales;
            sc.city       = model.city;
            sc.classx     = model.classx;
            sc.country    = model.country;
            sc.field      = model.field;
            sc.flag       = model.flag;
            sc.keyword    = model.keyword;
            sc.memo       = model.memo;
            sc.province   = model.province;
            sc.size       = model.size < 30 ? model.size : 30;
            sc.start      = model.start;
            sc.tracktype  = model.tracktype;
            string str = "[]";

            if (ValidateSign(model.keyword, model.flag, model.field, Convert.ToDateTime(model.timestamp), model.sign))
            {
                str = _dal.GetList(sc, out em).Replace("\r", string.Empty).Replace("\n", string.Empty);
            }
            //string str = _dal.GetList(sc, out em);
            HttpResponseMessage result = new HttpResponseMessage {
                Content = new StringContent(str, Encoding.GetEncoding("UTF-8"), "application/json")
            };

            return(result);
        }
Exemplo n.º 2
0
 public IEnumerable <Member> GetList(Expression <Func <Member, bool> > condition = null)
 {
     return(_memberDal.GetList(condition));
 }
Exemplo n.º 3
0
 /// <summary>
 /// 根据关键字和分页条件查询
 /// </summary>
 /// <param name="keyword"></param>
 /// <param name="start"></param>
 /// <param name="size"></param>
 /// <returns></returns>
 public List <Member> GetList(string keyword, int start, int size)
 {
     return(_dal.GetList(keyword, start, size));
 }
Exemplo n.º 4
0
 public List <Member> GetMembers()
 {
     return(MapperHelper.MapToSameType(_memberDal.GetList()));
 }