コード例 #1
0
ファイル: QuizForm.cs プロジェクト: ischoolinc/Counsel_System
        private void btnAdd_Click(object sender, EventArgs e)
        {
            List <string> NameList = _QuizData.Select(x => x.QuizName).ToList();

            AddQuizNameForm aqnf = new AddQuizNameForm(NameList);

            if (aqnf.ShowDialog() == System.Windows.Forms.DialogResult.Yes)
            {
                if (!string.IsNullOrEmpty(aqnf.GetAddQuizName()))
                {
                    DAO.UDT_QuizDef qd = new DAO.UDT_QuizDef();
                    qd.QuizName = aqnf.GetAddQuizName();
                    // Log
                    _LogTransfer.Clear();
                    _LogTransfer.SetLogValue("測驗名稱", "");
                    _LogTransfer.SetLogValue("測驗名稱", qd.QuizName);
                    _LogTransfer.SaveInsertLog("輔導新增測驗名稱", "新增", "", "", "", "");

                    _UDTTransfer.InsertQuizData(qd);
                }
            }
            LoadData();
        }
コード例 #2
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            List<string> NameList = _QuizData.Select(x => x.QuizName).ToList();

            AddQuizNameForm aqnf = new AddQuizNameForm(NameList);

            if (aqnf.ShowDialog() == System.Windows.Forms.DialogResult.Yes)
            {
                if (!string.IsNullOrEmpty(aqnf.GetAddQuizName()))
                {
                    DAO.UDT_QuizDef qd = new DAO.UDT_QuizDef();
                    qd.QuizName = aqnf.GetAddQuizName();
                    // Log
                    _LogTransfer.Clear();
                    _LogTransfer.SetLogValue("測驗名稱","");
                    _LogTransfer.SetLogValue("測驗名稱", qd.QuizName);
                    _LogTransfer.SaveInsertLog("輔導新增測驗名稱", "新增", "", "", "", "");

                    _UDTTransfer.InsertQuizData(qd);

                }
            }
            LoadData();
        }