예제 #1
0
        /// <summary>  Loads User Check Box Labels from UserFields Table
        /// </summary>
        private void loadUserFieldLabels()
        {
            UserFields clsUserFields = new UserFields(CCFBGlobal.connectionString);

            clsUserFields.open("Volunteers");
            clsUserFields.setDataRow("UserFlag0");
            if ("UserFlag0" == clsUserFields.FldName)
            {
                chkUserFlag0.Text    = clsUserFields.EditLabel;
                chkUserFlag0.Visible = (chkUserFlag0.Text != "");
            }
            clsUserFields.setDataRow("UserFlag1");
            if ("UserFlag1" == clsUserFields.FldName)
            {
                chkUserFlag1.Text    = clsUserFields.EditLabel;
                chkUserFlag1.Visible = (chkUserFlag1.Text != "");
            }
            clsUserFields.setDataRow("Date1");
            if ("Date1" == clsUserFields.FldName)
            {
                lblDate1.Text    = clsUserFields.EditLabel;
                tbDate1.Visible  = (lblDate1.Text != "");
                lblDate1.Visible = (lblDate1.Text != "");
            }
            clsUserFields.setDataRow("Date2");
            if ("Date2" == clsUserFields.FldName)
            {
                lblDate2.Text    = clsUserFields.EditLabel;
                tbDate2.Visible  = (lblDate2.Text != "");
                lblDate2.Visible = (lblDate2.Text != "");
            }
        }
예제 #2
0
        private void loadUserFieldLabels()
        {
            UserFields clsUserFields = new UserFields(CCFBGlobal.connectionString);

            lstbxHHUserFields.Items.Clear();
            string fldName = "";

            clsUserFields.open("Household");
            userFieldList.Clear();
            for (int i = 0; i < clsUserFields.RowCount; i++)
            {
                fldName = "UserFlag" + i.ToString();
                clsUserFields.setDataRow(fldName);
                if (fldName == clsUserFields.FldName)
                {
                    if (clsUserFields.EditLabel != "")
                    {
                        UserFieldItem fieldRow = new UserFieldItem(i, clsUserFields.EditLabel, fldName);
                        userFieldList.Add(fieldRow);
                        lstbxHHUserFields.Items.Add(fieldRow.EditLabel);
                    }
                }
            }
        }
예제 #3
0
        }                       // end of btnSave_Click

        //-----------------------------------------------------------------------------------------
        /// <summary>
        /// Display the selected Type Code table and set the controls.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        //-----------------------------------------------------------------------------------------
        private void cboTable_Select_SelectedIndexChanged(object sender, EventArgs e)
        {
            clsUserFields.open(cboTable_Select.SelectedItem.ToString());
            loadList();
        }                       // end of cboTable_Select_SelectedIndexChanged
예제 #4
0
        /// <summary>
        /// Used in initialization of the HHMemForm(ie Constructor)
        /// </summary>
        /// <param name="clsIn">The Client Class</param>
        /// <param name="frmMainIn">The Main Form-Calling Form</param>
        /// <param name="HHMemID">The Household Member ID</param>
        public HHMemGridForm(Client clsIn, MainForm frmMainIn, int HHMemID)
        {
            InitializeComponent();

            clsClient     = clsIn;
            frmMain       = frmMainIn;
            showColumn[0] = false;
            for (int i = 1; i < showColumn.Length; i++)
            {
                showColumn[i] = true;
            }
            hhMemID = HHMemID;
            UserFields clsUserFields = new UserFields(CCFBGlobal.connectionString);

            clsUserFields.open("HouseholdMembers");

            string userField0 = clsUserFields.GetDataValue("EditLabel", 0).ToString();
            string userField1 = clsUserFields.GetDataValue("EditLabel", 1).ToString();

            if (userField0 == "")
            {
                showColumn[(int)dgvColNames.colUserFlag0] = false;
                chkUserFlag0.Visible = false;
            }
            else
            {
                chkUserFlag0.Text = dgvHHM.Columns["colUserFlag0"].ToolTipText = userField0;
            }

            if (userField1 == "")
            {
                showColumn[(int)dgvColNames.colUserFlag1] = false;
                chkUserFlag1.Visible = false;
            }
            else
            {
                chkUserFlag1.Text = dgvHHM.Columns["colUserFlag1"].ToolTipText = userField1;
            }

            traverseAndAddControlsToCollections(this.Controls);
            setCSFPInfoVisibility();

            CCFBGlobal.InitCombo(cboEdLvl, CCFBGlobal.parmTbl_EducationLevel);
            CCFBGlobal.InitCombo(cboEmploymentStatus, CCFBGlobal.parmTbl_Employment);
            CCFBGlobal.InitCombo(cboMilitaryService, CCFBGlobal.parmTbl_MilitaryService);
            CCFBGlobal.InitCombo(cboDischargeStatus, CCFBGlobal.parmTbl_MilitaryDischarge);
            CCFBGlobal.InitCombo(cboCSFPRoute, CCFBGlobal.parmTbl_CSFPRoutes);

            TestFeatureEnabled(tsbCSFP, (int)dgvColNames.colBegCSFP, (int)dgvColNames.colBegWork, CCFBPrefs.EnableCSFP);
            TestFeatureEnabled(tsbWorksInArea, (int)dgvColNames.colBegWork, (int)dgvColNames.colBegOption, CCFBPrefs.EnableWorksInArea);
            pnlEmployer.Visible = CCFBPrefs.EnableWorksInArea;
            TestFeatureEnabled(tsbOptional, (int)dgvColNames.colBegOption, (int)dgvColNames.colBegMilitary, CCFBPrefs.EnableAdditionalHHMDataTab);
            TestFeatureEnabled(tsbMilitarySvc, (int)dgvColNames.colBegMilitary, (int)dgvColNames.colBegEmployed, CCFBPrefs.EnableAdditionalHHMDataTab);
            TestFeatureEnabled(tsbEmployment, (int)dgvColNames.colBegEmployed, dgvHHM.Columns.Count, CCFBPrefs.EnableAdditionalHHMDataTab);

            pnlHHMFlds.BackColor    = CCFBGlobal.bkColorBaseEdit;
            tpgAdditional.BackColor = CCFBGlobal.bkColorBaseEdit;
            tpgEthnicity.BackColor  = CCFBGlobal.bkColorBaseEdit;
            pnlCSFPInfo.BackColor   = CCFBGlobal.bkColorAltEdit;
            pnlEmployer.BackColor   = CCFBGlobal.bkColorAltEdit;
            if (CCFBPrefs.EnableAdditionalHHMDataTab == true)
            {
                chkSurveyComplete.Visible = true;
                chkSurveyComplete.Checked = clsClient.clsHH.SurveyComplete;
                lblSurveyComplete.Visible = true;
            }
            else
            {
                chkSurveyComplete.Visible = false;
                lblSurveyComplete.Visible = false;
            }

            if (CCFBPrefs.EnableAdditionalHHMDataTab == false && CCFBPrefs.EnableEthnicityHHMTab == false)
            {
                splitContainer3.Panel2.Visible = false;
            }
            else
            {
                splitContainer3.Panel2.Visible = true;
                if (CCFBPrefs.EnableEthnicityHHMTab == false)
                {
                    tabCtrlDemographics.TabPages.RemoveByKey("tpgEthnicity");  //Remove Ethnicity Tab
                }
                if (CCFBPrefs.EnableAdditionalHHMDataTab == false)
                {
                    tabCtrlDemographics.TabPages.RemoveByKey("tpgAdditional");  //Remove Additional Tab
                }
            }


            setupComboxBox(dgvColNames.colCSFPRoute.ToString(), CCFBGlobal.parmTbl_CSFPRoutes);
            setupComboxBox(dgvColNames.colMilSvc.ToString(), CCFBGlobal.parmTbl_MilitaryService);
            setupComboxBox(dgvColNames.colDischargeStatus.ToString(), CCFBGlobal.parmTbl_MilitaryDischarge);
            setupComboxBox(dgvColNames.colEmploymentStatus.ToString(), CCFBGlobal.parmTbl_Employment);
            setupComboxBox(dgvColNames.colEducationLevel.ToString(), CCFBGlobal.parmTbl_EducationLevel);

            try
            {
                tbHouseholdData.Text = "[ " + clsClient.clsHH.ID.ToString() + " ]\r\n"
                                       + clsClient.clsHH.Name.ToString() + "\r\n\r\n"
                                       + clsClient.clsHH.Address.ToString() + "\r\n"
                                       + clsClient.clsHH.City.ToString() + ", "
                                       + clsClient.clsHH.State.ToString() + " "
                                       + clsClient.clsHH.Zipcode.ToString();
            }
            catch { }
            showBasicInfo();
            showCSFP();
            showOptional();
            showWorksInArea();
            showMilitaryService();
            showEmployment();

            loadHHMems(true, hhMemID);
            setViewMode();
            fillForm();
        }
예제 #5
0
        /// <summary>
        /// Used in initialization of the HHMemForm(ie Constructor)
        /// </summary>
        /// <param name="clsIn">The Client Class</param>
        /// <param name="frmMainIn">The Main Form-Calling Form</param>
        /// <param name="HHMemID">The Household Member ID</param>
        public HHMemForm(Client clsIn, MainForm frmMainIn, int HHMemID)
        {
            InitializeComponent();

            clsClient = clsIn;
            frmMain   = frmMainIn;

            hhMemID = HHMemID;

            clsUserFields.open("HouseholdMembers");

            string userField0 = clsUserFields.GetDataValue("EditLabel", 0).ToString();
            string userField1 = clsUserFields.GetDataValue("EditLabel", 1).ToString();

            if (userField0 == "")
            {
                chkUserFlag0.Visible = false;
            }
            else
            {
                chkUserFlag0.Text = userField0;
            }

            if (userField1 == "")
            {
                chkUserFlag1.Visible = false;
            }
            else
            {
                chkUserFlag1.Text = userField0;
            }

            CCFBGlobal.InitCombo(cboEdLvl, CCFBGlobal.parmTbl_EducationLevel);
            CCFBGlobal.InitCombo(cboEmploymentStatus, CCFBGlobal.parmTbl_Employment);
            CCFBGlobal.InitCombo(cboMilitaryService, CCFBGlobal.parmTbl_MilitaryService);
            CCFBGlobal.InitCombo(cboDischargeStatus, CCFBGlobal.parmTbl_MilitaryDischarge);
            CCFBGlobal.InitCombo(cboCSFPRoute, CCFBGlobal.parmTbl_CSFPRoutes);
            storedProcComm = new SqlCommand("UpdateHHMembersAdditionalData", conn);
            traverseAndAddControlsToCollections(this.Controls);
            if (CCFBPrefs.EnableAdditionalHHMDataTab == false && CCFBPrefs.EnableEthnicityHHMTab == false)
            {
                panel1.Visible = false;
            }
            else
            {
                panel1.Visible = true;
                if (CCFBPrefs.EnableEthnicityHHMTab == false)
                {
                    tabControl1.TabPages.RemoveByKey("tpEthnicity");  //Remove Ethnicity Tab
                }
                if (CCFBPrefs.EnableAdditionalHHMDataTab == false)
                {
                    tabControl1.TabPages.RemoveByKey("tpAdditional");  //Remove Additional Tab
                }
            }
            setCSFPInfoVisibility();

            pnlEmployer.Visible = CCFBPrefs.EnableWorksInArea;
            if (CCFBPrefs.EnableWorksInArea == true)
            {
                splitContainer2.SplitterDistance = 165;
            }
            else
            {
                splitContainer2.SplitterDistance = 235;
            }

            loadList(HHMemID);
            fillForm();

            try
            {
                tbHouseholdData.Text = "[ " + clsClient.clsHH.ID.ToString() + " ]\r\n"
                                       + clsClient.clsHH.Name.ToString() + "\r\n\r\n"
                                       + clsClient.clsHH.Address.ToString() + "\r\n"
                                       + clsClient.clsHH.City.ToString() + ", "
                                       + clsClient.clsHH.State.ToString() + " "
                                       + clsClient.clsHH.Zipcode.ToString();
            }
            catch { }

            splitContainer2.Panel2.BackColor = CCFBGlobal.bkColorBaseEdit;
            tpAdditional.BackColor           = CCFBGlobal.bkColorBaseEdit;
            tpEthnicity.BackColor            = CCFBGlobal.bkColorBaseEdit;
            chkSurveyComplete.Visible        = false;
            lblSurveyComplete.Visible        = false;
            if (CCFBPrefs.EnableAdditionalHHMDataTab == true)
            {
                chkSurveyComplete.Visible = true;
                chkSurveyComplete.Checked = clsClient.clsHH.SurveyComplete;
                lblSurveyComplete.Visible = true;
            }
        }