private void BindGrid()
    {
        string id = string.Format("Id: {0} Uri: {1}", Guid.NewGuid(), HttpContext.Current.Request.Url);

        using (Utils utility = new Utils())
        {
            utility.MethodStart(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
        try
        {
            ArrayList obj = new ArrayList();
            if (txtFromDate.Text == "" && txtToDate.Text == "")
            {
                obj.Add(DateTime.Today.ToShortDateString());
                obj.Add(DateTime.Today.ToShortDateString());
            }
            else
            {
                obj.Add(txtFromDate.Text);
                obj.Add(txtToDate.Text);
            }

            obj.Add(txtCompanyID.Text);
            if (extddlVisitRoom.Text != "NA" && extddlVisitRoom.Text != "")
            {
                obj.Add(extddlVisitRoom.Text);
            }
            else
            {
                obj.Add("");
            }



            //Code to send location id to stoared procedure
            if (extddlLocation.Visible == true && extddlLocation.Text != "" && extddlLocation.Text != "NA")
            {
                obj.Add(extddlLocation.Text);
            }



            //end of code
            _bill_Sys_Calender           = new Bill_Sys_Calender();
            grdScheduleReport.DataSource = _bill_Sys_Calender.GET_Schedule_Visits(obj);
            grdScheduleReport.DataBind();

            grdForReport.DataSource = _bill_Sys_Calender.GET_Schedule_Visits(obj);
            grdForReport.DataBind();
        }
        catch (Exception ex)
        {
            Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
            using (Utils utility = new Utils())
            {
                utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
            }
            string str2 = "Error Request=" + id + ".Please share with Technical support.";
            base.Response.Redirect("Bill_Sys_ErrorPage.aspx?ErrMsg=" + str2);
        }
        //Method End
        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }