/// <summary>
 /// manual code when adding new row
 /// </summary>
 /// <param name="ARow"></param>
 private void NewRowManual(ref PartnerEditTDSPPartnerRelationshipRow ARow)
 {
     // Initialize relation with key of this partner on both sides, needs to be changed by user
     ARow.PartnerKey   = ((PPartnerRow)FMainDS.PPartner.Rows[0]).PartnerKey;
     ARow.RelationName = "";
     ARow.RelationKey  = ARow.PartnerKey;
 }
 /// <summary>
 /// Code to be run after the deletion process
 /// </summary>
 /// <param name="ARowToDelete">the row that was/was to be deleted</param>
 /// <param name="AAllowDeletion">whether or not the user was permitted to delete</param>
 /// <param name="ADeletionPerformed">whether or not the deletion was performed successfully</param>
 /// <param name="ACompletionMessage">if specified, is the deletion completion message</param>
 private void PostDeleteManual(PartnerEditTDSPPartnerRelationshipRow ARowToDelete,
                               bool AAllowDeletion,
                               bool ADeletionPerformed,
                               string ACompletionMessage)
 {
     if (ADeletionPerformed)
     {
         DoRecalculateScreenParts();
     }
 }
 /// <summary>
 /// Performs checks to determine whether a deletion of the current
 ///  row is permissable
 /// </summary>
 /// <param name="ARowToDelete">the currently selected row to be deleted</param>
 /// <param name="ADeletionQuestion">can be changed to a context-sensitive deletion confirmation question</param>
 /// <returns>true if user is permitted and able to delete the current row</returns>
 private bool PreDeleteManual(PartnerEditTDSPPartnerRelationshipRow ARowToDelete, ref string ADeletionQuestion)
 {
     /*Code to execute before the delete can take place*/
     ADeletionQuestion  = Catalog.GetString("Are you sure you want to delete the current row?");
     ADeletionQuestion += String.Format("{0}{0}({1} {2})",
                                        Environment.NewLine,
                                        lblPPartnerRelationshipRelationName.Text,
                                        cmbPPartnerRelationshipRelationName.GetSelectedString());
     return(true);
 }
Ejemplo n.º 4
0
        /// <summary>
        /// Updates Description (normal and reciprocal) for given relation name in row
        /// </summary>
        public void UpdateRelationDescription(PartnerEditTDSPPartnerRelationshipRow ARow, String ANewRelationName)
        {
            PRelationTable relationTable = (PRelationTable)TDataCache.TMPartner.GetCacheablePartnerTable(TCacheablePartnerTablesEnum.RelationList);
            PRelationRow   relationRow;

            if (ARow != null)
            {
                relationRow = (PRelationRow)relationTable.Rows.Find(ANewRelationName);

                if (relationRow != null)
                {
                    ARow.RelationDescription           = relationRow.RelationDescription;
                    ARow.ReciprocalRelationDescription = relationRow.ReciprocalDescription;
                }
                else
                {
                    ARow.RelationDescription           = "";
                    ARow.ReciprocalRelationDescription = "";
                }
            }
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Updates Description (normal and reciprocal) for given relation name in row
        /// </summary>
        public void UpdateRelationDescription(PartnerEditTDSPPartnerRelationshipRow ARow, String ANewRelationName)
        {
            PRelationTable relationTable = (PRelationTable)TDataCache.TMPartner.GetCacheablePartnerTable(TCacheablePartnerTablesEnum.RelationList);
            PRelationRow relationRow;

            if (ARow != null)
            {
                relationRow = (PRelationRow)relationTable.Rows.Find(ANewRelationName);

                if (relationRow != null)
                {
                    ARow.RelationDescription = relationRow.RelationDescription;
                    ARow.ReciprocalRelationDescription = relationRow.ReciprocalDescription;
                }
                else
                {
                    ARow.RelationDescription = "";
                    ARow.ReciprocalRelationDescription = "";
                }
            }
        }
 /// <summary>
 /// Code to be run after the deletion process
 /// </summary>
 /// <param name="ARowToDelete">the row that was/was to be deleted</param>
 /// <param name="AAllowDeletion">whether or not the user was permitted to delete</param>
 /// <param name="ADeletionPerformed">whether or not the deletion was performed successfully</param>
 /// <param name="ACompletionMessage">if specified, is the deletion completion message</param>
 private void PostDeleteManual(PartnerEditTDSPPartnerRelationshipRow ARowToDelete,
     bool AAllowDeletion,
     bool ADeletionPerformed,
     string ACompletionMessage)
 {
     if (ADeletionPerformed)
     {
         DoRecalculateScreenParts();
     }
 }
 /// <summary>
 /// Performs checks to determine whether a deletion of the current
 ///  row is permissable
 /// </summary>
 /// <param name="ARowToDelete">the currently selected row to be deleted</param>
 /// <param name="ADeletionQuestion">can be changed to a context-sensitive deletion confirmation question</param>
 /// <returns>true if user is permitted and able to delete the current row</returns>
 private bool PreDeleteManual(PartnerEditTDSPPartnerRelationshipRow ARowToDelete, ref string ADeletionQuestion)
 {
     /*Code to execute before the delete can take place*/
     ADeletionQuestion = Catalog.GetString("Are you sure you want to delete the current row?");
     ADeletionQuestion += String.Format("{0}{0}({1} {2})",
         Environment.NewLine,
         lblPPartnerRelationshipRelationName.Text,
         cmbPPartnerRelationshipRelationName.GetSelectedString());
     return true;
 }
 /// <summary>
 /// manual code when adding new row
 /// </summary>
 /// <param name="ARow"></param>
 private void NewRowManual(ref PartnerEditTDSPPartnerRelationshipRow ARow)
 {
     // Initialize relation with key of this partner on both sides, needs to be changed by user
     ARow.PartnerKey = ((PPartnerRow)FMainDS.PPartner.Rows[0]).PartnerKey;
     ARow.RelationName = "";
     ARow.RelationKey = ARow.PartnerKey;
 }