private DataTable GetPartnerAttributeSystemCategoryListTable(TDBTransaction AReadTransaction, string ATableName) { PPartnerAttributeCategoryRow template = new PPartnerAttributeCategoryTable().NewRowTyped(false); template.SystemCategory = true; return(PPartnerAttributeCategoryAccess.LoadUsingTemplate(template, null, null, AReadTransaction)); }
/// <summary> /// Creates an initial Contact Type for a new Contact Category. Call this when a new Contact Category is created. /// </summary> /// <param name="ACategoryCode">The Category Code associated with the new Contact Category.</param> /// <param name="APartnerAttributeCategoryDT">The PartnerAttributeCategory Table held in the Form's FMainDS DataSet.</param> public void CreateFirstContactType(string ACategoryCode, PPartnerAttributeCategoryTable APartnerAttributeCategoryDT) { FContactCategory = ACategoryCode; // We need to know about the Partner Attribute Category Table for a check in PreDeleteManual! FPartnerAttributeCategoryDT = APartnerAttributeCategoryDT; NewRecord(null, null); }
private DataTable GetPartnerAttributeSystemCategoryListTable(TDBTransaction AReadTransaction, string ATableName) { PPartnerAttributeCategoryRow template = new PPartnerAttributeCategoryTable().NewRowTyped(false); template.SystemCategory = true; TSharedDataCache.TMPartner.MarkSystemCategorySettingsConcatStrNeedsRefreshing(); return(PPartnerAttributeCategoryAccess.LoadUsingTemplate(template, null, null, AReadTransaction)); }
private DataTable GetPartnerAttributeSystemCategoryTypeListTable(TDBTransaction AReadTransaction, string ATableName) { PPartnerAttributeCategoryRow template = new PPartnerAttributeCategoryTable().NewRowTyped(false); template.SystemCategory = true; return(PPartnerAttributeTypeAccess.LoadViaPPartnerAttributeCategoryTemplate(template, null, null, AReadTransaction, StringHelper.InitStrArr(new String[] { "ORDER BY", PPartnerAttributeTypeTable.GetTableDBName() + "." + PPartnerAttributeTypeTable.GetIndexDBName() + " ASC" }), 0, 0)); }
/// <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(PPartnerAttributeTypeRow ARowToDelete, ref string ADeletionQuestion) { // If the last Row in the Grid is to be deleted: check if there are added 'Detail' Rows in *other* 'Master' Rows, // and if any of those 'Master' Rows was added too, tell the user that data needs to be saved first before deletion // of the present 'Detail' Row can go ahead. // The reason for that is that the deletion of that last 'Detail' Row will cause the OnNoMoreDetailRecords Event to // be raised by the UserControl, which in turn will cause the Form to call the 'SaveChanges' Method of the // UserControl before the Form saves its own data. While this in itself is OK, saving in the 'SaveChanges' Method // of the UserControl would fail as a 'Master' Row itself was newly added AND it wouldn't be in the DB yet! return(TDeleteGridRows.MasterDetailFormsSpecialPreDeleteCheck(this.Count, FPartnerAttributeCategoryDT, FMainDS.PPartnerAttributeType, PPartnerAttributeCategoryTable.GetCategoryCodeDBName(), PPartnerAttributeTypeTable.GetCategoryCodeDBName())); }
private DataTable GetContactCategoryListTable(TDBTransaction AReadTransaction, string ATableName) { PPartnerAttributeCategoryRow template = new PPartnerAttributeCategoryTable().NewRowTyped(false); template.PartnerContactCategory = true; template.SystemCategory = false; TSharedDataCache.TMPartner.MarkPartnerContactDetailAttributeTypesConcatStrNeedsRefreshing(); TSharedDataCache.TMPartner.MarkEmailPartnerAttributesConcatStrNeedsRefreshing(); TSharedDataCache.TMPartner.MarkPhonePartnerAttributesConcatStrNeedsRefreshing(); return(PPartnerAttributeCategoryAccess.LoadUsingTemplate(template, null, null, AReadTransaction, StringHelper.InitStrArr(new String[] { "ORDER BY", PPartnerAttributeCategoryTable.GetIndexDBName() + " ASC" }), 0, 0)); }
/// <summary> /// dummy implementation of this method so autogenerated code works /// </summary> public void InitUserControl() { rtbContactDetails.BuildLinkWithValue = BuildLinkWithValue; FPartnerAttributeCategoryDT = (PPartnerAttributeCategoryTable)TDataCache.TMPartner.GetCacheablePartnerTable2(TCacheablePartnerTablesEnum. ContactCategoryList, PPartnerAttributeCategoryTable.GetTableName()); FPartnerAttributeTypeDT = (PPartnerAttributeTypeTable)TDataCache.TMPartner.GetCacheablePartnerTable2( TCacheablePartnerTablesEnum.ContactTypeList, PPartnerAttributeTypeTable.GetTableName()); FPetraUtilsObject.SetToolTip(btnReload, Catalog.GetString("Reload Partner Info")); }
private DataTable GetPartnerAttributeSystemCategoryListTable(TDBTransaction AReadTransaction, string ATableName) { PPartnerAttributeCategoryRow template = new PPartnerAttributeCategoryTable().NewRowTyped(false); template.SystemCategory = true; return PPartnerAttributeCategoryAccess.LoadUsingTemplate(template, null, null, AReadTransaction); }
private DataTable GetPartnerAttributeSystemCategoryTypeListTable(TDBTransaction AReadTransaction, string ATableName) { PPartnerAttributeCategoryRow template = new PPartnerAttributeCategoryTable().NewRowTyped(false); template.SystemCategory = true; return PPartnerAttributeTypeAccess.LoadViaPPartnerAttributeCategoryTemplate(template, null, null, AReadTransaction, StringHelper.InitStrArr(new String[] { "ORDER BY", PPartnerAttributeTypeTable.GetTableDBName() + "." + PPartnerAttributeTypeTable.GetIndexDBName() + " ASC" }), 0, 0); }
private DataTable GetPartnerAttributeSystemCategoryListTable(TDBTransaction AReadTransaction, string ATableName) { PPartnerAttributeCategoryRow template = new PPartnerAttributeCategoryTable().NewRowTyped(false); template.SystemCategory = true; TSharedDataCache.TMPartner.MarkSystemCategorySettingsConcatStrNeedsRefreshing(); return PPartnerAttributeCategoryAccess.LoadUsingTemplate(template, null, null, AReadTransaction); }
private DataTable GetContactTypeListTable(TDBTransaction AReadTransaction, string ATableName) { PPartnerAttributeCategoryRow template = new PPartnerAttributeCategoryTable().NewRowTyped(false); template.PartnerContactCategory = true; template.SystemCategory = false; TSharedDataCache.TMPartner.MarkPartnerContactDetailAttributeTypesConcatStrNeedsRefreshing(); TSharedDataCache.TMPartner.MarkEmailPartnerAttributesConcatStrNeedsRefreshing(); TSharedDataCache.TMPartner.MarkPhonePartnerAttributesConcatStrNeedsRefreshing(); return PPartnerAttributeTypeAccess.LoadViaPPartnerAttributeCategoryTemplate(template, null, null, AReadTransaction, StringHelper.InitStrArr(new String[] { "ORDER BY", PPartnerAttributeTypeTable.GetTableDBName() + "." + PPartnerAttributeTypeTable.GetIndexDBName() + " ASC" }), 0, 0); }