Example #1
0
        public static bool ValidarPrecioAModificar(string a, ref double salida)
        {
            bool flag = false;

            if (a == "S")
            {
                flag = true;
            }
            else
            {
                if (!double.TryParse(a, out salida))
                {
                    ConsolaHelper.MostrarMensaje("Debe ingresar un numero");
                }
                else if (salida <= 0)
                {
                    ConsolaHelper.MostrarMensaje("El precio debe ser mayor a 0");
                }
                else
                {
                    flag = true;
                }
            }

            return(flag);
        }
        public static int PedirMenu()
        {
            string _eleccion;
            bool   _flag = false;

            do
            {
                _eleccion = ConsolaHelper.PedirEleccionMenu();
                _flag     = Validaciones.ValidarOpcionDelMenu(_eleccion);
            } while (!_flag);

            return(Convert.ToInt32(_eleccion));
        }
Example #3
0
        public static bool ValidarTalle(string a)
        {
            bool flag = false;

            if (string.IsNullOrWhiteSpace(a))
            {
                ConsolaHelper.MostrarMensaje("No debe dejar espacios en blanco");
            }
            else
            {
                flag = true;
            }
            return(flag);
        }
Example #4
0
        public static bool ValidarModelo(string a, ref int salida)
        {
            bool flag = false;

            if (!Int32.TryParse(a, out salida))
            {
                ConsolaHelper.MostrarMensaje("No es una opcion valida");
            }
            else if (salida < 0 || salida > 2)
            {
                ConsolaHelper.MostrarMensaje("No es una opcion valida");
            }
            else
            {
                flag = true;
            }
            return(flag);
        }
Example #5
0
        public static bool ValidarOpcionDelMenu(string a)
        {
            bool flag = false;

            if (!Int32.TryParse(a, out int salida))
            {
                ConsolaHelper.MostrarMensaje("No es una opcion valida");
            }
            else if (salida <= 0 || salida > 8)
            {
                ConsolaHelper.MostrarMensaje("No es una opcion valida");
            }
            else
            {
                flag = true;
            }
            return(flag);
        }
        public static void PantallaInicio()
        {
            string _msj =
                "--------------------------------------------------------------------------------------\n" +
                "------------------------BIENVENIDO A LA TIENDA DE INDUMENTARIA------------------------\n" +
                "--------------------------------------------------------------------------------------\n" +
                "----------------      MENU:                                            ---------------\n" +
                "----------------      1 - Agregar Indumentaria                         ---------------\n" +
                "----------------      2 - Modificar Indumentaria                       ---------------\n" +
                "----------------      3 - Quitar Indumentaria                          ---------------\n" +
                "----------------      4 - Reporte de Indumentaria                      ---------------\n" +
                "----------------                                                       ---------------\n" +
                "----------------      5 - Ingresar orden de venta                      ---------------\n" +
                "----------------      6 - Devolver orden de venta                      ---------------\n" +
                "----------------      7 - Reporte de ordenes de venta                  ---------------\n" +
                "----------------      8 - Salir del sistema                            ---------------\n" +
                "--------------------------------------------------------------------------------------\n" +
                "--------------------------------------------------------------------------------------\n";

            ConsolaHelper.MostrarMensaje(_msj);
        }
Example #7
0
        public static bool ValidarSalida(string a)
        {
            bool flag = false;

            if (string.IsNullOrWhiteSpace(a))
            {
                ConsolaHelper.MostrarMensaje("No debe dejar espacios en blanco");
            }
            else if (a == "S")
            {
                flag = true;
            }
            else if (a == "N")
            {
                flag = true;
            }
            else
            {
                ConsolaHelper.MostrarMensaje("No son opciones validas");
            }
            return(flag);
        }