public void AtualizarBanner(tblBanner banner) { try { tblBanner bNew = new tblBanner(); bNew.SetIsLoaded(true); bNew.SetIsNew(false); bNew.SetKeyValue(banner.id_banner); bNew.dt_cadastro = banner.dt_cadastro; bNew.is_ativo = banner.is_ativo; bNew.nome = banner.nome; bNew.nome_arquivo = banner.nome_arquivo; bNew.path = banner.path; bNew.path_thumb = banner.path_thumb; bNew.nome_arquivo_thumb = banner.nome_arquivo_thumb; bNew.descricao = banner.descricao; bNew.Update(); } catch (Exception e) { throw e; } }
public void DeletaBannerSite(string idBanner) { try { tblBanner banner = new tblBanner(); banner.id_banner = Convert.ToInt32(idBanner); banner.SetKeyValue(idBanner); new BannerSiteAC().DeletaBannerSite(banner); } catch (Exception e) { throw e; } }