public async Task <dynamic> GetDSPDs_P(int ps, int pi, int?DSID, int Status, string Depot) { Pager_V_DS_P_PT.PageSize = ps; Pager_V_DS_P_PT.PageIndex = pi; Pager_V_DS_P_PT.IsAsc = true; Pager_V_DS_P_PT.WhereLambda = a => (DSID != null ? a.DSID == DSID : true) && (Depot != "-1" ? a.DepotID == Depot : true) && (Status != -1 ? (Status == 1 ? a.DSAmount >= a.ProMax : Status == 2 ? a.DSAmount <= a.ProMin : Status == 0 ? a.DSAmount <a.ProMax && a.DSAmount> a.ProMin : true) : true); Pager_V_DS_P_PT.OrderByLambda = a => a.DSID; var set = await Pager_V_DS_P_PT.Paging().ConfigureAwait(false); return(new Dictionary <string, dynamic>() { { "data", set }, { "total", Pager_V_DS_P_PT.Count } }); }
public async Task <dynamic> GetDS_P_Ds(int ps, int pi) { Pager_V_DS_P_PT.PageSize = ps; Pager_V_DS_P_PT.PageIndex = pi; Pager_V_DS_P_PT.IsAsc = true; Pager_V_DS_P_PT.WhereLambda = a => true; Pager_V_DS_P_PT.OrderByLambda = a => a.DSID; var set = await Pager_V_DS_P_PT.Paging().ConfigureAwait(false); return(new Dictionary <string, dynamic>() { { "data", set }, { "total", Pager_V_DS_P_PT.Count } }); }