Ejemplo n.º 1
0
        private void btnBuscar_Click(object sender, EventArgs e)
        {
            oEnsamble = new WCF_Ensamble.Hersan_EnsambleClient();

            try {
                CalidadBE Obj = new CalidadBE();
                Obj.Inyeccion.OP            = txtOp.Text;
                Obj.Inyeccion.Color.Nombre  = cboColores.SelectedValue.ToString();
                Obj.Inyeccion.Detalle.Lista = txtLista.Text;
                Obj.Inyeccion.Detalle.Turno = txtTurno.Text;
                Obj.Operador = txtOperador.Text;

                oList = oEnsamble.CAL_InspeccionInyeccion_Analisis(Obj);
                if (oList.Count > 0)
                {
                    gvDatos.DataSource = oList;
                }
                else
                {
                    gvDatos.DataSource   = null;
                    gvDetalle.DataSource = null;
                    gvResumen.DataSource = null;;
                    RadMessageBox.Show("No existe información con los criterios seleccionados", this.Text, MessageBoxButtons.OK, RadMessageIcon.Info);
                }
            } catch (Exception ex) {
                RadMessageBox.Show("Ocurrió un error al obtener la información\n" + ex.Message, this.Text, MessageBoxButtons.OK, RadMessageIcon.Error);
            } finally {
                oEnsamble = null;
            }
        }