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); }
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); }
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); }
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); }
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); }
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); }
public static List <Tags> getTagsListbyFriendsId(int Type, string FriendId) { return(TagsDAL.getTagsListbyFriendsId(Type, FriendId)); }
public static List <Tags> getTagsByUserId(string UserId) { return(TagsDAL.getTagsByUserId(UserId)); }
public static List <Tags> getTagsList(int Type, string AtId) { return(TagsDAL.getTagsList(Type, AtId)); }
public static List <string> getTagsFriendId(int Type, string AtId) { return(TagsDAL.getTagsFriendId(Type, AtId)); }
public static TagsBO getTagsByTagsId(string TagsId) { return(TagsDAL.getTagsByTagsId(TagsId)); }
public static List <Tags> getAllTagsList() { return(TagsDAL.getAllTagsList()); }
public static void updateTags(TagsBO objTags) { TagsDAL.updateTags(objTags); }
public static void deleteTags(string TagsId) { TagsDAL.deleteTags(TagsId); }
public static string insertTags(TagsBO objTags) { return(TagsDAL.insertTags(objTags)); }