Пример #1
0
        private void CargaDatos()
        {
            oEnsamble = new WCF_Ensamble.Hersan_EnsambleClient();
            try {
                TemperaturasBE Obj = oEnsamble.PRO_Temperaturas_Obtener();
                if (Obj != null)
                {
                    txtCav1.Text    = decimal.Parse(Obj.Cav1.ToString()) == 0 ? "" : Obj.Cav1.ToString();
                    txtCav2.Text    = decimal.Parse(Obj.Cav2.ToString()) == 0 ? "" : Obj.Cav2.ToString();
                    txtCav3.Text    = decimal.Parse(Obj.Cav3.ToString()) == 0 ? "" : Obj.Cav3.ToString();
                    txtCav4.Text    = decimal.Parse(Obj.Cav4.ToString()) == 0 ? "" : Obj.Cav4.ToString();
                    txtCav5.Text    = decimal.Parse(Obj.Cav5.ToString()) == 0 ? "" : Obj.Cav5.ToString();
                    txtCav6.Text    = decimal.Parse(Obj.Cav6.ToString()) == 0 ? "" : Obj.Cav6.ToString();
                    txtCav7.Text    = decimal.Parse(Obj.Cav7.ToString()) == 0 ? "" : Obj.Cav7.ToString();
                    txtCav8.Text    = decimal.Parse(Obj.Cav8.ToString()) == 0 ? "" : Obj.Cav8.ToString();
                    txtCav9.Text    = decimal.Parse(Obj.Cav9.ToString()) == 0 ? "" : Obj.Cav9.ToString();
                    txtCav10.Text   = decimal.Parse(Obj.Cav10.ToString()) == 0 ? "" : Obj.Cav10.ToString();
                    txtCav11.Text   = decimal.Parse(Obj.Cav11.ToString()) == 0 ? "" : Obj.Cav11.ToString();
                    txtCav12.Text   = decimal.Parse(Obj.Cav12.ToString()) == 0 ? "" : Obj.Cav12.ToString();
                    txtObserva.Text = Obj.Observa;
                }

                TempMoldesBE aux = oEnsamble.PRO_TemperaturasMolde_Obtener();
                if (aux != null)
                {
                    txtFija.Text  = decimal.Parse(aux.Fija.ToString()) == 0 ? "" : aux.Fija.ToString();
                    txtMovil.Text = decimal.Parse(aux.Movil.ToString()) == 0 ? "" : aux.Movil.ToString();
                }
            } catch (Exception ex) {
                throw ex;
            } finally {
                oEnsamble = null;
            }
        }