예제 #1
0
        public bool Eliminar(int id)
        {
            bool result = false;

            try
            {
                TagsDAL mod = new TagsDAL(_connectionString);
                result = mod.Eliminar(id);
            }
            catch (Exception er)
            {
                log.Error(string.Format("Eliminar({0})", id), er);
                result = false;
            }

            return(result);
        }
예제 #2
0
        public List <Tag> GetTagsByProvider(int Id_Provider)
        {
            List <DTO.Tag> result = null;

            try
            {
                TagsDAL tagModel = new TagsDAL(_connectionString);

                var tags = tagModel.GetTagsByProvider(Id_Provider) as List <DAL.DTO.Tag>;
                result = Converter.ConvertToBL(tags);
            }
            catch (Exception ex)
            {
                log.Error("GetTagsByProvider()", ex);
            }
            return(result);
        }
예제 #3
0
        public int Agregar(Tag tag)
        {
            int id = -1;

            try
            {
                DAL.DTO.Tag tagDal = Converter.ConvertToDAL(tag);

                TagsDAL mod = new TagsDAL(_connectionString);
                id = mod.Agregar(tagDal);
            }
            catch (Exception er)
            {
                log.Error("Agregar()", er);
            }

            return(id);
        }
예제 #4
0
        public bool Modificar(Tag tag)
        {
            bool result = false;

            try
            {
                DAL.DTO.Tag tagDal = Converter.ConvertToDAL(tag);

                TagsDAL mod = new TagsDAL(_connectionString);
                result = mod.Modificar(tagDal);
            }
            catch (Exception er)
            {
                log.Error("Modificar()", er);
                result = false;
            }

            return(result);
        }
예제 #5
0
        public List <Tag> Listar()
        {
            List <Tag> result = null;

            try
            {
                TagsDAL tagModel = new TagsDAL(_connectionString);

                var tags = tagModel.Listar() as List <DAL.DTO.Tag>;
                result = Converter.ConvertToBL(tags);

                // TODO: El listado de datos hay que ponerlo que cargue de la caché, y revisar los metodos agregar, etc, de momento para esta versión no da tiempo
                //Diccionario_Agregar(result);
            }
            catch (Exception ex)
            {
                log.Error("Listar()", ex);
            }
            return(result);
        }
예제 #6
0
        public Tag Detalles(int id)
        {
            Tag result = null;

            try
            {
                string nombreCache = string.Format("tag{0}", id);

                if (!CacheData.Exist(nombreCache))
                {
                    TagsDAL mod = new TagsDAL(_connectionString);
                    var     tag = mod.Detalles(id);

                    result = Converter.ConvertToBL(tag);


                    //result = Diccionario_Get(id);

                    if (result != null)
                    {
                        // Guardamos en caché para la próxima
                        CacheData.Add(nombreCache, result);
                    }
                }
                else
                {
                    result = (Tag)CacheData.Get(nombreCache);
                }
            }
            catch (Exception er)
            {
                log.Error(string.Format("Detalles({0})", id), er);
            }

            return(result);
        }
예제 #7
0
 public static List <Tags> getTagsListbyFriendsId(int Type, string FriendId)
 {
     return(TagsDAL.getTagsListbyFriendsId(Type, FriendId));
 }
예제 #8
0
 public static List <Tags> getTagsByUserId(string UserId)
 {
     return(TagsDAL.getTagsByUserId(UserId));
 }
예제 #9
0
 public static List <Tags> getTagsList(int Type, string AtId)
 {
     return(TagsDAL.getTagsList(Type, AtId));
 }
예제 #10
0
 public static List <string> getTagsFriendId(int Type, string AtId)
 {
     return(TagsDAL.getTagsFriendId(Type, AtId));
 }
예제 #11
0
 public static TagsBO getTagsByTagsId(string TagsId)
 {
     return(TagsDAL.getTagsByTagsId(TagsId));
 }
예제 #12
0
 public static List <Tags> getAllTagsList()
 {
     return(TagsDAL.getAllTagsList());
 }
예제 #13
0
 public static void updateTags(TagsBO objTags)
 {
     TagsDAL.updateTags(objTags);
 }
예제 #14
0
 public static void deleteTags(string TagsId)
 {
     TagsDAL.deleteTags(TagsId);
 }
예제 #15
0
 public static string insertTags(TagsBO objTags)
 {
     return(TagsDAL.insertTags(objTags));
 }