/// <summary> /// Delete Notes Classificaton by Classification Nid /// </summary> /// <param name="classificationNids">Comma separated NIDs</param> /// <returns >Count Of Records Updated</returns> public int DeleteNotesClassification(string classificationNids) { int RetVal = 0; string LanguageCode = string.Empty; DITables TableNames; string SqlQuery = string.Empty; string AssociatedNotesNids=string.Empty; NotesBuilder NoteBuilder=new NotesBuilder(this.DBConnection,this.DBQueries); try { foreach (DataRow Row in this.DBConnection.DILanguages(this.DBQueries.DataPrefix).Rows) { LanguageCode = Convert.ToString(Row[Language.LanguageCode]); TableNames = new DITables(this.DBQueries.DataPrefix, "_" + LanguageCode); SqlQuery = DevInfo.Lib.DI_LibDAL.Queries.Notes.Delete.DeleteFrmNotesClassification(TableNames.NotesClassification, classificationNids); RetVal = this.DBConnection.ExecuteNonQuery(SqlQuery); AssociatedNotesNids = DIConnection.GetDelimitedValuesFromDataTable(NoteBuilder.GetNotesByNotesNid(string.Empty, string.Empty, string.Empty, classificationNids, CheckedStatus.All,FieldSelection.Light), Notes.NotesNId); NoteBuilder.DeleteComments(AssociatedNotesNids); } } catch (Exception ex) { throw new ApplicationException(ex.Message); } return RetVal; }
/// <summary> /// Delete Notes Classificaton by Classification Nid /// </summary> /// <param name="classificationNids">Comma separated NIDs</param> /// <returns >Count Of Records Updated</returns> public int DeleteNotesClassification(string classificationNids) { int RetVal = 0; string LanguageCode = string.Empty; DITables TableNames; string SqlQuery = string.Empty; string AssociatedNotesNids = string.Empty; NotesBuilder NoteBuilder = new NotesBuilder(this.DBConnection, this.DBQueries); try { foreach (DataRow Row in this.DBConnection.DILanguages(this.DBQueries.DataPrefix).Rows) { LanguageCode = Convert.ToString(Row[Language.LanguageCode]); TableNames = new DITables(this.DBQueries.DataPrefix, "_" + LanguageCode); SqlQuery = DevInfo.Lib.DI_LibDAL.Queries.Notes.Delete.DeleteFrmNotesClassification(TableNames.NotesClassification, classificationNids); RetVal = this.DBConnection.ExecuteNonQuery(SqlQuery); AssociatedNotesNids = DIConnection.GetDelimitedValuesFromDataTable(NoteBuilder.GetNotesByNotesNid(string.Empty, string.Empty, string.Empty, classificationNids, CheckedStatus.All, FieldSelection.Light), Notes.NotesNId); NoteBuilder.DeleteComments(AssociatedNotesNids); } } catch (Exception ex) { throw new ApplicationException(ex.Message); } return(RetVal); }