/// <summary> /// 查询会员,分页 /// </summary> /// <param name="paras"></param> /// <returns></returns> public string QryAllAgent(Dictionary <string, object> paras, out int iCount) { WhereBuilder builder = new WhereBuilder(); builder.FromSql = "tbagent"; GridData grid = new GridData() { PageIndex = Convert.ToInt32(paras["pi"]), PageSize = Convert.ToInt32(paras["pageSize"]), SortField = paras["sort"].ToString() }; builder.AddWhereAndParameter(paras, "agent_AN", "agent_AN", "LIKE", "'%'+@agent_AN+'%'"); builder.AddWhereAndParameter(paras, "agent_mp"); builder.AddWhereAndParameter(paras, "agent_email", "agent_email", "LIKE", "'%'+@agent_email+'%'"); builder.AddWhereAndParameter(paras, "status_id"); var s = SortAndPage(builder, grid, out iCount); string retData = JsonConvert.SerializeObject(new { total = iCount, rows = s }); return(retData); }
/// <summary> /// 作者:梁钧淋 /// 创建时间:2019-5-23 /// 修改时间:2019- /// 功能:查询日期内的记录 /// </summary> public string QryDayExamineForm(Dictionary <string, object> paras, out int iCount) { WhereBuilder builder = new WhereBuilder(); builder.FromSql = "tbrecharge"; GridData grid = new GridData() { PageIndex = Convert.ToInt32(paras["pi"]), PageSize = Convert.ToInt32(paras["pageSize"]), SortField = paras["sort"].ToString(), SortDirection = paras["order"].ToString() }; builder.AddWhereAndParameter(paras, "day", "convert(varchar(10),recharge_time, 120)", "like", "@day+'%'"); builder.AddWhereAndParameter(paras, "agent_AN"); builder.AddWhereAndParameter(paras, "vip_AN"); builder.AddWhereAndParameter(paras, "status_id"); var s = SortAndPage(builder, grid, out iCount); string retData = JsonConvert.SerializeObject(new { total = iCount, rows = s }); return(retData); }
public IEnumerable <T> QryUsers <T>(Dictionary <string, object> paras, out int iCount) { iCount = 0; WhereBuilder builder = new WhereBuilder(); builder.FromSql = "v_user_list"; GridData grid = new GridData() { PageIndex = Convert.ToInt32(paras["pi"]), PageSize = Convert.ToInt32(paras["pageSize"]), SortField = paras["sort"].ToString(), SortDirection = paras["order"].ToString() }; builder.AddWhereAndParameter(paras, "userAn", "UserAccountName", "LIKE", "'%'+@userAn+'%'"); //builder.AddWhereAndParameter(paras, "username", "RealName", "LIKE", "'%'+@username+'%'"); //builder.AddWhereAndParameter(paras, "IsAble"); //builder.AddWhereAndParameter(paras, "IfChangePwd"); //builder.AddWhereAndParameter(paras, "RoleID"); //builder.AddWhereAndParameter(paras, "adddatestart", "CreateTime", ">"); //builder.AddWhereAndParameter(paras, "adddateend", "CreateTime", "<"); return(SortAndPage <T>(builder, grid, out iCount)); }
public string QryDayForms(Dictionary <string, object> paras, out int iCount) { WhereBuilder builder = new WhereBuilder(); builder.FromSql = "v_order_list"; GridData grid = new GridData() { PageIndex = Convert.ToInt32(paras["pi"]), PageSize = Convert.ToInt32(paras["pageSize"]), SortField = paras["sort"].ToString(), SortDirection = paras["order"].ToString() }; int pageSize = Convert.ToInt32(paras["pageSize"]); int page = Convert.ToInt32(paras["pi"]); builder.AddWhereAndParameter(paras, "day", "convert(varchar(10),OrderDate, 120)"); builder.AddWhereAndParameter(paras, "agent_AN", "AgentAccountName", "LIKE", "'%'+@agent_AN+'%'"); builder.AddWhereAndParameter(paras, "VipAccountName", "LIKE", "'%'+@vip_AN+'%'"); var s = SortAndPage(builder, grid, out iCount); string retData = JsonConvert.SerializeObject(new { total = (int)Math.Ceiling((double)iCount / pageSize), rows = s, page = page }); return(retData); }
/// <summary> /// 查询所有的代理商商品 /// </summary> /// <param name="paras"></param> /// <returns></returns> public string QryAgoods(Dictionary <string, object> paras, out int iCount) { WhereBuilder builder = new WhereBuilder(); builder.FromSql = "tbAgoods a join tbgoods b on a.goods_id = b.id"; GridData grid = new GridData() { PageIndex = Convert.ToInt32(paras["pi"]), PageSize = Convert.ToInt32(paras["pageSize"]), SortField = paras["sort"].ToString(), SortDirection = paras["order"].ToString() }; builder.AddWhereAndParameter(paras, "goods_Name", "a.goods_Name", "LIKE", "'%'+@goods_Name+'%'"); builder.AddWhereAndParameter(paras, "agent_AN"); builder.AddWhereAndParameter(paras, "status_id"); builder.AddWhereAndParameter(paras, "type_id"); var s = SortAndPage(builder, grid, out iCount, "a.*,b.goods_intro,b.goods_pic"); string retData = JsonConvert.SerializeObject(new { total = iCount, rows = s }); return(retData); }