private void btnExport_Click(object sender, EventArgs e) { try { if (_ExamNameDict.ContainsKey(cboExam.Text)) { _ExamID = _ExamNameDict[cboExam.Text]; } _SchoolYear = iptSchoolYear.Value; _Semester = iptSemester.Value; _ExamNo = iptExamNo.Value; _SchoolCode = K12.Data.School.Code; _cd.ClearKeyValueItem(); _cd.AddKeyValueItem("學年度", _SchoolYear.ToString()); _cd.AddKeyValueItem("學期", _Semester.ToString()); _cd.AddKeyValueItem("段考別", _ExamNo.ToString()); _cd.AddKeyValueItem("試別", cboExam.Text); _cd.SaveKeyValueItem(_ConfigName); if (_ExamID != "") { btnExport.Enabled = false; _bgWorker.RunWorkerAsync(); } } catch (Exception ex) { } }
private void btnExport_Click(object sender, EventArgs e) { try { btnExport.Enabled = false; _SchoolYear = iptSchoolYear.Value; _Semester = iptSemester.Value; _cd.ClearKeyValueItem(); _cd.AddKeyValueItem("學年度", _SchoolYear.ToString()); _cd.AddKeyValueItem("學期", _Semester.ToString()); List <string> ttList = new List <string>(); List <string> ttNList = new List <string>(); foreach (ListViewItem lvi in lvScType.CheckedItems) { if (_SchoolTypeDict.ContainsKey(lvi.Text)) { ttList.Add(_SchoolTypeDict[lvi.Text]); } ttNList.Add(lvi.Text); } _SchoolType = string.Join(",", ttList.ToArray()); _cd.AddKeyValueItem("學校種類", string.Join(",", ttNList.ToArray())); _cd.SaveKeyValueItem(_ConfigName); _bgWorker.RunWorkerAsync(); }catch (Exception ex) { } }
private void btnExport_Click(object sender, EventArgs e) { btnExport.Enabled = false; _SchoolCode = K12.Data.School.Code; _SchoolYear = iptSchoolYear.Value; _Semester = iptSemester.Value; _cd.ClearKeyValueItem(); _cd.AddKeyValueItem("學年度", _SchoolYear.ToString()); _cd.AddKeyValueItem("學期", _Semester.ToString()); _cd.SaveKeyValueItem(_ConfigName); _bgWorker.RunWorkerAsync(); }
private void btnExport_Click(object sender, EventArgs e) { btnExport.Enabled = false; // 儲存畫面資料 _SchoolYear = iptSchoolYear.Value; _Semester = iptSemester.Value; // 儲存假別設定 SaveAbsenceDg(); // 儲存節次設定 SavePeriodDg(); // 儲存學年度學期 _cd.ClearKeyValueItem(); _cd.AddKeyValueItem("學年度", _SchoolYear.ToString()); _cd.AddKeyValueItem("學期", _Semester.ToString()); _cd.SaveKeyValueItem(_ConfigName3); _bgWorker.RunWorkerAsync(); }
private void btnExport_Click(object sender, EventArgs e) { try { btnExport.Enabled = false; _SchoolYear = iptSchoolYear.Value; _Semester = iptSemester.Value; _SchoolCode = K12.Data.School.Code; _DepCode = iptDepDefault.Value.ToString(); _ClassCode = iptClassDefault.Value.ToString(); _cd.ClearKeyValueItem(); _cd.AddKeyValueItem("學年度", _SchoolYear.ToString()); _cd.AddKeyValueItem("學期", _Semester.ToString()); _cd.AddKeyValueItem("部別代碼預設值", _DepCode); _cd.AddKeyValueItem("班別代碼預設值", _ClassCode); _cd.SaveKeyValueItem(_ConfigName); _bgWorker.RunWorkerAsync(); }catch (Exception ex) { } }