private void LoadLogs() { user.Name = txtSearch.Text.Trim(); user.Role = cboAccessLevel.SelectedValue.ToString(); user.FromDate = bll.ReturnDate(txtfromDate.Text.Trim(), 1); user.ToDate = bll.ReturnDate(txttoDate.Text.Trim(), 2); dataTable = datafile.GetLogs(user); DataGrid1.DataSource = dataTable; DataGrid1.DataBind(); }