zoukankan      html  css  js  c++  java
  • linq 查询

    linq 分组查询:var qs = CC_.GroupBy(x => new { x.customer_name,x.sales_account,x.customer_code }).Where(Items=>Items.Key.sales_account==sales);

    linq 拼接:

    var q = from n in CC_
    select n;
    if (keys=="none"&& keys1=="")
    {
    q = q.Where(p => p.sales_account==sales);
    }
    if (keys!="none"&& keys1=="")
    {
    q = q.Where(p => p.sales_account == sales && p.customer_code == keys);
    }
    q = q.Where(p => p.storefront == st);

    dataset 转 linq

    dataset ds1 =new dataset()

     var q=from n in ds1.Tables[0].AsEnumerable() select n;

     

    //var qs = CC_.GroupBy(x => new { x.customer_name, x.sales_account, x.customer_code }).Where(Items => Items.Key.sales_account == sales.ToLower())
    var q = from n in set.Tables[0].AsEnumerable() group n by new {code=n["customer_code"],name=n["customer_name"]};

  • 相关阅读:
    所有者权益
    金融工具
    或有事项
    股份支付
    借款费用
    Keycode对照表
    js(jQuery)获取时间搜集
    jQuery实现CheckBox全选、全不选
    JS 截取字符串函数
    jQuery mouseenter与mouseleave
  • 原文地址:https://www.cnblogs.com/peterdys/p/2849101.html
Copyright © 2011-2022 走看看