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