Exemple #1
0
 public bool deleteAuthor(string pId, string pDocumentId)
 {
     DocAuthor loDocAuthor = new DocAuthor();
     loDocAuthor.AuthorId = pId;
     loDocAuthor.DocumentId = pDocumentId;
     return loDocAuthor.delete();
 }
Exemple #2
0
 public FileManager()
 {
     loDocument = new Document();
     loDocAuthor = new DocAuthor();
     loDocEditor = new DocEditor();
     loDocTag = new DocTag();
     loImage = new ImageBO();
     loImageTag = new ImageTag();
 }
Exemple #3
0
 public void loadAuthors(string pDocumentId)
 {
     DocAuthor _docAuthors = new DocAuthor();
     DataTable _authors = _docAuthors.getAuthors(pDocumentId);
     string[] _dA = new string[_authors.Rows.Count];
     int _row = 0;
     foreach (DataRow _dRow in _authors.Rows)
     {
         _dA[_row] = _dRow["AuthorId"].ToString();
         _row++;
     }
     DocAuthors = _dA;
 }
Exemple #4
0
 public bool saveAuthors(string pAuthors, string pDocumentId)
 {
     DocAuthor loDocAuthor = new DocAuthor();
     string[] _authors = pAuthors.Split(',');
     MySqlTransaction loMySqlTransaction = GlobalVariables.goMySqlConnection.BeginTransaction();
     try
     {
         foreach (string _str in _authors)
         {
             loDocAuthor.AuthorId = _str;
             loDocAuthor.DocumentId = pDocumentId;
             loDocAuthor.insert(ref loMySqlTransaction);
         }
         loMySqlTransaction.Commit();
     }
     catch (Exception ex)
     {
         loMySqlTransaction.Rollback();
         throw ex;
     }
     finally
     {
         loMySqlTransaction.Dispose();
     }
     return true;
 }