コード例 #1
0
 public void openForm(FormItem form, ClientItem client)
 {
     switch (form.id)
     {
         case "1": // Screening & Client Information
             ((Form_ClientScreeningForm)form.form).client = client.id;
             break;
         case "2": // Admission Bookkeeping
             ((Form_AdmissionBookkeeping)form.form).client = client.id;
             break;
         case "4": // Exit Bookkeeping
             ((Form_ExitBookkeeping)form.form).client = client.id;
             break;
         case "5": // Client Admission Agreement
             ((Form_ClientAdmissionAgreement)form.form).client = client.id;
             break;
         case "6": // Financial Assessment
             ((Form_FinancialAssessment)form.form).client = client.id;
             break;
         case "7": // Discharge Summary
             ((Form_DischargeSummary)form.form).client = client.id;
             break;
         case "25": // Linen Agreement
             ((Form_LinenAgreement)form.form).client = client.id;
             break;
         case "26": // ASAM
             ((Form_ASAM)form.form).client = client.id;
             break;
         case "3":
         case "19":
         case "24":
         case "20":
         case "17":
         case "16":
         case "14":
         case "15":
         case "18":
         case "21":
         case "22":
         case "9":
         case "23":
         case "10":
         case "11":
         case "12":
         case "13":
             setGeneric(form, client.id);
             break;
         default: // ((Form_ASAM)form.form).client = client.id;
             ((CustomFormView)form.form).client = client.id;
             ((CustomFormView)form.form).loadFormID = form.id;
             break;
     }
     form.form.ShowDialog();
 }
コード例 #2
0
        private void fillFormList()
        {
            if (PanelBox.SelectedItems.Count > 0)
            {
                FormBox.Items.Clear();

                query = "select * from forms where Panel=\"";
                query += ((PanelItem)PanelBox.SelectedItem).id + "\" order by Priority asc";
                forms = database.GetTable(query);

                foreach (DataRow row in forms.Rows)
                {
                    FormItem newForm = new FormItem();
                    newForm.name = row["FormName"].ToString();
                    newForm.path = row["Path"].ToString();
                    newForm.id = row["FormID"].ToString();
                    newForm.hardcoded = row["Hardcoded"].ToString();
                    FormBox.Items.Add(newForm);
                }
            }
        }
コード例 #3
0
 public PrintGeneric()
 {
     InitializeComponent();
     f = new FormItem();
 }
コード例 #4
0
 private void setGeneric(FormItem form, String id)
 {
     FormItem temporary = new FormItem();
     temporary.name = form.name;
     temporary.id = id;
     ((PrintGeneric) form.form).f = temporary;
 }
コード例 #5
0
        public void resetFormList()
        {
            formItems.Clear();

            query = "select * from forms where Panel=" + ((PanelItem)PanelList.SelectedItem).id + " order by Priority asc";
            forms = database.GetTable(query);

            foreach (DataRow form in forms.Rows)
            {
                FormItem newFormItem = new FormItem();
                newFormItem.id = form["FormID"].ToString();
                newFormItem.name = form["FormName"].ToString();
                newFormItem.panel = form["Panel"].ToString();
                newFormItem.path = "/templates/" + form["Path"].ToString() + ".pdf";

                //
                // ADD HARCODED FORMS HERE
                //
                switch (newFormItem.id)
                {
                    case "1": // Screening & Client Information
                        newFormItem.form = new Form_ClientScreeningForm();
                        break;
                    case "2": // Admission Bookkeeping
                        newFormItem.form = new Form_AdmissionBookkeeping();
                        break;
                    case "4": // Exit Bookkeeping
                        newFormItem.form = new Form_ExitBookkeeping();
                        break;
                    case "5": // Client Admission Agreement
                        newFormItem.form = new Form_ClientAdmissionAgreement();
                        break;
                    case "6": // Financial Assessment
                        newFormItem.form = new Form_FinancialAssessment();
                        break;
                    case "7": // Discharge Summary
                        newFormItem.form = new Form_DischargeSummary();
                        break;
                    case "25": // Linen Agreement
                        newFormItem.form = new Form_LinenAgreement();
                        break;
                    case "26": // ASAM
                        newFormItem.form = new Form_ASAM();
                        break;
                    case "3":
                    case "19":
                    case "24":
                    case "20":
                    case "17":
                    case "16":
                    case "14":
                    case "15":
                    case "18":
                    case "21":
                    case "22":
                    case "9":
                    case "23":
                    case "10":
                    case "11":
                    case "12":
                    case "13":
                        newFormItem.form = new PrintGeneric();
                        break;
                    default:
                        newFormItem.form = new CustomFormView();
                        break;
                }
                //
                // FINISH ADDING HARDCODED FORMS HERE
                //

                formItems.Add(newFormItem);
            }
        }