private void ValidateDataDetailsManual(PtApplicationTypeRow ARow)
        {
            TVerificationResultCollection VerificationResultCollection = FPetraUtilsObject.VerificationResultCollection;

            TSharedValidation_CacheableDataTables.ValidateApplicationType(this, ARow, ref VerificationResultCollection,
                                                                          FPetraUtilsObject.ValidationControlsDict);
        }
 private void GetDetailDataFromControlsManual(PtApplicationTypeRow ARow)
 {
     if (rbtField.Checked)
     {
         ARow.AppFormType = "LONG FORM";
     }
     else
     {
         ARow.AppFormType = "SHORT FORM";
     }
 }
        private void NewRowManual(ref PtApplicationTypeRow ARow)
        {
            string newName        = Catalog.GetString("NEWCODE");
            Int32  countNewDetail = 0;

            if (FMainDS.PtApplicationType.Rows.Find(new object[] { newName }) != null)
            {
                while (FMainDS.PtApplicationType.Rows.Find(new object[] { newName + countNewDetail.ToString() }) != null)
                {
                    countNewDetail++;
                }

                newName += countNewDetail.ToString();
            }

            ARow.AppTypeName = newName;
        }
        private void NewRowManual(ref PtApplicationTypeRow ARow)
        {
            string newName = Catalog.GetString("NEWCODE");
            Int32 countNewDetail = 0;

            if (FMainDS.PtApplicationType.Rows.Find(new object[] { newName }) != null)
            {
                while (FMainDS.PtApplicationType.Rows.Find(new object[] { newName + countNewDetail.ToString() }) != null)
                {
                    countNewDetail++;
                }

                newName += countNewDetail.ToString();
            }

            ARow.AppTypeName = newName;
        }
        private void ShowDetailsManual(PtApplicationTypeRow ARow)
        {
            if (ARow == null)
            {
                return;
            }

            if (ARow.AppFormType == "SHORT FORM")
            {
                rbtEvent.Checked = true;
                rbtField.Checked = false;
            }
            else if (ARow.AppFormType == "LONG FORM")
            {
                rbtEvent.Checked = false;
                rbtField.Checked = true;
            }

            // once record is saved then application form type cannot be changed any more
            rgrDetailAppFormType.Enabled = (ARow.RowState == DataRowState.Added);
        }
 private void GetDetailDataFromControlsManual(PtApplicationTypeRow ARow)
 {
     if (rbtField.Checked)
     {
         ARow.AppFormType = "LONG FORM";
     }
     else
     {
         ARow.AppFormType = "SHORT FORM";
     }
 }
        private void ValidateDataDetailsManual(PtApplicationTypeRow ARow)
        {
            TVerificationResultCollection VerificationResultCollection = FPetraUtilsObject.VerificationResultCollection;

            TSharedValidation_CacheableDataTables.ValidateApplicationType(this, ARow, ref VerificationResultCollection,
                FPetraUtilsObject.ValidationControlsDict);
        }
        private void ShowDetailsManual(PtApplicationTypeRow ARow)
        {
            if (ARow == null)
            {
                return;
            }

            if (ARow.AppFormType == "SHORT FORM")
            {
                rbtEvent.Checked = true;
                rbtField.Checked = false;
            }
            else if (ARow.AppFormType == "LONG FORM")
            {
                rbtEvent.Checked = false;
                rbtField.Checked = true;
            }

            // once record is saved then application form type cannot be changed any more
            rgrDetailAppFormType.Enabled = (ARow.RowState == DataRowState.Added);
        }
        /// <summary>
        /// Validates the MPersonnel Application Type screen data.
        /// </summary>
        /// <param name="AContext">Context that describes where the data validation failed.</param>
        /// <param name="ARow">The <see cref="DataRow" /> which holds the the data against which the validation is run.</param>
        /// <param name="AVerificationResultCollection">Will be filled with any <see cref="TVerificationResult" /> items if
        /// data validation errors occur.</param>
        /// <param name="AValidationControlsDict">A <see cref="TValidationControlsDict" /> containing the Controls that
        /// display data that is about to be validated.</param>
        public static void ValidateApplicationType(object AContext, PtApplicationTypeRow ARow,
            ref TVerificationResultCollection AVerificationResultCollection, TValidationControlsDict AValidationControlsDict)
        {
            DataColumn ValidationColumn;
            TValidationControlsData ValidationControlsData;
            TVerificationResult VerificationResult = null;

            // Don't validate deleted DataRows
            if (ARow.RowState == DataRowState.Deleted)
            {
                return;
            }

            // 'AssignableDate' must not be empty if the flag is set
            ValidationColumn = ARow.Table.Columns[PtApplicationTypeTable.ColumnUnassignableDateId];

            if (AValidationControlsDict.TryGetValue(ValidationColumn, out ValidationControlsData))
            {
                if (ARow.UnassignableFlag)
                {
                    VerificationResult = TSharedValidationControlHelper.IsNotInvalidDate(ARow.UnassignableDate,
                        ValidationControlsData.ValidationControlLabel, AVerificationResultCollection, true,
                        AContext, ValidationColumn, ValidationControlsData.ValidationControl);
                }

                // Handle addition to/removal from TVerificationResultCollection
                AVerificationResultCollection.Auto_Add_Or_AddOrRemove(AContext, VerificationResult, ValidationColumn);
            }
        }