internal static Vendedor Login(string email, string password) { try { List <Vendedor> vendedores = new List <Vendedor>(); DataTable dt = DAOBase.GetDataTableWhere(new Vendedor(), string.Format("Email = '{0}' AND Password = '******'", email, password)); if (dt.Rows.Count > 0) { Vendedor vendedor = new Vendedor(); PoblarObjetoDesdeDataRow(vendedor, dt.Rows[0]); return(vendedor); } else { return(null); } } catch (Exception) { throw; } }
internal static List <Foto> GetFotosDelInmueble(int inmuebleId) { try { //Instanciamos una lista de Fotos que es la que vamos a retornar List <Foto> fotos = new List <Foto>(); //Hasta aca la lista esta vacia //Le pedimos a la bd que nos de todos los Fotos DataTable dt = DAOBase.GetDataTableWhere(new Foto(), string.Format("InmuebleId = {0}", inmuebleId)); if (dt.Rows.Count > 0) { //Aca llenamos la lista de Fotos fotos = LlenarFotos(new Foto(), dt); } //Retornamos la lista de vendedores return(fotos); } catch (Exception) { throw; } }