Пример #1
0
        private void CargaGrid()
        {
            oEnsamble = new WCF_Ensamble.Hersan_EnsambleClient();
            oDetalle.Clear();
            try {
                Flag = false;
                EnsambleParametrosBE obj = new EnsambleParametrosBE();
                obj.OP    = txtOP.Text;
                obj.Lista = txtLista.Text.Trim().Length != 0 ? int.Parse(txtLista.Text) : 0;

                oList = oEnsamble.PRO_Ensamble_Parametros_Obtener(obj);

                if (oList.Count > 0)
                {
                    oDetalle = oList[0].Detalle;

                    txtId.Text = oList[0].Id.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;
                }
                gvDatos.DataSource = null;
                gvDatos.DataSource = oDetalle;
            } catch (Exception ex) {
                throw ex;
            } finally {
                oEnsamble = null;
                Flag      = true;
            }
        }