Exemplo n.º 1
0
        //[RequireHttps]
        public HttpResponseMessage getCount(SearchCondition model)
        {
            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.tracktype  = model.tracktype;
            int str = 0;

            if (ValidateSign(model.keyword, model.flag, model.field, Convert.ToDateTime(model.timestamp), model.sign))
            {
                str = _dal.GetCount(sc);
            }
            //int str = _dal.GetCount(sc);
            HttpResponseMessage result = new HttpResponseMessage {
                Content = new StringContent(str.ToString(), Encoding.GetEncoding("UTF-8"), "application/json")
            };

            return(result);
        }
Exemplo n.º 2
0
 /// <summary>
 /// 通过关键字获取总数
 /// </summary>
 /// <param name="keyword"></param>
 /// <returns></returns>
 public int GetCount(string keyword)
 {
     return(_dal.GetCount(keyword));
 }