コード例 #1
0
        private void CargarDatos()
        {
            oEnsamble = new WCF_Ensamble.Hersan_EnsambleClient();
            try {
                oList = oEnsamble.CAL_AnalisisInyeccion_GraficaControl(Lista, "20190708");

                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;
                        }
                    }
                }
            } catch (Exception ex) {
                throw ex;
            } finally {
                oEnsamble = null;
            }
        }