Ejemplo n.º 1
0
        public async Task <JsonResult> GetData(string Name, string Sex, string Style, string FirstLetter, string Country)
        {
            var exp = ExpressionHelper.True <Singer>();

            if (!string.IsNullOrEmpty(Name))
            {
                exp = exp.And(p => p.Name == Name);
            }
            if (!string.IsNullOrEmpty(Sex))
            {
                exp = exp.And(p => p.Sex == Sex);
            }
            if (!string.IsNullOrEmpty(Style))
            {
                exp = exp.And(p => p.Style == Style);
            }
            if (!string.IsNullOrEmpty(FirstLetter))
            {
                exp = exp.And(p => p.FirstLetter == FirstLetter);
            }
            if (!string.IsNullOrEmpty(Country))
            {
                exp = exp.And(p => p.Country == Country);
            }
            var list = await singerBLL.GetFiltersAsync(exp);

            return(Json(list, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 2
0
        public async Task <JsonResult> GetData(string Name, string Style)
        {
            var exp = ExpressionHelper.True <Note>();

            if (!string.IsNullOrEmpty(Name))
            {
                exp = exp.And(p => p.Name == Name);
            }
            if (!string.IsNullOrEmpty(Style))
            {
                exp = exp.And(p => p.Style == Style);
            }
            var list = (await noteBLL.GetFiltersAsync(exp));

            return(Json(list, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 3
0
        public async Task <JsonResult> GetData(string ChatName, string Password)
        {
            var exp = ExpressionHelper.True <ChatUser>();

            if (!string.IsNullOrEmpty(ChatName))
            {
                exp = exp.And(p => p.ChatName == ChatName);
            }
            if (!string.IsNullOrEmpty(Password))
            {
                exp = exp.And(p => p.Password == Password);
            }
            var list = (await chatUserBLL.GetFiltersAsync(exp));

            return(Json(list, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 4
0
        public async Task <JsonResult> GetData(string Name, string Style, DateTime?StartDate, DateTime?EndDate)
        {
            var exp = ExpressionHelper.True <Note>();

            if (!string.IsNullOrEmpty(Name))
            {
                exp = exp.And(p => p.Name == Name);
            }
            if (!string.IsNullOrEmpty(Style))
            {
                exp = exp.And(p => p.Style == Style);
            }
            if (StartDate != null)
            {
                exp = exp.And(p => DateTime.Compare(p.CreateTime ?? DateTime.Now, StartDate ?? DateTime.Now) >= 0);
            }
            if (EndDate != null)
            {
                exp = exp.And(p => DateTime.Compare(p.CreateTime ?? DateTime.Now, EndDate ?? DateTime.Now) <= 0);
            }
            var list = (await noteBLL.GetFiltersAsync(exp)).Where(e => e.User_Id == 1);

            return(Json(list, JsonRequestBehavior.AllowGet));
        }