public void Page_PageTypeSave( int[] pageIDs, int pageTypeID, int userID ) { TransactionController transactionController = new TransactionController(); try { transactionController.BeginTransaction(); int index = 0; Page_PageType ppt = new Page_PageType(); ppt.PageTypeID = pageTypeID; ppt.Verified = true; for ( index = 0; index < pageIDs.Length; index++ ) { ppt.PageID = pageIDs[ index ]; this.Page_PageTypeSave( ppt, userID, transactionController ); } transactionController.CommitTransaction(); } catch { transactionController.RollbackTransaction(); } finally { transactionController.Dispose(); } }
public void IndicatedPageDeleteAllForPage( int[] pageIDs, int userID ) { int index = 0; TransactionController transactionController = new TransactionController(); try { transactionController.BeginTransaction(); for ( index = 0; index < pageIDs.Length; index++ ) { this.IndicatedPageDeleteAllForPage( pageIDs[ index ], userID, transactionController ); } transactionController.CommitTransaction(); } catch { transactionController.RollbackTransaction(); } finally { transactionController.Dispose(); } }
public void IndicatedPageSave( int[] pageIDs, string pagePrefix, IndicatedPageStyle style, string start, int increment, bool implied, int userID) { int pageNumber; string pageNumberRoman; TransactionController transactionController = new TransactionController(); try { transactionController.BeginTransaction(); switch ( style ) { case IndicatedPageStyle.Integer: pageNumber = int.Parse( start ); for ( int index = 0; index < pageIDs.Length; index++ ) { this.IndicatedPageSave( pageIDs[ index ], pagePrefix, pageNumber.ToString(), implied, userID, transactionController ); pageNumber = pageNumber + increment; } break; case IndicatedPageStyle.LowerRomanIV: pageNumber = RomanNumerals.FromRomanNumeral( start ); pageNumberRoman = ""; for ( int index = 0; index < pageIDs.Length; index++ ) { pageNumberRoman = RomanNumerals.ToRomanNumeral( pageNumber, true ).ToLower(); this.IndicatedPageSave( pageIDs[ index ], pagePrefix, pageNumberRoman, implied, userID, transactionController ); pageNumber = pageNumber + increment; } break; case IndicatedPageStyle.UpperRomanIV: pageNumber = RomanNumerals.FromRomanNumeral( start ); pageNumberRoman = ""; for ( int index = 0; index < pageIDs.Length; index++ ) { pageNumberRoman = RomanNumerals.ToRomanNumeral( pageNumber, true ); this.IndicatedPageSave( pageIDs[ index ], pagePrefix, pageNumberRoman, implied, userID, transactionController ); pageNumber = pageNumber + increment; } break; case IndicatedPageStyle.LowerRomanIIII: pageNumber = RomanNumerals.FromRomanNumeral( start ); pageNumberRoman = ""; for ( int index = 0; index < pageIDs.Length; index++ ) { pageNumberRoman = RomanNumerals.ToRomanNumeral( pageNumber, false ).ToLower(); this.IndicatedPageSave( pageIDs[ index ], pagePrefix, pageNumberRoman, implied, userID, transactionController ); pageNumber = pageNumber + increment; } break; case IndicatedPageStyle.UpperRomanIIII: pageNumber = RomanNumerals.FromRomanNumeral( start ); pageNumberRoman = ""; for ( int index = 0; index < pageIDs.Length; index++ ) { pageNumberRoman = RomanNumerals.ToRomanNumeral( pageNumber, false ); this.IndicatedPageSave( pageIDs[ index ], pagePrefix, pageNumberRoman, implied, userID, transactionController ); pageNumber = pageNumber + increment; } break; case IndicatedPageStyle.FreeForm: for ( int index = 0; index < pageIDs.Length; index++ ) { this.IndicatedPageSave( pageIDs[ index ], pagePrefix, start, implied, userID, transactionController ); } break; } transactionController.CommitTransaction(); } catch { transactionController.RollbackTransaction(); } finally { transactionController.Dispose(); } }
private void IndicatedPageSave( int pageID, string pagePrefix, string pageNumber, bool implied, int userID, TransactionController transactionController) { IndicatedPageDAL dal = new IndicatedPageDAL(); dal.IndicatedPageInsertNext( transactionController.Connection, transactionController.Transaction, pageID, pagePrefix, pageNumber, implied, userID ); dal = null; PageSetPaginationInfo( pageID, userID, transactionController ); }
private void IndicatedPageDeleteAllForPage( int pageID, int userID, TransactionController transactionController ) { new IndicatedPageDAL().IndicatedPageDeleteAllForPage( transactionController.Connection, transactionController.Transaction, pageID ); PageSetPaginationInfo( pageID, userID, transactionController ); }
private void Page_PageTypeSave( Page_PageType value, int userID, TransactionController transactionController ) { GetPage_PageTypeDalInstance().Page_PageTypeSave( transactionController.Connection, transactionController.Transaction, value, userID ); PageSetPaginationInfo( value.PageID, userID, transactionController ); }
private void Page_PageTypeDeleteAllForPage( int pageID, int userID, TransactionController transactionController ) { GetPage_PageTypeDalInstance().Page_PageTypeDeleteAllForPage( transactionController.Connection, transactionController.Transaction, pageID ); PageSetPaginationInfo( pageID, userID, transactionController ); }