private void GetDataFromControlsManual(PmGeneralApplicationRow ARow)
        {
            // need to make sure that partner key fields that are not referring to p_partner table
            // but to other tables like p_unit or p_person are set to NULL when they are empty (and
            // not to 0 as then foreign key constraints will fail)
            if ((txtFieldCharged.Text.Length != 0) &&
                (Convert.ToInt64(txtFieldCharged.Text) == 0))
            {
                FMainDS.PmShortTermApplication[0].SetStFieldChargedNull();
            }

            if ((txtPlacementPerson.Text.Length != 0) &&
                (Convert.ToInt64(txtPlacementPerson.Text) == 0))
            {
                ARow.SetPlacementPartnerKeyNull();
            }

            if ((FMainDS.PmShortTermApplication != null) && (FMainDS.PmShortTermApplication.Rows.Count > 0))
            {
                if (txtEvent.Text.Length == 0)
                {
                    FMainDS.PmShortTermApplication[0].SetConfirmedOptionCodeNull();
                }
                else
                {
                    FMainDS.PmShortTermApplication[0].ConfirmedOptionCode =
                        TRemote.MPersonnel.Person.DataElements.WebConnectors.GetOutreachCode(Convert.ToInt64(txtEvent.Text));
                }
            }
        }
Esempio n. 2
0
        private void GetDataFromControlsManual(PmGeneralApplicationRow ARow)
        {
            // need to make sure that partner key fields that are not referring to p_partner table
            // but to other tables like p_unit or p_person are set to NULL when they are empty (and
            // not to 0 as then foreign key constraints will fail)
            // HOWEVER: at the moment the thinking is (according to WolfgangB, and Petra 2.x's implementation)
            // that the Target Field needs to be specified for an Application to be valid!
//            if ((txtField.Text.Length != 0)
//                && (Convert.ToInt64(txtField.Text) == 0))
//            {
//                ARow.SetGenAppPossSrvUnitKeyNull();
//            }

            if ((txtPlacementPerson.Text.Length != 0) &&
                (Convert.ToInt64(txtPlacementPerson.Text) == 0))
            {
                ARow.SetPlacementPartnerKeyNull();
            }
        }
        private void GetDataFromControlsManual(PmGeneralApplicationRow ARow)
        {
            // need to make sure that partner key fields that are not referring to p_partner table
            // but to other tables like p_unit or p_person are set to NULL when they are empty (and
            // not to 0 as then foreign key constraints will fail)
            // HOWEVER: at the moment the thinking is (according to WolfgangB, and Petra 2.x's implementation)
            // that the Target Field needs to be specified for an Application to be valid!
//            if ((txtField.Text.Length != 0)
//                && (Convert.ToInt64(txtField.Text) == 0))
//            {
//                ARow.SetGenAppPossSrvUnitKeyNull();
//            }

            if ((txtPlacementPerson.Text.Length != 0)
                && (Convert.ToInt64(txtPlacementPerson.Text) == 0))
            {
                ARow.SetPlacementPartnerKeyNull();
            }
        }
        private void GetDataFromControlsManual(PmGeneralApplicationRow ARow)
        {
            // need to make sure that partner key fields that are not referring to p_partner table
            // but to other tables like p_unit or p_person are set to NULL when they are empty (and
            // not to 0 as then foreign key constraints will fail)
            if ((txtFieldCharged.Text.Length != 0)
                && (Convert.ToInt64(txtFieldCharged.Text) == 0))
            {
                FMainDS.PmShortTermApplication[0].SetStFieldChargedNull();
            }

            if ((txtPlacementPerson.Text.Length != 0)
                && (Convert.ToInt64(txtPlacementPerson.Text) == 0))
            {
                ARow.SetPlacementPartnerKeyNull();
            }

            if ((FMainDS.PmShortTermApplication != null) && (FMainDS.PmShortTermApplication.Rows.Count > 0))
            {
                if (txtEvent.Text.Length == 0)
                {
                    FMainDS.PmShortTermApplication[0].SetConfirmedOptionCodeNull();
                }
                else
                {
                    FMainDS.PmShortTermApplication[0].ConfirmedOptionCode =
                        TRemote.MPersonnel.Person.DataElements.WebConnectors.GetOutreachCode(Convert.ToInt64(txtEvent.Text));
                }
            }
        }