Ejemplo n.º 1
0
        protected void btnAgregar_Click(object sender, EventArgs e)
        {
            int    cantidad      = int.Parse(txtCantidad.Text);
            int    idMenu        = int.Parse(lstMenu.SelectedValue);
            string idIngrediente = lstIngredientes.SelectedValue;

            if (Validar(cantidad))
            {
                Response.Write(Maestra.MensajeError((int)Fachada.Get.ModificarIngredientesDeMenu(idMenu, idIngrediente, cantidad), "Modificar Ingredientes"));
                ListarIngredientes((int)Session["idMenu"]);
            }
            else
            {
                Response.Write("No se puede ingresar esa cantidad. Para eliminar un ingrediente, hágalo con el botón de la grilla");
            }
        }
Ejemplo n.º 2
0
        protected void LoginRestaurant_Authenticate(object sender, AuthenticateEventArgs e)
        {
            Session["Usuario"] = null;
            Session["Rol"]     = null;

            Encryption enc    = new Encryption();
            ExitCode   salida = Fachada.Get.Login(LoginRestaurant.UserName, enc.EncryptToString(LoginRestaurant.Password));


            if (salida == Utils.ExitCode.OK)
            {
                Session["Usuario"] = LoginRestaurant.UserName;
                Session["Rol"]     = Fachada.Get.RolPorUsuario((string)Session["Usuario"]);
                e.Authenticated    = true;
                Response.Redirect("Inicio.aspx");
            }
            else
            {
                Session["Usuario"] = null;
                Session["Rol"]     = null;
                e.Authenticated    = false;
                Response.Write(Maestra.MensajeError((int)salida, "Login"));
            }
        }
Ejemplo n.º 3
0
 protected void btnAceptar_Click(object sender, EventArgs e)
 {
     Response.Write(Maestra.MensajeError((int)Fachada.Get.BajaReserva((string)Session["Codigo"]), "Cancelar Reserva"));
     Reset();
 }