protected void DataBind() { ISalesManagerBLL objBLL = SalesManagerBLLFactory.CreateSalesManagerBLLObject(); gvShowReport.DataSource = objBLL.GenerateReportDateWise(Convert.ToDateTime(txtFrom.Text), Convert.ToDateTime(txtTo.Text)); gvShowReport.DataBind(); }
protected void btnSubmit_Click(object sender, EventArgs e) { ISalesManagerBLL objBLL = SalesManagerBLLFactory.CreateSalesManagerBLLObject(); gvShowReport.DataSource = objBLL.GenerateReportDateWise(Convert.ToDateTime(txtFrom.Text), Convert.ToDateTime(txtTo.Text)); gvShowReport.DataBind(); if (gvShowReport.Rows.Count == 0) { lblMessage.Text = "Report not found on selected date"; } }