Beispiel #1
0
        private void CargarDatos()
        {
            Publicacion publicacion = mapper.ObtenerPublicacion(idPublicacion);

            textBox_Descripcion.Text = publicacion.GetDescripcion();
            textBox_Precio.Text      = publicacion.GetPrecio();
            textBox_Stock.Text       = publicacion.GetStock();
            Decimal rubroId = Convert.ToInt32(mapper.SelectFromWhere("rubro_id", "Rubro_x_Publicacion", "publi_id", idPublicacion));

            comboBox_Rubro.SelectedValue       = Convert.ToString(mapper.SelectFromWhere("rubro_desc_larga", "Rubros", "rubro_id", rubroId));
            comboBox_Visibilidad.SelectedValue = Convert.ToString(mapper.SelectFromWhere("visib_desc", "Visibilidad", "visib_id", publicacion.GetIdVisibilidad()));

            comboBox_TiposDePublicacion.Text = publicacion.GetTipo();

            comboBox_Estado.SelectedValue = Convert.ToString(mapper.SelectFromWhere("estado_desc", "Estado", "estado_id", publicacion.GetEstado()));
            checkBox_Pregunta.Checked     = Convert.ToBoolean(mapper.SelectFromWhere("publi_preguntas", "Publicaciones", "publi_id", idPublicacion));
        }