INF003
来源:互联网 发布:淘宝信用支付什么意思 编辑:程序博客网 时间:2024/06/04 18:15
public static List<vwINF003> GetList(INF003 b, int size, int pageIndex, string orderBy, Common.TabelSortTypeEnum asc_desc, SYS100 s)
{
using (ERPCon con = new ERPCon())
{
var list = from m in con.vwINF003
select m;
#region order by
//資料排序(小->大) + 經銷商代號(小->大)+據點(小->大)+員工代號(小->大)
if (!String.IsNullOrEmpty(orderBy))
list = list.AsQueryable().ERPOrderBy<vwINF003>(orderBy, asc_desc).ThenBy(p => p.sort_no).ThenBy(p => p.vend_no).ThenBy(p => p.branch_no).ThenBy(p => p.sale_no);
else
list = list.OrderBy(p => p.sort_no).ThenBy(p => p.vend_no).ThenBy(p => p.branch_no).ThenBy(p => p.sale_no);
{
using (ERPCon con = new ERPCon())
{
var list = from m in con.vwINF003
select m;
#region order by
//資料排序(小->大) + 經銷商代號(小->大)+據點(小->大)+員工代號(小->大)
if (!String.IsNullOrEmpty(orderBy))
list = list.AsQueryable().ERPOrderBy<vwINF003>(orderBy, asc_desc).ThenBy(p => p.sort_no).ThenBy(p => p.vend_no).ThenBy(p => p.branch_no).ThenBy(p => p.sale_no);
else
list = list.OrderBy(p => p.sort_no).ThenBy(p => p.vend_no).ThenBy(p => p.branch_no).ThenBy(p => p.sale_no);
#endregion
if (!String.IsNullOrEmpty(b.vend_no))
{
list = list.Where(p => p.vend_no.Contains(b.vend_no));
}
if (!String.IsNullOrEmpty(b.branch_no))
{
list = list.Where(p => p.branch_no.Contains(b.branch_no));
}
{
list = list.Where(p => p.vend_no.Contains(b.vend_no));
}
if (!String.IsNullOrEmpty(b.branch_no))
{
list = list.Where(p => p.branch_no.Contains(b.branch_no));
}
if (!String.IsNullOrEmpty(b.sale_name))
{
list = list.Where(p => p.sale_name.Contains(b.sale_name));
}
if (!string.IsNullOrEmpty(b._S_indateS))
{
list = list.Where(p => p.in_date.CompareTo(b._S_indateS.Replace("/", "")) >= 0);
}
if (!string.IsNullOrEmpty(b._S_indateE))
{
list = list.Where(p => p.in_date.CompareTo(b._S_indateE.Replace("/", "")) <= 0);
}
if (!string.IsNullOrEmpty(b._S_outdateS))
{
list = list.Where(p => p.out_date.CompareTo(b._S_outdateS.Replace("/", "")) >= 0);
}
if (!string.IsNullOrEmpty(b._S_outdateE))
{
list = list.Where(p => p.out_date.CompareTo(b._S_outdateE.Replace("/", "")) <= 0);
}
//查詢資料等級的過濾
list = CommonFunc.GetListFiltersByClass(list, s, "vwINF003");
{
list = list.Where(p => p.sale_name.Contains(b.sale_name));
}
if (!string.IsNullOrEmpty(b._S_indateS))
{
list = list.Where(p => p.in_date.CompareTo(b._S_indateS.Replace("/", "")) >= 0);
}
if (!string.IsNullOrEmpty(b._S_indateE))
{
list = list.Where(p => p.in_date.CompareTo(b._S_indateE.Replace("/", "")) <= 0);
}
if (!string.IsNullOrEmpty(b._S_outdateS))
{
list = list.Where(p => p.out_date.CompareTo(b._S_outdateS.Replace("/", "")) >= 0);
}
if (!string.IsNullOrEmpty(b._S_outdateE))
{
list = list.Where(p => p.out_date.CompareTo(b._S_outdateE.Replace("/", "")) <= 0);
}
//查詢資料等級的過濾
list = CommonFunc.GetListFiltersByClass(list, s, "vwINF003");
return list.Skip((pageIndex - 1) * size).Take(size).ToList();
}
}
0 0
- INF003
- 积攒的学习网站
- JS中的return的用法---笔记
- 使用js Math.random()函数生成n到m间的随机数字
- [error handle][java web]Spring MVC在类上使用@RequestMapping后对静态资源的访问问题
- cent os svn服务器搭建
- INF003
- MYSQL用法(十五) MySQL中FIND_IN_SET()用法
- Openstack - cinder与swift、glance的区别
- THU2015 fall 1-2 Company
- spark Compression codec com.hadoop.compression.lzo.LzoCodec not found
- 字符集与字符编码简介
- 【总结】10月训练赛第7场
- 仿美团下拉
- 最优程序