/// <summary>
        /// Metodo que valida los datos para guardar
        /// </summary>
        /// <returns></returns>
        private bool ValidaGuardar()
        {
            bool   resultado = true;
            string mensaje   = string.Empty;

            try
            {
                if (Contexto.IndicadorInfo == null || Contexto.IndicadorInfo.IndicadorId == 0)
                {
                    resultado = false;
                    mensaje   = Properties.Resources.IndicadorProductoEdicion_MsgIndicadorIDRequerida;
                    skAyudaIndicador.Focus();
                }
                else if (Contexto.Producto == null || Contexto.Producto.ProductoId == 0)
                {
                    resultado = false;
                    mensaje   = Properties.Resources.IndicadorProductoEdicion_MsgProductoIDRequerida;
                    skAyudaProducto.AsignarFoco();
                }
                else if (cmbActivo.SelectedItem == null)
                {
                    resultado = false;
                    mensaje   = Properties.Resources.IndicadorProductoEdicion_MsgActivoRequerida;
                    cmbActivo.Focus();
                }
                else
                {
                    int indicadorProductoId = Contexto.IndicadorProductoId;

                    var indicadorProductoPL = new IndicadorProductoPL();
                    IndicadorProductoInfo indicadorProducto =
                        indicadorProductoPL.ObtenerPorIndicadorProducto(Contexto);
                    if (indicadorProducto != null &&
                        (indicadorProductoId == 0 || indicadorProductoId != indicadorProducto.IndicadorProductoId))
                    {
                        resultado = false;
                        mensaje   = string.Format(Properties.Resources.IndicadorProductoEdicion_MsgDescripcionExistente, indicadorProducto.IndicadorProductoId);
                    }
                }
            }
            catch (Exception ex)
            {
                throw new ExcepcionDesconocida(MethodBase.GetCurrentMethod(), ex);
            }

            if (!string.IsNullOrWhiteSpace(mensaje))
            {
                SkMessageBox.Show(this, mensaje, MessageBoxButton.OK, MessageImage.Warning);
            }
            return(resultado);
        }
 private void ObtenerIndicadorProducto()
 {
     try
     {
         var indicadorProductoPL = new IndicadorProductoPL();
         IndicadorProductoInfo indicadorProducto =
             indicadorProductoPL.ObtenerPorIndicadorProducto(Contexto.IndicadorProducto);
         if (indicadorProducto != null)
         {
             Contexto.IndicadorProducto.IndicadorProductoId = indicadorProducto.IndicadorProductoId;
         }
     }
     catch (Exception ex)
     {
         Logger.Error(ex);
         SkMessageBox.Show(this, Properties.Resources.IndicadorProductoBoleta_ErrorGuardar,
                           MessageBoxButton.OK, MessageImage.Error);
     }
 }