/// <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(PPartnerAttributeCategoryRow ARowToDelete, bool AAllowDeletion, bool ADeletionPerformed, string ACompletionMessage) { if (ADeletionPerformed) { // If the Row that got selected for deletion wasn't the last Row then we need to adjust the // Index of the following Rows if (FIndexOfDeletedRow != grdDetails.Rows.Count - 1) { FIndexedGridRowsHelper.AdjustIndexesOfFollowingRows(GetSelectedRowIndex(), false); } } }
private void ShowDetailsManual(PPartnerAttributeCategoryRow ARow) { if (ARow == null) { pnlDetails.Enabled = false; ucoValues.Enabled = false; } else { pnlDetails.Enabled = true; ucoValues.Enabled = true; // Pass the category code to the user control - it will then update itself ucoValues.SetCategoryCode(txtDetailCategoryCode.Text); } // Need to do the enabling/disabling of the Delete button manually as no auto-generated code // gets created since we have our own Delete handling ('DeleteRecord' Method in ManualCode file) btnDelete.Enabled = pnlDetails.Enabled && chkDetailDeletable.Checked; FIndexedGridRowsHelper.UpdateButtons(GetSelectedRowIndex()); }
private void NewRowManual(ref PPartnerAttributeCategoryRow ARow) { string NewName = Catalog.GetString("NEWCATEGORY"); Int32 CountNewDetail = 0; if (FMainDS.PPartnerAttributeCategory.Rows.Find(new object[] { NewName }) != null) { while (FMainDS.PPartnerAttributeCategory.Rows.Find(new object[] { NewName + CountNewDetail.ToString() }) != null) { CountNewDetail++; } NewName += CountNewDetail.ToString(); } ARow.CategoryCode = NewName; ARow.PartnerContactCategory = true; ARow.Deletable = true; // all manually created Contact Categories are deletable // Determine and set the 'Index' (ARow.Index in this case) of the new Row FIndexedGridRowsHelper.DetermineIndexForNewRow(ARow); }
private void GetDetailDataFromControlsManual(PPartnerAttributeCategoryRow ARow) { // Tell the user control to get its data, too ucoValues.GetDetailsFromControls(); }
/// <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(PPartnerAttributeCategoryRow ARowToDelete, ref string ADeletionQuestion) { FIndexOfDeletedRow = grdDetails.DataSourceRowToIndex2(ARowToDelete); return(true); }
/// <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(PPartnerAttributeCategoryRow ARowToDelete, ref string ADeletionQuestion) { FIndexOfDeletedRow = grdDetails.DataSourceRowToIndex2(ARowToDelete); return true; }