Пример #1
0
 protected void btnClear_Click(object sender, EventArgs e)
 {
     HZ.DataSource = null;
     HZ.DataBind();
     HZ.Visible    = false;
     field.Visible = false;
     mx.Visible    = false;
 }
Пример #2
0
    protected void btnTongji_Click(object sender, EventArgs e)
    {
        IList <BillDetail> result = TheBillMgr.LoadBill(this.BillNo, true).BillDetails;
        var gp = (from i in result group i by new { i.ActingBill.Item.Code, i.ActingBill.ReferenceItemCode, i.ActingBill.Item.Description } into g select new { g.Key.Code, g.Key.ReferenceItemCode, g.Key.Description, Amount = g.Sum(i => i.BilledQty) }).ToList();

        HZ.DataSource = gp;
        HZ.DataBind();
        HZ.Visible            = true;
        field.Visible         = true;
        mx.Visible            = true;
        tbshowTotal.Text      = "零件总数:" + gp.Sum(i => i.Amount).ToString("0");
        itemInList.DataSource = gp.Select(i => i.Code);
        itemInList.DataBind();
        itemMX.Visible     = false;
        btnClearMX.Visible = false;
    }