示例#1
0
        public ActionResult ConcluirServico(int?id)
        {
            string  Email;
            Cliente c = new Cliente();
            string  emailAdmin;

            emailAdmin = "*****@*****.**";
            Email      = Request.Cookies["Email"].Value;
            c          = ClienteDAO.BuscarDadosClientePorEmail(Email);

            Venda v = new Venda();

            v = VendaDAO.BuscarVendaPorId(id);

            if (v.Valor == 35)
            {
                c.Saldo = c.Saldo + 30;
                c       = ClienteDAO.BuscarDadosClientePorEmail(emailAdmin);
                c.Saldo = c.Saldo + 5;
            }
            if (v.Valor == 45)
            {
                c.Saldo = c.Saldo + 40;
                c       = ClienteDAO.BuscarDadosClientePorEmail(emailAdmin);
                c.Saldo = c.Saldo + 5;
            }

            ClienteDAO.AlterarCliente(c);
            v.StatusVenda = "Concluido.";
            VendaDAO.AlterarVenda(v);
            return(View());
        }
示例#2
0
        public ActionResult AprovarPagamentoCartao(int?id)
        {
            Venda v = new Venda();

            v             = VendaDAO.BuscarVendaPorId(id);
            v.StatusVenda = "Aguardando Prestador";
            VendaDAO.AlterarVenda(v);
            return(View());
        }
示例#3
0
        public ActionResult RejeitarPagamentoCartao(int?id)
        {
            Venda v = new Venda();

            v             = VendaDAO.BuscarVendaPorId(id);
            v.StatusVenda = "Pagamento Rejeitado!";
            VendaDAO.AlterarVenda(v);
            return(View());
        }
示例#4
0
        public ActionResult CancelarServico(int?id)
        {
            Venda v = new Venda();

            v             = VendaDAO.BuscarVendaPorId(id);
            v.StatusVenda = "Serviço Cancelado.";
            VendaDAO.AlterarVenda(v);
            return(View());
        }
示例#5
0
        public ActionResult RealizaServico(int id)
        {
            Venda v = new Venda();

            v = VendaDAO.BuscarVendaPorId(id);
            string email;

            v.StatusVenda = "Aguardando Lavagem";
            email         = Request.Cookies["Email"].Value;
            v.cliente     = ClienteDAO.BuscarDadosClientePorEmail(email);

            VendaDAO.AlterarVenda(v);

            return(View());
        }