コード例 #1
0
 private void btnAddQuestion_Click(object sender, EventArgs e)
 {
     using (var frm = new frmQuestion())
     {
         frm.Initialize(Services);
         frm.Process();
         if (frm.ShowDialog() == DialogResult.OK)
         {
         }
     }
 }
コード例 #2
0
 private void btnAddQuestion_Click(object sender, EventArgs e)
 {
     using (var frm = new frmQuestion())
     {
         frm.Initialize(Services);
         //frm.FreeText_View_Answer_LimitText = "9999";
         //frm.View_Question_QuestionName = "Enter your question!";
         //frm.FreeText_Variables_VariablesName = "Q_" +(gvQuestions.DataRowCount+1).ToString() ;
         //frm.ProjectID = this.ProjectID;
         //frm.QuestionID = QAFunction.NewGuid();
         //frm.QuestionTypeID = "84319E50-5A59-4DFE-9BBD-2793F0CCC478";
         frm.ProjectID = this.ProjectID;
         frm.Process();
         if (frm.ShowDialog() == DialogResult.OK)
         {
             Process();
             gvQuestions.SelectARowInGridView("QuestionID", frm.QuestionID);
         }
         //gvQuestions.SelectARowInGridView("QuestionID",frm.QuestionID);
     }
 }
コード例 #3
0
        private void gvQuestions_DoubleClick(object sender, EventArgs e)
        {
            var row = gvQuestions.GetDataRow(gvQuestions.FocusedRowHandle);

            if (row == null)
            {
                return;
            }

            using (var frm = new frmQuestion())
            {
                frm.Initialize(Services);
                frm.Process(row);
                if (frm.ShowDialog() == DialogResult.OK)
                {
                    Process();
                    gvQuestions.SelectARowInGridView("QuestionID", row.Item("QuestionID"));
                }
            }

            return;

            if (row.Item("QuestionTypeID").ToUpper() == "84319E50-5A59-4DFE-9BBD-2793F0CCC478")
            {
                using (var frm = new DesignForm.frmDesignFreeTextControl())
                {
                    frm.Initialize(Services);

                    frm.Process(row);
                    if (frm.ShowDialog() == DialogResult.OK)
                    {
                        Process();
                    }
                }
            }

            if (row.Item("QuestionTypeID").ToUpper() == "24D310A9-E80C-4684-923E-A86F66B66279")
            {
                using (var frm = new DesignForm.frmDesignSingleChoiceControl())
                {
                    frm.Initialize(Services);

                    frm.Process(row);
                    if (frm.ShowDialog() == DialogResult.OK)
                    {
                        Process();
                    }
                }
            }

            if (row.Item("QuestionTypeID").ToUpper() == "79A06333-E2F1-4A3C-B576-F7235BAD1577")
            {
                using (var frm = new DesignForm.frmDesignMultiChoiceControl())
                {
                    frm.Initialize(Services);

                    frm.Process(row);
                    if (frm.ShowDialog() == DialogResult.OK)
                    {
                        Process();
                        gvQuestions.SelectARowInGridView("QuestionID", frm.QuestionID);
                    }
                }
            }
        }