public virtual int Fill(CloudAccountDA.ReportTimesheetDataTable dataTable, int?CompanyID, int?Month, int?Year, string EntryFor)
 {
     this.Adapter.SelectCommand = this.CommandCollection[0];
     if (CompanyID.HasValue)
     {
         this.Adapter.SelectCommand.Parameters[1].Value = CompanyID.Value;
     }
     else
     {
         this.Adapter.SelectCommand.Parameters[1].Value = DBNull.Value;
     }
     if (Month.HasValue)
     {
         this.Adapter.SelectCommand.Parameters[2].Value = Month.Value;
     }
     else
     {
         this.Adapter.SelectCommand.Parameters[2].Value = DBNull.Value;
     }
     if (Year.HasValue)
     {
         this.Adapter.SelectCommand.Parameters[3].Value = Year.Value;
     }
     else
     {
         this.Adapter.SelectCommand.Parameters[3].Value = DBNull.Value;
     }
     if (EntryFor == null)
     {
         this.Adapter.SelectCommand.Parameters[4].Value = DBNull.Value;
     }
     else
     {
         this.Adapter.SelectCommand.Parameters[4].Value = EntryFor;
     }
     if (this.ClearBeforeFill)
     {
         dataTable.Clear();
     }
     return(this.Adapter.Fill(dataTable));
 }
 private void BindGrid()
 {
     if (this.ddlTeam.SelectedIndex > 0)
     {
         string sEntryFor = (string)null;
         if (this.ddlTeam.SelectedIndex > 0)
         {
             sEntryFor = this.ddlTeam.SelectedItem.Value;
         }
         this.objReportTimesheetDT = this.objReportTimesheetBll.GetData(int.Parse(this.hfCompanyID.Value), int.Parse(this.ddlMonth.SelectedItem.Value), int.Parse(this.ddlYear.SelectedItem.Text), sEntryFor);
         Label label = new Label()
         {
             Text = "Hours for " + this.ddlTeam.SelectedItem.Text + " : " + this.lblInfo.Text
         };
         label.Font.Bold = true;
         label.Attributes.Add("style", "float: right;");
         this.divGrids.Controls.Add((Control)label);
         this.divGrids.Controls.Add((Control) new LiteralControl("<br />"));
         GridView gridView1 = new GridView();
         gridView1.DataSource    = (object)this.objReportTimesheetDT;
         gridView1.CssClass      = "reportTable table table-responsive";
         gridView1.Width         = Unit.Percentage(100.0);
         gridView1.GridLines     = GridLines.None;
         gridView1.EmptyDataText = "No Timesheet entry found";
         GridView gridView2 = gridView1;
         gridView2.HeaderStyle.BackColor = ColorTranslator.FromHtml("#0083E0");
         gridView2.HeaderStyle.ForeColor = Color.White;
         gridView2.DataBind();
         this.divGrids.Controls.Add((Control)gridView2);
         this.divGrids.Controls.Add((Control) new LiteralControl("<br />"));
     }
     else
     {
         this.ddlTeam.DataBind();
         foreach (ListItem listItem in this.ddlTeam.Items)
         {
             if (!string.IsNullOrEmpty(listItem.Value))
             {
                 this.objReportTimesheetDT = this.objReportTimesheetBll.GetData(int.Parse(this.hfCompanyID.Value), int.Parse(this.ddlMonth.SelectedItem.Value), int.Parse(this.ddlYear.SelectedItem.Text), listItem.Value);
                 Label label = new Label()
                 {
                     Text = "Hours for " + listItem.Text + " : " + this.lblInfo.Text
                 };
                 label.Font.Bold = true;
                 label.Attributes.Add("style", "float: right;");
                 this.divGrids.Controls.Add((Control)label);
                 this.divGrids.Controls.Add((Control) new LiteralControl("<br />"));
                 GridView gridView1 = new GridView();
                 gridView1.DataSource    = (object)this.objReportTimesheetDT;
                 gridView1.CssClass      = "reportTable table table-responsive";
                 gridView1.Width         = Unit.Percentage(100.0);
                 gridView1.GridLines     = GridLines.None;
                 gridView1.EmptyDataText = "No Timesheet entry found";
                 GridView gridView2 = gridView1;
                 gridView2.HeaderStyle.BackColor = ColorTranslator.FromHtml("#0083E0");
                 gridView2.HeaderStyle.ForeColor = Color.White;
                 gridView2.DataBind();
                 this.divGrids.Controls.Add((Control)gridView2);
                 this.divGrids.Controls.Add((Control) new LiteralControl("<br />"));
             }
         }
     }
 }