Example #1
0
        public StudABCard01Content()
        {
            InitializeComponent();

            _StudenIDList   = new List <string>();
            _udtMrFlp01Dict = new Dictionary <string, UDTMultipleRecordDef>();
            _udtMrFlp02Dict = new Dictionary <string, UDTMultipleRecordDef>();

            _QDMang       = new ABCardQuestionDataManager();
            _QuestionDict = _QDMang.GetQuestionDataByGroupName(GroupName);
            this.Group    = "綜合表現紀錄表-本人概況";
            _bgWorker     = new BackgroundWorker();

            List <string> grYear = Utility.GetClassGradeYear();

            if (grYear.Count > 3)
            {
                SetDgColumn4_6Visable(true);
            }
            else
            {
                SetDgColumn4_6Visable(false);
            }

            _ChangeManager = new ChangeListener();
            _ChangeManager.StatusChanged += new EventHandler <ChangeEventArgs>(_ChangeManager_StatusChanged);
            LoadQuestionToUI();
            _bgWorker.DoWork             += new DoWorkEventHandler(_bgWorker_DoWork);
            _bgWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(_bgWorker_RunWorkerCompleted);
            EventHub.CounselChanged      += new EventHandler(EventHub_CounselChanged);
        }
        public StudABCard02Content()
        {
            InitializeComponent();
            this.Group     = "綜合表現紀錄表-家庭狀況";
            _QDMang        = new ABCardQuestionDataManager();
            _StudentIDList = new List <string>();

            _UDTSingleRecordDict  = new Dictionary <string, UDTSingleRecordDef>();
            _UDTSiblingList       = new List <UDTSiblingDef>();
            _UDTRelativeList      = new List <UDTRelativeDef>();
            _UDTYearlyDataKeyList = new List <string> ();
            _UDTRelativeKeyList   = new List <string>();
            _UDTSiblingKeyList    = new List <string>();
            _UDTYearlyDataDict    = new Dictionary <string, UDTYearlyDataDef>();

            LoadQuestion();
            _ClassGradeYearDict = Utility.GetClassGradeYearDict();

            // 會動態改變
            _RowIndexDict = new Dictionary <string, int>();
            _RowNameList  = _ClassGradeYearDict.Keys.ToList();
            _RowNameList.Sort();

            int row = 0;

            foreach (string str in _RowNameList)
            {
                _RowIndexDict.Add(str, row);
                row++;
            }

            // 固定不變
            _ColumIndexDict = new Dictionary <string, int>();
            _ColumIndexDict.Add(GroupName + "_父母關係", 1);
            _ColumIndexDict.Add(GroupName + "_家庭氣氛", 2);
            _ColumIndexDict.Add(GroupName + "_父親管教方式", 3);
            _ColumIndexDict.Add(GroupName + "_母親管教方式", 4);
            _ColumIndexDict.Add(GroupName + "_居住環境", 5);
            _ColumIndexDict.Add(GroupName + "_本人住宿", 6);
            _ColumIndexDict.Add(GroupName + "_經濟狀況", 7);
            _ColumIndexDict.Add(GroupName + "_每星期零用錢", 8);
            _ColumIndexDict.Add(GroupName + "_我覺得是否足夠", 9);

            _bgWorker                      = new BackgroundWorker();
            _bgWorker.DoWork              += new DoWorkEventHandler(_bgWorker_DoWork);
            _bgWorker.RunWorkerCompleted  += new RunWorkerCompletedEventHandler(_bgWorker_RunWorkerCompleted);
            _ChangeListener.StatusChanged += new EventHandler <ChangeEventArgs>(_ChangeListener_StatusChanged);
            EventHub.CounselChanged       += new EventHandler(EventHub_CounselChanged);
            _ChangeListener.Add(new TextBoxSource(txtGender));
            _ChangeListener.Add(new TextBoxSource(txtMailingAddress));
            _ChangeListener.Add(new TextBoxSource(txtName));
            _ChangeListener.Add(new TextBoxSource(txtPhone));
            _ChangeListener.Add(new TextBoxSource(txtRelationship));
            _ChangeListener.Add(new TextBoxSource(txtSiblingNo));
            _ChangeListener.Add(new DataGridViewSource(dgRelative));
            _ChangeListener.Add(new DataGridViewSource(dgSibling));
            _ChangeListener.Add(new DataGridViewSource(dgYearly));
        }
 public ABCardQuestionsForm()
 {
     InitializeComponent();
     _GroupList = new List <string>();
     _ABCardQuestionDataManager = new ABCardQuestionDataManager();
     //_ControlTypeDictE.Add("", EnumControlType.CHECKBOX);
     //_ControlTypeDictE.Add("", EnumControlType.COMBOBOX);
     //_ControlTypeDictE.Add("", EnumControlType.GRID_COMBOBOX);
     //_ControlTypeDictE.Add("", EnumControlType.GRID_TEXTBOX);
     //_ControlTypeDictE.Add("", EnumControlType.GRID_TEXTBOXDROPDOWN);
     //_ControlTypeDictE.Add("", EnumControlType.RADIO_BUTTON);
     //_ControlTypeDictE.Add("", EnumControlType.TEXTBOX);
 }
        public StudABCard09Content()
        {
            InitializeComponent();
            this.Group      = "綜合表現紀錄表-適應情形";
            _StudentIDList  = new List <string>();
            _insertDataList = new List <UDTYearlyDataDef>();
            _updateDataList = new List <UDTYearlyDataDef>();

            _QDMang = new ABCardQuestionDataManager();
            // 讀取題目
            _QuestionDataDict   = _QDMang.GetQuestionDataByGroupName(GroupName);
            _ClassGradeYearDict = Utility.GetClassGradeYearDict();

            // 會動態改變
            _RowIndexDict = new Dictionary <string, int>();
            _RowNameList  = _ClassGradeYearDict.Keys.ToList();
            _RowNameList.Sort();

            int row = 0;

            foreach (string str in _RowNameList)
            {
                _RowIndexDict.Add(str, row);
                row++;
            }

            // 固定不變
            _ColumIndexDict = new Dictionary <string, int>();
            _ColumIndexDict.Add(GroupName + "_生活習慣", 1);
            _ColumIndexDict.Add(GroupName + "_人際關係", 2);
            _ColumIndexDict.Add(GroupName + "_外向行為", 3);
            _ColumIndexDict.Add(GroupName + "_內向行為", 4);
            _ColumIndexDict.Add(GroupName + "_學習動機", 5);
            _ColumIndexDict.Add(GroupName + "_服務熱忱", 6);
            _ColumIndexDict.Add(GroupName + "_人生態度", 7);

            _bgWorker          = new BackgroundWorker();
            _UDTYearlyDataDict = new Dictionary <string, UDTYearlyDataDef>();
            _ChangeListener.Add(new DataGridViewSource(dgData));
            _ChangeListener.StatusChanged += new EventHandler <ChangeEventArgs>(_ChangeListener_StatusChanged);
            EventHub.CounselChanged       += new EventHandler(EventHub_CounselChanged);
            _bgWorker.DoWork             += new DoWorkEventHandler(_bgWorker_DoWork);
            _bgWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(_bgWorker_RunWorkerCompleted);
        }
Example #5
0
        public StudABCard07Content()
        {
            InitializeComponent();
            this.Group     = "綜合表現紀錄表-畢業後計畫";
            _StudentIDList = new List <string>();
            _KeyNameList   = new List <string>();
            _KeyNameList.Add(_keyName1);
            _KeyNameList.Add(_keyName2);
            _KeyNameList.Add(_keyName3);
            _KeyNameList.Add(_keyName4);
            _KeyNameList.Add(_keyName5);
            _KeyNameList.Add(_keyName6);
            _flpList = new List <FlowLayoutPanel>();
            _flpList.Add(flp1);
            _flpList.Add(flp2);
            _flpList.Add(flp3);
            _flpList.Add(flp4);

            _QDMang                        = new ABCardQuestionDataManager();
            _PriorityData1                 = new UDTPriorityDataDef();
            _PriorityData2                 = new UDTPriorityDataDef();
            _QuestionDict                  = _QDMang.GetQuestionDataByGroupName(GroupName);
            _dataMDict                     = new Dictionary <string, UDTMultipleRecordDef>();
            _dataPDict                     = new Dictionary <string, UDTPriorityDataDef>();
            _insertPriorityDataList        = new List <UDTPriorityDataDef>();
            _InsertMultipleRecordDict      = new Dictionary <string, UDTMultipleRecordDef>();
            _updatePriorityDataList        = new List <UDTPriorityDataDef>();
            _deleteMultipleRecordList      = new List <UDTMultipleRecordDef>();
            _ChangeListener.StatusChanged += new EventHandler <ChangeEventArgs>(_ChangeListener_StatusChanged);
            _ChangeListener.Add(new DataGridViewSource(dgPriority));
            LoadQuestionToUI();
            EventHub.CounselChanged += new EventHandler(EventHub_CounselChanged);
            _bgWorkerM                     = new BackgroundWorker();
            _bgWorkerM.DoWork             += new DoWorkEventHandler(_bgWorkerM_DoWork);
            _bgWorkerM.RunWorkerCompleted += new RunWorkerCompletedEventHandler(_bgWorkerM_RunWorkerCompleted);
        }
Example #6
0
        public StudABCard03Content()
        {
            InitializeComponent();

            this.Group              = "綜合表現紀錄表-學習狀況";
            _QDMang                 = new ABCardQuestionDataManager();
            _StudentIDList          = new List <string>();
            _YearlyDataKeyList      = new List <string> ();
            _YearlyDataDict         = new Dictionary <string, UDTYearlyDataDef>();
            _bgWorker               = new BackgroundWorker();
            _insertDataList         = new List <UDTYearlyDataDef>();
            _updateDataList         = new List <UDTYearlyDataDef>();
            _insertSemesterDataList = new List <UDTSemesterDataDef>();
            _updateSemesterDataList = new List <UDTSemesterDataDef>();
            _QuestionDataDict       = new Dictionary <string, QuestionData>();
            _SemesterDataDict       = new Dictionary <string, UDTSemesterDataDef>();
            _SemesterDataKeyList    = new List <string>();
            _SemesterDataKeyList.Add(Key1);
            _SemesterDataKeyList.Add(Key2);
            _ClassGradeYearDict = Utility.GetClassGradeYearDict();

            List <string> grYear = Utility.GetClassGradeYear();

            if (grYear.Count > 3)
            {
                SetDgColumn4_6Visable(true);
            }
            else
            {
                SetDgColumn4_6Visable(false);
            }

            // 會動態改變
            _RowIndexDict = new Dictionary <string, int>();
            _RowNameList  = _ClassGradeYearDict.Keys.ToList();
            _RowNameList.Sort();

            int row = 0;

            foreach (string str in _RowNameList)
            {
                _RowIndexDict.Add(str, row);
                row++;
            }
            // 固定不變
            _ColumIndexDict = new Dictionary <string, int>();
            _ColumIndexDict.Add(GroupName + "_特殊專長", 1);
            _ColumIndexDict.Add(GroupName + "_休閒興趣", 2);
            _ColumIndexDict.Add(GroupName + "_最喜歡的學科", 3);
            _ColumIndexDict.Add(GroupName + "_最感困難的學科", 4);
            //_ColumIndexDict.Add(GroupName + "_社團幹部", 5);
            //_ColumIndexDict.Add(GroupName + "_班級幹部", 6);

            lvData.FullRowSelect = true;
            lvData.MultiSelect   = false;

            _ChangeListener.StatusChanged += new EventHandler <ChangeEventArgs>(_ChangeListener_StatusChanged);
            _ChangeListener.Add(new DataGridViewSource(dgData));
            _QuestionDataDict.Clear();
            _QuestionDataDict             = _QDMang.GetQuestionDataByGroupName(GroupName);
            _YearlyDataKeyList            = _QuestionDataDict.Keys.ToList();
            EventHub.CounselChanged      += new EventHandler(EventHub_CounselChanged);
            _bgWorker.DoWork             += new DoWorkEventHandler(_bgWorker_DoWork);
            _bgWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(_bgWorker_RunWorkerCompleted);
        }