Esempio n. 1
0
        private void btnAgregar_Click(object sender, EventArgs e)
        {
            if (ValidarDatos())
            {
                Curso objCurso;


                if (rbPropio.Checked)
                {
                    objCurso = new Propio((Profesor)cbProfesor.SelectedItem, txtAula.Text, mskHora.Text, txtNomCurso.Text, mskID.Text);

                    MessageBox.Show(objCurso.ToString(), "Alta Curso Propio", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                else
                {
                    objCurso = new Convenio((Instituto)cbInsti.SelectedItem, txtNomCurso.Text, mskID.Text);

                    MessageBox.Show(objCurso.ToString(), "Alta Curso Convenio", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                Program.colCursos.Agregar(objCurso);
            }
            mskHora.Text     = "";
            mskID.Text       = "";
            txtAula.Text     = "";
            txtNomCurso.Text = "";
            cbInsti.Text     = "Institutos";
            cbProfesor.Text  = "Profesor";
        }
Esempio n. 2
0
        public List <IngredientesPorMenu> ListadoIngredientesPorMenu(int pIdMenu)
        {
            List <IngredientesPorMenu> ret = new List <IngredientesPorMenu>();
            Propio p = (Propio)Buscar(pIdMenu);

            if (p != null)
            {
                ret = p.Ingredientes;
            }

            return(ret);
        }
Esempio n. 3
0
        public ExitCode AltaMenuPropio(Chef pChef, List <IngredientesPorMenu> pIngredientes, decimal pGanancia, string pDesc)
        {
            var exit = ExitCode.INPUT_DATA_ERROR;

            if (ValidarData(pChef, pIngredientes, pGanancia, pDesc))
            {
                Propio p = new Propio()
                {
                    Id           = Menu.UltimoId + 1,
                    Chef         = pChef,
                    Ingredientes = pIngredientes,
                    Ganancia     = pGanancia,
                    Descripcion  = pDesc
                };
                p.PrecioVenta = p.CalcularPrecioVenta();
                Menu.UltimoId = p.Id;
                _Menues.Add(p);

                exit = ExitCode.OK;
            }

            return(exit);
        }