/// Function Header*******************************************************
    /// Function Name: SaveDetails
    /// Function Type: Function
    /// Functionality: Function used to save the details of questions with answer provided by admin
    /// Input: 
    /// Output: 
    /// Return Value:
    /// Note: 
    /// ********************************************************************
    private void SaveDetails()
    {
        string strContent = string.Empty;

        BLL.TemplateLib oTemplateLib = new BLL.TemplateLib();

        Entity.CompanyInfo oCompanyInfo = new Entity.CompanyInfo();
        oCompanyInfo.StrUserName = AppLib.GetLoggedInUserName();
        oCompanyInfo.IntQuestionId = Convert.ToInt32(Request.QueryString["qid"]);
        oCompanyInfo.StrAnswer = txtAnswer.Text.Trim();
        oCompanyInfo.DtAnsweredOn = DateTime.Now;
        oCompanyInfo.StrQuestionType = rdoQuestionType.SelectedValue;
        oCompanyInfo.StrAnsweredBy = AppLib.GetLoggedInUserName();
        oCompanyInfo.StrQuestion = lblQuestion.Text;
        oCompanyInfo.StrUserId = lblUserId.Text;
        BLL.CompanyManager oCompanyManager = new BLL.CompanyManager();
        oCompanyManager.SaveAnswerFromHealthCoach(oCompanyInfo);

        strContent = oTemplateLib.GetTemplateDetailsByTemplateTemplateName("HealthCoachSubmitQuestionEmail").TextAreaHTML;

        try
        {

           // strContent = strContent.Replace("[Name]", oCompanyManager.GetUserDetailsByUsername(lblUserEmail.Text).StrUserFullName);
            strContent = strContent.Replace("[Name]", oCompanyManager.GetUserDetailsByUsername(oCompanyInfo.StrUserId).StrUserFullName);

            strContent = strContent.Replace("[Category]", lblCategory.Text);
            strContent = strContent.Replace("[Question]", lblQuestion.Text);
            strContent = strContent.Replace("[Subject]", lblSubject.Text);
            strContent = strContent.Replace("[Comments]", lblComments.Text);
            strContent = strContent.Replace("[QuestionType]", rdoQuestionType.SelectedValue);
            strContent = strContent.Replace("[Answer]", txtAnswer.Text);
            strContent = strContent.Replace("[SiteUrl]", AppConfig.GetBaseSiteUrl());
            strContent = strContent.Replace("[SiteName]", AppConfig.GetSiteName());
            strContent = strContent.Replace("[SitePhone]", AppConfig.GetSITEPHONE());
           // AppLib.SendMailToUser(lblUserEmail.Text, lblSubject.Text, strContent, AppConfig.GetAdminEmail());
           AppLib.SendMailToUser(oCompanyInfo.StrUserId, lblSubject.Text, strContent, AppConfig.GetAdminEmail());
            //AppLib.SendMailToUser(oCompanyInfo.StrUserId, lblSubject.Text, strContent, "*****@*****.**");

            //AppLib.SendMailToUser(AppConfig.GetAdminEmail(), lblSubject.Text, "Dear Admin, Following are the contents that were sent to the user. <br />" + strContent, lblUserEmail.Text);
        }
        catch { }
        finally
        {
            oTemplateLib = null;
            oCompanyManager = null;
            oCompanyInfo = null;
        }

        Response.Redirect(AppConfig.GetBaseSiteUrl() + "BackOffice/UserUtilities/ManageQuestionforHealthCoach.aspx?msg=up", true);
    }