public void loadClient(ClientItem client)
 {
     String query = "select ClientName, ClientNum from ClientInfo where `ClientID`=\"" + client.id + "\"";
     clientInfo = database.GetTable(query);
     performReplacements();
     loadClientID = Convert.ToInt32(client.id);
     ClientName = client.clientName;
 }
 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();
 }
        private void fillInactiveClientList()
        {
            newPatientIntakeWizard_tab1_listbox_inactiveclients.Items.Clear();

            String query = "select ClientNum, ClientName from ClientInfo where IntakeDate LIKE '0001-01-01%' and ExitDate like '0001-01-01%'";
            inactiveClients = database.GetTable(query);

            foreach (DataRow row in inactiveClients.Rows)
            {
                ClientItem item = new ClientItem();
                item.id = row["ClientNum"].ToString();
                item.clientName = row["ClientName"].ToString();
                newPatientIntakeWizard_tab1_listbox_inactiveclients.Items.Add(item);
            }
            if (newPatientIntakeWizard_tab1_listbox_inactiveclients.Items.Count > 0)
                newPatientIntakeWizard_tab1_listbox_inactiveclients.SelectedIndex = 0;
        }
 public void updateClientList()
 {
     foreach (DataRow row in clients.Rows)
     {
         ClientItem item = new ClientItem();
         item.id = row["ClientID"].ToString();
         item.clientName = row["ClientName"].ToString();
         clientList.Items.Add(item);
     }
 }
 public void loadClient(ClientItem client)
 {
     String query = "select ClientNum, ClientID from ClientInfo where `ClientNum`=\"" + client + "\"";
     DataTable loadedClient = database.GetTable(query);
     loadClientID = Convert.ToInt32(client.id);
     ClientName = client.clientName;
 }
 public void loadClient(ClientItem client)
 {
     //String query = "select ClientNum, ClientName from ClientInfo where `ClientNum`=\"" + client + "\"";
     //DataTable loadedClient = database.GetTable(query);
 }