public static Boolean PersistirNewsletter(string sTitulo, string sTexto, string sArchivo) { Boolean bResp = false; TuCuento.DAL.Newsletter_DAL oDAL = new TuCuento.DAL.Newsletter_DAL(); if (oDAL.AgregarNewsletter(sTitulo, sTexto, sArchivo)) bResp = true; return bResp; }
public static Boolean PersistirSuscripcion(string sEmail, int nHab) { Boolean bResp = false; DataTable dtSuscripcion = new DataTable(); TuCuento.DAL.Newsletter_DAL oDAL = new TuCuento.DAL.Newsletter_DAL(); TuCuento.DAL.Newsletter_DAL.TraerSuscripcion(sEmail,-1, dtSuscripcion); if (dtSuscripcion.Rows.Count == 0) { if (oDAL.AgregarSuscripcion(sEmail,nHab)) bResp = true; } else { if (oDAL.ActualizarSuscripcion(sEmail, nHab)) bResp = true; } return bResp; }