public FileManager() { loDocument = new Document(); loDocAuthor = new DocAuthor(); loDocEditor = new DocEditor(); loDocTag = new DocTag(); loImage = new ImageBO(); loImageTag = new ImageTag(); }
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; }
public bool deleteEditor(string pId, string pDocumentId) { DocEditor loDocEditor = new DocEditor(); loDocEditor.EditorId = pId; loDocEditor.DocumentId = pDocumentId; return loDocEditor.delete(); }
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; }