protected void btnExport_Click(object sender, ImageClickEventArgs e)
    {
        DataSet ds = BLL_SCM_Report.SCMReportDetailsSearch(Convert.ToInt32(Request.QueryString["SCMID"]), TabSCM.ActiveTab.TabIndex, Convert.ToInt32(Request.QueryString["VesselID"]));

        string[] HeaderCaptions  = { "Staff Code", "Staff Name", "Staff Rank", "Sigature" };
        string[] DataColumnsName = { "STAFF_CODE", "Staff_Name", "Rank_Short_Name", "Sigature" };
        ds.Tables[0].Columns.Add("Sigature");
        foreach (DataRow item in ds.Tables[0].Rows)
        {
            item["Sigature"] = "";
        }
        GridViewExportUtil.ShowExcel(ds.Tables[0], HeaderCaptions, DataColumnsName, "SCM", "Safety Committee Meeting Attendance");
    }
    protected void BindSCMTabs()
    {
        int p = 1;



        if (TabSCM.ActiveTab.TabIndex != 10)
        {
            DataSet ds = BLL_SCM_Report.SCMReportDetailsSearch(Convert.ToInt32(Request.QueryString["SCMID"]), TabSCM.ActiveTab.TabIndex, Convert.ToInt32(Request.QueryString["VesselID"]));
            if (ds.Tables[ds.Tables.Count - 1].Rows[0]["VerificationComment"].ToString().Length > 0)
            {
                txtMessage.Text     = ds.Tables[ds.Tables.Count - 1].Rows[0]["VerificationComment"].ToString();
                txtMessage.ReadOnly = true;
                btnVerify.Visible   = false;

                lblVerifiedBy.Text           = ds.Tables[ds.Tables.Count - 1].Rows[0]["VerifiedByName"].ToString();;
                lblVerificationDate.Text     = Convert.ToDateTime(ds.Tables[ds.Tables.Count - 1].Rows[0]["VerificationDate"].ToString()).ToString("dd/MMM/yyyy");
                lblVerificationDate.Visible  = true;
                lblVerificationDateH.Visible = true;
                lblVerifiedBy.Visible        = true;
                lblVerifiedByH.Visible       = true;
                txtMessage.Visible           = true;
                lblComment.Visible           = true;
            }
            else
            {
                if (objUA.Approve != 0)
                {
                    txtMessage.Text   = "";
                    btnVerify.Visible = true;

                    txtMessage.Visible           = true;
                    lblVerificationDate.Visible  = false;
                    lblVerificationDateH.Visible = false;
                    lblVerifiedBy.Visible        = false;
                    lblVerifiedByH.Visible       = false;
                }
            }

            switch (TabSCM.ActiveTab.TabIndex)
            {
            case 0:

                gvInjd.DataSource = ds.Tables[0];
                gvInjd.DataBind();

                gvInjdLst.DataSource = ds.Tables[1];
                gvInjdLst.DataBind();

                break;

            case 1:

                gvEmdrl.DataSource = ds.Tables[0];
                gvEmdrl.DataBind();


                gvEmdrlntdone.DataSource = ds.Tables[1];
                gvEmdrlntdone.DataBind();

                break;

            case 2:
                gvSfvs.DataSource = ds.Tables[0];
                gvSfvs.DataBind();

                break;

            case 3:
                gvSwpt.DataSource = ds.Tables[0];
                gvSwpt.DataBind();

                break;

            case 4:
                gvOrtg.DataSource = ds.Tables[0];
                gvOrtg.DataBind();

                break;

            case 5:


                break;

            case 6:
                gvMetm.DataSource = ds.Tables[0];
                gvMetm.DataBind();

                break;

            case 7:
                gvAbsn.DataSource = ds.Tables[0];
                gvAbsn.DataBind();

                break;

            case 8:
                gvCncd.DataSource = ds.Tables[0];
                gvCncd.DataBind();

                break;

            case 9:
                gvAttachments.DataSource = ds.Tables[0];
                gvAttachments.DataBind();

                break;

            case 12:
                gvEnvironmental.DataSource = ds.Tables[0];
                gvEnvironmental.DataBind();
                dlEnvironmentalAttachments.DataSource = ds.Tables[1];
                dlEnvironmentalAttachments.DataBind();
                break;

            case 13:
                gvHealthNutritionHygiene.DataSource = ds.Tables[0];
                gvHealthNutritionHygiene.DataBind();
                dtHealthAttachments.DataSource = ds.Tables[1];
                dtHealthAttachments.DataBind();
                break;

            default:
                break;
            }
        }
    }