コード例 #1
0
        private void GenerateContentEmployment()
        {
            // Populating Employment Panel
            if (employment == null)
            {
                activate_button_employment(btn_emp_page1);

                string jsonEmployment = rest_api_ist.getRestJSON("/employment/");
                employment = JToken.Parse(jsonEmployment).ToObject <Employment>();

                // Title
                lbl_emp_title.Text = employment.introduction.title;

                // For Page 1

                // Employment and Coop
                lbl_emp_t1.Text       = employment.introduction.content[0].title;
                lbl_emp_p1_desc1.Text = employment.introduction.content[0].description;
                lbl_emp_t2.Text       = employment.introduction.content[1].title;
                lbl_emp_p1_desc2.Text = employment.introduction.content[1].description;

                // Stats
                lbl_emp_p1_11.Text = employment.degreeStatistics.statistics[0].value;
                lbl_emp_p1_12.Text = employment.degreeStatistics.statistics[0].description;
                lbl_emp_p1_21.Text = employment.degreeStatistics.statistics[1].value;
                lbl_emp_p1_22.Text = employment.degreeStatistics.statistics[1].description;
                lbl_emp_p1_31.Text = employment.degreeStatistics.statistics[2].value;
                lbl_emp_p1_32.Text = employment.degreeStatistics.statistics[2].description;
                lbl_emp_p1_41.Text = employment.degreeStatistics.statistics[3].value;
                lbl_emp_p1_42.Text = employment.degreeStatistics.statistics[3].description;

                // For Page 2
                lbl_emp_p2_t1.Text    = employment.employers.title;
                lbl_emp_p2_desc1.Text = string.Join(", ", employment.employers.employerNames);
                lbl_emp_p2_t2.Text    = employment.careers.title;
                lbl_emp_p2_desc2.Text = string.Join(", ", employment.careers.careerNames);
            }
        }
        public TableEmpCoop(Employment emp, string whichData)
        {
            this.emp       = emp;
            this.whichData = whichData;

            InitializeComponent();

            if (whichData == "coop")
            {
                title            = emp.coopTable.title;
                dgv_coop.Visible = true;

                loadCoopTable();
            }
            else
            {
                title           = emp.employmentTable.title;
                dgv_emp.Visible = true;
                loadEmploymentTable();
            }

            lbl_title.Text = title;
        }