Exemplo n.º 1
0
        private void CargarDatos()
        {
            oEnsamble = new WCF_Ensamble.Hersan_EnsambleClient();
            try {
                if (!Ensamble)
                {
                    oList = oEnsamble.CAL_AnalisisInyeccion_Histograma(Lista);
                    //gvResumen.DataSource = Resumen;

                    if (oList.Count > 0)
                    {
                        foreach (var crtl in PageView.Pages)
                        {
                            if (crtl.Name.Contains("1"))
                            {
                                crtl.Enabled = oList[0].Cav1;
                            }
                            else if (crtl.Name.Contains("2"))
                            {
                                crtl.Enabled = oList[0].Cav2;
                            }
                            else if (crtl.Name.Contains("3"))
                            {
                                crtl.Enabled = oList[0].Cav3;
                            }
                            else if (crtl.Name.Contains("4"))
                            {
                                crtl.Enabled = oList[0].Cav4;
                            }
                            else if (crtl.Name.Contains("5"))
                            {
                                crtl.Enabled = oList[0].Cav5;
                            }
                            else if (crtl.Name.Contains("6"))
                            {
                                crtl.Enabled = oList[0].Cav6;
                            }
                            else if (crtl.Name.Contains("7"))
                            {
                                crtl.Enabled = oList[0].Cav7;
                            }
                            else if (crtl.Name.Contains("8"))
                            {
                                crtl.Enabled = oList[0].Cav8;
                            }
                        }
                    }
                }
                else
                {
                    if (oHistoria == null)
                    {
                        oHistoria = oEnsamble.CAL_InspeccionEnsamble_Histograma(Lista);
                    }
                }
            } catch (Exception ex) {
                throw ex;
            } finally {
                oEnsamble = null;
            }
        }