void BindDepositRequests()
    {
        lblMsg.InnerText = "";
        if (txtdate.Text == "")
        {
            txtdate.Text = "1/1/1900";
        }
        if (txtrefno.Text == "")
        {
            txtrefno.Text = "1/1/1900";
        }
        //if(ddlagentname.SelectedItem.Text == "Please Select")
        //{
        //    ddlagentname.SelectedItem.Text = "";
        //}

        ClsBAL obj = new ClsBAL();
        obj.FromDate = Convert.ToDateTime(txtdate.Text);
        obj.ToDate = Convert.ToDateTime(txtrefno.Text);
        obj.createdBy = Convert.ToInt32(Session["UserID"]);
        // obj.type = ddldeposittype.SelectedItem.Text;
        DataSet ds = obj.getdmrbyid();
        if (ds != null)
        {
            if (ds.Tables.Count > 0)
            {
                if (ds.Tables[0].Rows.Count > 0)
                {
                    gvDeposits.DataSource = ds;
                    gvDeposits.DataBind();
                    ViewState["gv"] = ds;
                    trpaging.Visible = true;
                    lblerrormsg.Visible = false;
                    gvDeposits.Visible = true;
                    //btnUpdateStatus.Visible = true;
                }
                else
                {
                    // btnUpdateStatus.Visible = false;
                    trpaging.Visible = false;
                    lblerrormsg.Text = "No Data Found";
                    lblerrormsg.ForeColor = System.Drawing.Color.Red;
                    lblerrormsg.Visible = true;
                    gvDeposits.Visible = false;
                }
            }
            else
            {
                // btnUpdateStatus.Visible = false;
                trpaging.Visible = false;
                lblerrormsg.Text = "No Data Found";
                lblerrormsg.ForeColor = System.Drawing.Color.Red;
                lblerrormsg.Visible = true;
                gvDeposits.Visible = false;
            }
        }
        else
        {
            //btnUpdateStatus.Visible = false;
            trpaging.Visible = false;
            lblerrormsg.Text = "No Data Found";
            lblerrormsg.ForeColor = System.Drawing.Color.Red;
            lblerrormsg.Visible = true;
            gvDeposits.Visible = false;
        }
        if (txtdate.Text == "1/1/1900")
        {
            txtdate.Text = "";
        }
        if (txtrefno.Text == "1/1/1900")
        {
            txtrefno.Text = "";
        }
        //if (ddlagentname.SelectedItem.Text == "")
        //{
        //    ddlagentname.SelectedItem.Text = "Please Select";
        //}
    }