예제 #1
0
 public FileManager()
 {
     loDocument = new Document();
     loDocAuthor = new DocAuthor();
     loDocEditor = new DocEditor();
     loDocTag = new DocTag();
     loImage = new ImageBO();
     loImageTag = new ImageTag();
 }
예제 #2
0
 public void loadTags(string pDocumentId)
 {
     DocTag _docTags = new DocTag();
     DataTable _tags = _docTags.getTags(pDocumentId);
     string _dT = "";
     int _row = 0;
     foreach (DataRow _dRow in _tags.Rows)
     {
         _dT = _dT + _dRow["Tag"].ToString() + ",";
         _row++;
     }
     if(_dT.Length > 1)
         _dT = _dT.Substring(0, _dT.Length - 1);
     DocTags = _dT;
 }
예제 #3
0
 public bool saveTags(string pTags, string pDocumentId)
 {
     DocTag loDocTag = new DocTag();
     string[] _tags = pTags.Split(',');
     MySqlTransaction loMySqlTransaction = GlobalVariables.goMySqlConnection.BeginTransaction();
     try
     {
         foreach (string _str in _tags)
         {
             loDocTag.Tag = _str;
             loDocTag.DocumentId = pDocumentId;
             loDocTag.insert(ref loMySqlTransaction);
         }
         loMySqlTransaction.Commit();
     }
     catch (Exception ex)
     {
         loMySqlTransaction.Rollback();
         throw ex;
     }
     finally
     {
         loMySqlTransaction.Dispose();
     }
     return true;
 }
예제 #4
0
 public bool deleteTag(string pId, string pDocumentId)
 {
     DocTag loDocTag = new DocTag();
     loDocTag.Tag = pId;
     loDocTag.DocumentId = pDocumentId;
     return loDocTag.delete();
 }