protected void Page_Load(object sender, EventArgs e)
    {
        Whitfield_Project _wc = new Whitfield_Project();
        whitfield_prod_reports _wr = new whitfield_prod_reports();
        NameValueCollection n = Request.QueryString;

        if (!Page.IsPostBack)
        {
            //Logic Here for the Project Daily Field Report
            if (n.HasKeys())
            {
                // 3
                // Get first key and value
                string k = n.GetKey(0);
                string v = n.Get(0);
                txtReportDate.Text = v;
            }
            else
            {
                txtReportDate.Text = _wr.GetCurrentDate().Trim();
            }
            bindcontrols();
            if (_wr.IsReportExists(txtReportDate.Text.Trim()))
            {
                DataSet _dsDailyRpt = _wr.GetReportForProject(txtReportDate.Text.Trim());
                //txtReportDate.Text = _wr.GetCurrentDate();
                DataTable dtUsr = _dsDailyRpt.Tables[0];
                String _chkStatus = "";
                foreach (DataRow dRow in dtUsr.Rows)
                {
                    //txtRptNotes.Text = dRow["Daily_notes"] == DBNull.Value ? "" : dRow["Daily_notes"].ToString();
                    txtRptIssues.Text = dRow["Daily_comments"] == DBNull.Value ? "" : dRow["Daily_comments"].ToString();
                    //txtRptChangeOrderNotes.Text = dRow["Change_order_notes"] == DBNull.Value ? "" : dRow["Change_order_notes"].ToString();
                    _chkStatus = dRow["is_locked"] == DBNull.Value ? "" : dRow["is_locked"].ToString();
                    if (_chkStatus.Trim() == "Y")
                    {
                        chkActive.SelectedIndex = chkActive.Items.IndexOf(chkActive.Items.FindByValue(_chkStatus));
                      //  btnWO.Visible = false;
                    }
                }

            }
            //Logic for Project Daily Field Report Ends.
        }
    }