private void CheckBoxes_checked(object sender, RoutedEventArgs e)
        {
            int count = 0;

            foreach (CheckBox cb in RiskField.FindVisualChildren <CheckBox>(UbicacionCB))
            {
                if ((bool)cb.IsChecked)
                {
                    count++;
                }
            }

            if (count > 0)
            {
                UbcGeo.SetRisk(3);
            }
            else
            {
                UbcGeo.SetRisk(1);
            }

            count = 0;
            foreach (CheckBox cb in RiskField.FindVisualChildren <CheckBox>(LugarActEcoCB))
            {
                if ((bool)cb.IsChecked)
                {
                    count++;
                }
            }

            if (count > 0 && count < 4)
            {
                LugarEco.SetRisk(count);
            }
        }
示例#2
0
        private void CheckBoxes_checked(object sender, RoutedEventArgs e)
        {
            int count = 0;

            foreach (CheckBox cb in RiskField.FindVisualChildren <CheckBox>(ProdServCB))
            {
                if ((bool)cb.IsChecked)
                {
                    count++;
                }
            }

            if (count > 0 && count < 4)
            {
                ProdServ.SetRisk(count);
            }
        }
示例#3
0
        private void radio_checked(object sender, RoutedEventArgs e)
        {
            int count;

            count = 3;
            foreach (RadioButton cb in RiskField.FindVisualChildren <RadioButton>(vspromedio))
            {
                if ((bool)cb.IsChecked)
                {
                    VSPromedioRisk.SetRisk(count);
                }
                count--;
            }

            count = 3;
            foreach (RadioButton cb in RiskField.FindVisualChildren <RadioButton>(vsingresos))
            {
                if ((bool)cb.IsChecked)
                {
                    VSIngresosRisk.SetRisk(count);
                }
                count--;
            }

            count = 2;
            foreach (RadioButton cb in RiskField.FindVisualChildren <RadioButton>(lugar_transacion))
            {
                if ((bool)cb.IsChecked)
                {
                    if (count == 2)
                    {
                        LugarTransRisk.SetRisk(3);
                    }
                    else
                    {
                        LugarTransRisk.SetRisk(count);
                    }
                }
                count--;
            }

            count = 2;
            foreach (RadioButton cb in RiskField.FindVisualChildren <RadioButton>(frecuencia))
            {
                if ((bool)cb.IsChecked)
                {
                    if (count == 2)
                    {
                        FrecueciaRisk.SetRisk(3);
                    }
                    else
                    {
                        FrecueciaRisk.SetRisk(count);
                    }
                }
                count--;
            }

            count = 3;
            foreach (RadioButton cb in RiskField.FindVisualChildren <RadioButton>(condiciones))
            {
                if ((bool)cb.IsChecked)
                {
                    CambiosRisk.SetRisk(count);
                }
                count--;
            }

            count = 3;
            foreach (RadioButton cb in RiskField.FindVisualChildren <RadioButton>(inusuales))
            {
                if ((bool)cb.IsChecked)
                {
                    HistInusualRisk.SetRisk(count);
                }
                count--;
            }

            count = 3;
            foreach (RadioButton cb in RiskField.FindVisualChildren <RadioButton>(judicial))
            {
                if ((bool)cb.IsChecked)
                {
                    StatulJudicialRisk.SetRisk(count);
                }
                count--;
            }
        }