Ejemplo n.º 1
0
 public FileManager()
 {
     loDocument = new Document();
     loDocAuthor = new DocAuthor();
     loDocEditor = new DocEditor();
     loDocTag = new DocTag();
     loImage = new ImageBO();
     loImageTag = new ImageTag();
 }
Ejemplo n.º 2
0
 public void loadTags(string pImageId)
 {
     ImageTag _docTags = new ImageTag();
     DataTable _tags = _docTags.getTags(pImageId);
     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);
     Tags = _dT;
 }
Ejemplo n.º 3
0
 public bool saveImageTags(string pTags, string pImageId)
 {
     ImageTag loImageTag = new ImageTag();
     string[] _tags = pTags.Split(',');
     MySqlTransaction loMySqlTransaction = GlobalVariables.goMySqlConnection.BeginTransaction();
     try
     {
         foreach (string _str in _tags)
         {
             loImageTag.Tag = _str;
             loImageTag.ImageId = pImageId;
             loImageTag.insert(ref loMySqlTransaction);
         }
         loMySqlTransaction.Commit();
     }
     catch (Exception ex)
     {
         loMySqlTransaction.Rollback();
         throw ex;
     }
     finally
     {
         loMySqlTransaction.Dispose();
     }
     return true;
 }
Ejemplo n.º 4
0
 public bool deleteImageTag(string pTag, string pImageId)
 {
     ImageTag loImageTag = new ImageTag();
     loImageTag.Tag = pTag;
     loImageTag.ImageId = pImageId;
     return loImageTag.delete();
 }