/// <summary>
    /// display created by and signed by evaluation footer
    /// </summary>
    /// <param name="iSchedule_ID"></param>
    /// <param name="iEvaluation_ID"></param>
    /// <returns></returns>
    public string GetEvaluationSignatureDetails(int iSchedule_ID, int iEvaluation_ID)
    {
        System.Text.StringBuilder info = new System.Text.StringBuilder();
        try
        {
            Boolean blnIsEvalByVesselUser = false;
            Boolean blnIsSignByVesselUser = false;

            DataTable dtEvlSignedBy = BLL_Crew_Evaluation.Get_EvaluatedCrewDetails(iSchedule_ID);

            // Evaluator_CrewDtlID = Evaluator_CrewDtlID == "" ? "1" : Evaluator_CrewDtlID;

            DataTable dtEvlCreatedByPersonalDetails = objBLLCrew.Get_CrewPersonalDetailsByID(UDFLib.ConvertToInteger(Evaluator_CrewDtlID));

            DataTable dtEvlCreatedByinfo = DAL_Infra_Common.Get_Crew_Information(UDFLib.ConvertToInteger(Evaluator_CrewDtlID), UDFLib.ConvertDateToNull(DateTime.Now.ToString()));

            if (dtEvlCreatedByinfo.Rows.Count > 0)
            {
                if (dtEvlCreatedByinfo.Rows[0]["USERTYPE"].ToString() != "OFFICE USER")
                {
                    blnIsEvalByVesselUser = true;
                }
            }



            string    CrewID = Request.QueryString["CrewID"].ToString();
            DataTable dtEvlSignedByPersonalDetails = objBLLCrew.Get_CrewPersonalDetailsByID(UDFLib.ConvertToInteger(CrewID));
            DataTable dtEvlSignedByinfo            = DAL_Infra_Common.Get_Crew_Information(UDFLib.ConvertToInteger(CrewID), UDFLib.ConvertDateToNull(DateTime.Now.ToString()));
            if (dtEvlSignedByinfo.Rows.Count > 0)
            {
                if (dtEvlSignedByinfo.Rows[0]["USERTYPE"].ToString() != "OFFICE USER")
                {
                    blnIsSignByVesselUser = true;
                }
            }

            info.Append("<table cellpadding='0' id='dvEvalutionFooter' cellspacing='0' style='color:#000;'>");
            info.Append("<tr>");
            info.Append("<td rowspan='2' width='60px' >");
            if ((dtEvlCreatedByPersonalDetails.Rows[0]["PhotoURL"] != null) && (dtEvlCreatedByPersonalDetails.Rows[0]["PhotoURL"].ToString() != ""))
            {
                if (File.Exists(Server.MapPath("Uploads/CrewImages/" + dtEvlCreatedByPersonalDetails.Rows[0]["PhotoURL"])))
                {
                    info.Append("<img id='imgCreatedBy' width='35' height='35'  alt='' src='/jibe/Uploads/CrewImages/" + dtEvlCreatedByPersonalDetails.Rows[0]["PhotoURL"].ToString() + "'>");
                }
                else
                {
                    info.Append("<img id='imgCreatedBy' width='35' height='35'  alt=''  src='/" + System.Configuration.ConfigurationManager.AppSettings["APP_NAME"].ToString() + "/Images/NoPic.png'>");
                }
            }
            else
            {
                info.Append("<img id='imgCreatedBy' width='35' height='35'  alt=''  src='/" + System.Configuration.ConfigurationManager.AppSettings["APP_NAME"].ToString() + "/Images/NoPic.png'>");
            }

            info.Append("</td>");
            info.Append("<td width='70px' style='text-align:left;'>Created By :");
            info.Append("</td>");

            info.Append("<td style='padding-left:10px;text-align:left;'>");
            info.Append("<a ID='lnkCreatedBy' style='text-decoration:none; float:left;' href='../Crew/CrewDetails.aspx?ID=" + UDFLib.ConvertToInteger(Evaluator_CrewDtlID) + "' runat='server' Target='_blank'>" + EvalLibRank + dtEvlCreatedByPersonalDetails.Rows[0]["staff_fullname"].ToString() + "</a>");
            info.Append("</td>");

            if ((dtEvlSignedBy.Rows[0]["EvaluationSigned"].ToString().ToLower() == "1") && (blnIsSignByVesselUser == true)) //displays data if evaluation is signed
            {
                info.Append("<td rowspan='2' width='60px' style='padding-left:20px;'>");
                if ((dtEvlSignedByPersonalDetails.Rows[0]["PhotoURL"] != null) && (dtEvlSignedByPersonalDetails.Rows[0]["PhotoURL"].ToString() != ""))
                {
                    if (File.Exists(Server.MapPath("Uploads/CrewImages/" + dtEvlSignedByPersonalDetails.Rows[0]["PhotoURL"])))
                    {
                        info.Append("<img id='imgCreatedBy' width='35' height='35'  alt='' src='/jibe/Uploads/CrewImages/" + dtEvlSignedByPersonalDetails.Rows[0]["PhotoURL"].ToString() + "'>");
                    }
                    else
                    {
                        info.Append("<img id='imgCreatedBy' width='35' height='35'  alt=''  src='/" + System.Configuration.ConfigurationManager.AppSettings["APP_NAME"].ToString() + "/Images/NoPic.png'>");
                    }
                }
                else
                {
                    info.Append("<img id='imgCreatedBy' width='35' height='35'  alt=''  src='/" + System.Configuration.ConfigurationManager.AppSettings["APP_NAME"].ToString() + "/Images/NoPic.png'>");
                }
                //info.Append("<img id='imgSignedBy' width='35' height='35' alt='' src='/jibe/Uploads/CrewImages/" + dtEvlSignedByPersonalDetails.Rows[0]["PhotoURL"].ToString() + "'>");
                info.Append("</td>");
                info.Append("<td width='70px' style='text-align:left;'>Signed By :</td>");
                info.Append("<td  style='padding-left:10px;' style='text-align:left;'>");
                info.Append("<a ID='lnkSignedBy' style='text-decoration:none; float:left;' href='../Crew/CrewDetails.aspx?ID=" + dtEvlSignedByPersonalDetails.Rows[0]["ID"].ToString() + "' runat='server' Target='_blank'>" + dtEvlSignedByPersonalDetails.Rows[0]["STAFF_FULLNAME"].ToString() + "</a>");
                info.Append("</td>");
            }
            info.Append("</tr>");

            info.Append("<tr>");
            info.Append("<td width='auto' style='text-align:left;'><label ID='lblCreatedDt' runat='server'>" + UDFLib.ConvertUserDateFormat(Convert.ToString(dtEvlSignedBy.Rows[0]["Date_of_Creation"])) + "</label></td>");
            info.Append("<td><div id='' style='text-align: left; width: 100px; border: 0px solid gray; '>");
            info.Append(JibeWS.asyncGet_Crew_Information(Convert.ToString(Evaluator_CrewDtlID)));
            info.Append("</div></td>");

            if ((dtEvlSignedBy.Rows[0]["EvaluationSigned"].ToString().ToLower() == "1") && (blnIsSignByVesselUser == true)) //displays data if evaluation is signed
            {
                info.Append("<td width='auto' style='text-align:left;'>");
                info.Append("<label ID='lblSignedByDt' runat='server'>" + UDFLib.ConvertUserDateFormat(Convert.ToString(dtEvlSignedBy.Rows[0]["Date_Of_EvalSigned"])) + "</label>");
                info.Append("</td>");

                info.Append("<td>");
                info.Append("<div id='dvCrewInformation' style='text-align: left; width: 100px; border: 0px solid gray;'>");
                info.Append(JibeWS.asyncGet_Crew_Information(CrewID));
                info.Append("</div>");
                info.Append("</td>");
            }
            info.Append("</tr>");
            info.Append("</table>");

            //if (blnIsSignByVesselUser == true)
            //{
            if (dtEvlSignedBy.Rows[0]["EvaluationSigned"].ToString().ToLower() == "0")
            {
                LblDigitalSign.Text      = "Refused to Sign";
                LblDigitalSign.ForeColor = System.Drawing.Color.Red;
            }
            else if (dtEvlSignedBy.Rows[0]["EvaluationSigned"].ToString().ToLower() == "1")
            {
                LblDigitalSign.Text      = "Signed by the evaluated staff";
                LblDigitalSign.ForeColor = System.Drawing.Color.Green;
            }
            else if (dtEvlSignedBy.Rows[0]["EvaluationSigned"].ToString().ToLower() == "-1")
            {
                LblDigitalSign.Text      = "Not signed. Crew sign-off";
                LblDigitalSign.ForeColor = System.Drawing.Color.Red;
            }
            //}
            return(info.ToString());
        }
        catch (Exception ex)
        {
            UDFLib.WriteExceptionLog(ex);
            return(info.ToString());
        }
    }