Esempio n. 1
0
        private void CargaDatos()
        {
            oEnsamble = new WCF_Ensamble.Hersan_EnsambleClient();
            try {
                gvDatos.DataSource = null;
                string Fecha = dtFecha.Value.Year.ToString() + dtFecha.Value.Month.ToString().PadLeft(2, '0') + dtFecha.Value.Day.ToString().PadLeft(2, '0');
                oList = oEnsamble.CAL_ResguardoQA_Obtener(int.Parse(cboProducto.SelectedValue.ToString()), Fecha);

                if (oList.Count > 0)
                {
                    txtId.Text      = oList[0].Id.ToString();
                    txtNombre.Text  = oList[0].Nombre.ToString();
                    txtPiezas.Text  = oList[0].Piezas.ToString();
                    txtMuestra.Text = oList[0].Muestra.ToString();
                    //cboProducto.SelectedValue = oList[0].Producto.Id;
                    cboCarcasa.SelectedValue     = oList[0].Carcasa.Id;
                    cboReflejante1.SelectedValue = oList[0].Reflex1.Id;
                    cboReflejante2.SelectedValue = oList[0].Reflex2.Id;
                    oDetalle = oList[0].Detalle;
                }

                gvDatos.DataSource = oDetalle;
            } catch (Exception ex) {
                throw ex;
            } finally {
                oEnsamble = null;
            }
        }