Пример #1
0
        public void FillGrid()
        {
            datImagen datImg = new datImagen();

            gridControl1.DataSource = datImg.Consultar();
            if (gridControl1.DataSource == null)
            {
                MessageBox.Show(msj.NoDatos, msj.Titulo, MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Пример #2
0
 private void btnConsultar_Click(object sender, EventArgs e)
 {
     try
     {
         var item = dtimg.Consultar(Convert.ToInt32((txtCodigo.Text == "") ? "0" : txtCodigo.Text));
         if (item.Imagen != null)
         {
             txtDescripcion.Text         = item.Descripcion;
             pictureBox1.BackgroundImage = System.Drawing.Image.FromStream(item.ayuda);
             pictureEdit1.Visible        = false;
         }
         else
         {
             MessageBox.Show("No existe Registro");
         }
     }
     catch (Exception)
     {
     }
 }