Exemple #1
0
        public ChooseCUPEClient(CUPETool parentForm)
        {
            InitializeComponent();

            cupeForm = parentForm;
            ChooseClientComboBox.Items.AddRange(cupeForm.db.GetClientNames());
            this.Focus();
        }
Exemple #2
0
        public static void LoadNewCUPE20(CUPETool cupeForm)
        {
            db.ClearCUPE(Client.EntityObject);
            cupeQuestions = db.GetCUPEQuestionStringDataTwenty();
            int questionNumber = 1;

            foreach (CupeQuestionStringData cqsd in cupeQuestions)
            {
                db.AddCUPE(cqsd.QuestionText, Client.EntityObject, questionNumber++);
            }
            if (!ClientDataControl.db.SaveChanges())
            {
                MessageBox.Show("Failed to create new CUPE for client", "Error");
            }
        }
Exemple #3
0
        public static void LoadCUPEQuestions(CUPETool cupeForm)
        {
            cupeQuestions = db.GetCUPESForClient();

            if (cupeQuestions.Count == 0 && MessageBox.Show("No CUPE was found for this client. Would you like to make one?", "New CUPE", MessageBoxButtons.OKCancel) == DialogResult.OK)
            {
                cupeQuestions = db.GetCUPEQuestionStringDataTwenty();
                int questionNumber = 1;
                foreach (CupeQuestionStringData cqsd in cupeQuestions)
                {
                    db.AddCUPE(cqsd.QuestionText, Client.EntityObject, questionNumber++);
                }
                if (!ClientDataControl.db.SaveChanges())
                {
                    MessageBox.Show("Failed to create new CUPE for client", "Error");
                }
            }
        }
Exemple #4
0
 public abstract void PopulateCUPEQuestionsForClient(CUPETool cupeForm);