예제 #1
0
 protected void btnRefresh_Click(object sender, EventArgs e)
 {
     gvwBilling.DataSource = BillingService.GetBillingData(
         Convert.ToInt32(ddlBranch.SelectedValue),
         Convert.ToInt32(ddlBillingType.SelectedValue),
         cblCustomerStatus.Items.Cast <ListItem>().Where(item => item.Selected).Select(item => Convert.ToInt32(item.Value)).ToArray(),
         cblMembershipType.Items.Cast <ListItem>().Where(item => item.Selected).Select(item => Convert.ToInt32(item.Value)).ToArray(),
         calFindDateFrom.SelectedDate.GetValueOrDefault(DateTime.Today),
         calFindDateTo.SelectedDate.GetValueOrDefault(DateTime.Today)).OrderBy(data => data.CustomerBarcode);
     gvwBilling.DataBind();
     foreach (GridViewRow gridRow in gvwBilling.Rows)
     {
         (gridRow.Cells[gridRow.Cells.Count - 1].Controls[1] as CheckBox).Checked = true;
     }
 }