Example #1
0
 public FileManager()
 {
     loDocument = new Document();
     loDocAuthor = new DocAuthor();
     loDocEditor = new DocEditor();
     loDocTag = new DocTag();
     loImage = new ImageBO();
     loImageTag = new ImageTag();
 }
Example #2
0
 public void loadEditors(string pDocumentId)
 {
     DocEditor _docEditors = new DocEditor();
     DataTable _editors = _docEditors.getEditors(pDocumentId);
     string[] _dE = new string[_editors.Rows.Count];
     int _row = 0;
     foreach (DataRow _dRow in _editors.Rows)
     {
         _dE[_row] = _dRow["EditorId"].ToString();
         _row++;
     }
     DocEditors = _dE;
 }
Example #3
0
 public bool deleteEditor(string pId, string pDocumentId)
 {
     DocEditor loDocEditor = new DocEditor();
     loDocEditor.EditorId = pId;
     loDocEditor.DocumentId = pDocumentId;
     return loDocEditor.delete();
 }
Example #4
0
 public bool saveEditors(string pEditors, string pDocumentId)
 {
     DocEditor loDocEditor = new DocEditor();
     string[] _editors = pEditors.Split(',');
     MySqlTransaction loMySqlTransaction = GlobalVariables.goMySqlConnection.BeginTransaction();
     try
     {
         foreach (string _str in _editors)
         {
             loDocEditor.EditorId = _str;
             loDocEditor.DocumentId = pDocumentId;
             loDocEditor.insert(ref loMySqlTransaction);
         }
         loMySqlTransaction.Commit();
     }
     catch (Exception ex)
     {
         loMySqlTransaction.Rollback();
         throw ex;
     }
     finally
     {
         loMySqlTransaction.Dispose();
     }
     return true;
 }