protected void btnactivity_Click(object sender, EventArgs e)
    {
        whitfield_reports _wc = new whitfield_reports();
                Boolean IsInsertSuccess = false;
                IsInsertSuccess = _wc.ManageReportMain(txtReportDate.Text.Trim(),
                                               Convert.ToInt32(ViewState["twc_project_number"].ToString()),
                                               txtRptNotes.Text.Trim(),
                                               txtRptIssues.Text.Trim(),
                                               txtRptChangeOrderNotes.Text.Trim(),
                                               chkActive.SelectedItem.Value.Trim(), Request.Cookies["UserId"].Value);
                if (IsInsertSuccess)
                {
                    if (ddlworkorders.SelectedItem.Value != "0")
                    {
                        IsInsertSuccess = _wc.ManageReportActivityMain(_wc.GetReportNumber(Convert.ToInt32(ViewState["twc_project_number"].ToString()), txtReportDate.Text.Trim()),ViewState["twc_project_number"].ToString(),
                                                                                            ddlworkorders.SelectedItem.Value,
                                                                                            txtHours.Text.Trim(),
                                                                                            txtActComments.Text.Trim(), Request.Cookies["UserId"].Value);
                    }

                    if (ddlEmplType.SelectedItem.Value != "0")
                    {
                        Boolean isManPowerInsert = _wc.ManageManpower(_wc.GetReportNumber(Convert.ToInt32(ViewState["twc_project_number"].ToString()), txtReportDate.Text.Trim()),
                                                                        Convert.ToInt32(ddlEmplType.SelectedItem.Value),
                                                                        txtManHours.Text.Trim(),
                                                                       0);
                    }
                }

                DisplayReportGrid();
                DisplayManPowerGrid();
                DisplayHistoryGrid();
    }