public void GetQuestionsTest()
        {
            app = new ApplicantSurveyApp();
            List <Question> question = new List <Question>();

            question = app.GetQuestions();
            //Assert.IsTrue(question.Count == 0);
        }
Exemplo n.º 2
0
        public static List <ImageDetail> GetImages()
        {
            List <ImageDetail> imageDetails       = new List <ImageDetail>();
            ApplicantSurveyApp applicantSurveyApp = new ApplicantSurveyApp();

            string serverPath = applicantSurveyApp.GetLocalPath();

            imageDetails = applicantSurveyApp.GetImagesFromDirectory(HttpContext.Current.Server.MapPath(serverPath), serverPath);

            return(imageDetails);
        }
Exemplo n.º 3
0
        public static List <string> GetReportNames()
        {
            string             _sql = string.Empty;
            ApplicantSurveyApp app  = new ApplicantSurveyApp();
            List <string>      ret  = new List <string>();

            if (ConfigurationManager.AppSettings["ReportDB"] != null &&
                ConfigurationManager.AppSettings["FolderName"] != null)
            {
                ret = app.GetReports(ConfigurationManager.AppSettings["ReportDB"].ToString(),
                                     ConfigurationManager.AppSettings["FolderName"].ToString());
            }

            return(ret);
        }
Exemplo n.º 4
0
        public static List<string> GetReportNames()
        {
            string _sql = string.Empty;
            ApplicantSurveyApp app = new ApplicantSurveyApp();
            List<string> ret = new List<string>();

            if (ConfigurationManager.AppSettings["ReportDB"] != null &&
                ConfigurationManager.AppSettings["FolderName"] != null)
            {
                ret = app.GetReports(ConfigurationManager.AppSettings["ReportDB"].ToString(),
                    ConfigurationManager.AppSettings["FolderName"].ToString());
            }

            return ret;
        }
        private void PopulateRateImageButtons()
        {
            if (rates == null)
            {
                applicantSurveyApp = new ApplicantSurveyApp();
                rates = new List <Rate>();
                rates = applicantSurveyApp.GetRates();
            }

            ImageButton    imageButton;
            LiteralControl literalControlspace;

            //Initial Size. Standard size for smiley is 150px
            int width  = ChangeImageSize(200);
            int height = ChangeImageSize(200);


            foreach (Rate rate in rates)
            {
                imageButton               = new ImageButton();
                imageButton.ImageUrl      = rate.imageLocation;
                imageButton.CssClass      = "imgButtonImg";
                imageButton.ID            = rate.rateID.ToString();
                imageButton.AlternateText = rate.rateDescription.ToString();
                imageButton.Width         = width;
                imageButton.Height        = height;
                imageButton.Click        += imageButton_Click;

                literalControlspace      = new LiteralControl();
                literalControlspace.ID   = "space_" + imageButton.ID;
                literalControlspace.Text = "&nbsp;&nbsp;&nbsp;&nbsp;";

                ImageButtonsDiv.Controls.Add(imageButton);
                ImageButtonsDiv.Controls.Add(literalControlspace);
            }
        }
 private void SaveSurvey()
 {
     applicantSurveyApp = new ApplicantSurveyApp();
     applicantSurveyApp.SaveSurveys(surveys, applicant);
     Response.Redirect("SurveyPageFinish.aspx");
 }
        private void GetSurveyQuestions()
        {
            ApplicantSurveyApp applicantSurveyApp = new ApplicantSurveyApp();

            questions = applicantSurveyApp.GetQuestions();
        }