Exemplo n.º 1
0
        private void BtnGuardar_OnClick(object sender, RoutedEventArgs e)
        {
            try
            {
                if (ValidaGuardar())
                {
                    var registroVigilanciaHumedadBL = new RegistroVigilanciaHumedadBL();
                    registroVigilanciaHumedadBL.Guardar(Contexto);

                    SkMessageBox.Show(Application.Current.Windows[ConstantesVista.WindowPrincipal],
                                      Properties.Resources.CapturaHumedad_GuardadoExito, MessageBoxButton.OK,
                                      MessageImage.Correct);
                    InicializaContexto();
                }
            }
            catch (Exception ex)
            {
                Logger.Error(ex);
                SkMessageBox.Show(Application.Current.Windows[ConstantesVista.WindowPrincipal],
                                  Properties.Resources.CapturaHumedad_ErrorGuardar, MessageBoxButton.OK,
                                  MessageImage.Error);
            }
        }