Example #1
0
        public void GuardarRecibo()
        {
            EventoClase evento = new EventoClase();

            evento.GuardarEvento();
            MenuClase menu = new MenuClase();

            menu.GuardarMenu();
            InvitadoClase inv = new InvitadoClase();

            inv.GuardarInvitados();
            ClienteClase cli = new ClienteClase();

            cli.GuardarCliente();

            string proc;

            proc = nuevo ? "proc_setRecibo" : "proc_updateRecibo";

            Estructura objElementos = new Estructura();

            objElementos.Sentencia = proc;

            objElementos.Parametros = new SqlParameter[] {
                new SqlParameter("folio", SqlDbType.Int),
                new SqlParameter("fecha", SqlDbType.NVarChar, 50),
                new SqlParameter("subtotal", SqlDbType.NVarChar, 50),
                new SqlParameter("iva", SqlDbType.NVarChar, 50),
                new SqlParameter("total", SqlDbType.NVarChar, 50)
            };
            objElementos.Valores = new List <object>()
            {
                EventoClase.Evento.FolioEvento, DateTime.Now.ToShortDateString(), recibo.subtotal, recibo.iva, recibo.total
            };

            Operaciones objOperaciones = new Operaciones();

            objOperaciones.Elemento = objElementos;
            objOperaciones.AgregarInfo();
        }