Exemplo n.º 1
0
        public string listarReservas(string codCliente)
        {
            if (codCliente != null && UtilValidar.validarInt(codCliente))
            {
                int cod = UtilConvert.ToInt(codCliente);

                List <clnReserva> objReservas = new clnReserva
                {
                    CodCliente = cod
                }.obterPorCliente();

                StringBuilder listarBuilder = new StringBuilder();

                foreach (clnReserva objReserva in objReservas)
                {
                    if (listarBuilder.Length > 0)
                    {
                        listarBuilder.AppendLine("$");
                    }
                    listarBuilder.Append(objReserva.Cod);
                    listarBuilder.Append("&").Append(new DateTimeOffset(objReserva.Agendado).ToUnixTimeMilliseconds());
                    listarBuilder.Append("&").Append(objReserva.Pessoas);
                    listarBuilder.Append("&").Append(objReserva.Informacoes);
                    listarBuilder.Append("&").Append(objReserva.prefixo(objReserva.Situacao));
                }

                return(listarBuilder.ToString());
            }
            else
            {
                return("0Cliente não informado");
            }
        }
Exemplo n.º 2
0
        private void Employee_Click(object sender, EventArgs e)
        {
            if (sender is Panel)
            {
                Panel panel = sender as Panel;
                PreencheDadosEmployee(new Employee {
                    EmployeeId = UtilConvert.ToInt(panel.Tag)
                }.ObterPorId());
            }
            else if (sender is Label)
            {
                Label label = sender as Label;
                PreencheDadosEmployee(new Employee {
                    EmployeeId = UtilConvert.ToInt(label.Tag)
                }.ObterPorId());
            }
            else if (sender is PictureBox)
            {
                PictureBox pictureBox = sender as PictureBox;
                PreencheDadosEmployee(new Employee {
                    EmployeeId = UtilConvert.ToInt(pictureBox.Tag)
                }.ObterPorId());
            }

            newImage = false;
        }
Exemplo n.º 3
0
        private void Employee_Click(object sender, EventArgs e)
        {
            if (sender is Panel)
            {
                Panel panel = sender as Panel;
                employee = (new Employee {
                    EmployeeId = UtilConvert.ToInt(panel.Tag)
                }.ObterPorId());

                uiTxtCPF.ReadOnly = true;
                uiTxtCPF.Text     = UtilConvert.ToString(employee.CPF);
            }
            else if (sender is Label)
            {
                Label label = sender as Label;
                employee = (new Employee {
                    EmployeeId = UtilConvert.ToInt(label.Tag)
                }.ObterPorId());

                uiTxtCPF.ReadOnly = true;
                uiTxtCPF.Text     = UtilConvert.ToString(employee.CPF);
            }
            else if (sender is PictureBox)
            {
                PictureBox pictureBox = sender as PictureBox;
                employee = (new Employee {
                    EmployeeId = UtilConvert.ToInt(pictureBox.Tag)
                }.ObterPorId());

                uiTxtCPF.ReadOnly = true;
                uiTxtCPF.Text     = UtilConvert.ToString(employee.CPF);
            }
        }
Exemplo n.º 4
0
        private void UiPicture_Click(object sender, EventArgs e)
        {
            uiPicture pic = sender as uiPicture;

            if (currentCustomerFisico != null)
            {
                Wallet wallet = new Wallet
                {
                    CustomerId       = currentCustomerFisico.CustomerId,
                    CryptoCurrencyId = UtilConvert.ToInt(pic.Tag)
                }.ObterPorId();

                GeneratePanel(wallet);
            }
            else if (currentCustomerJuridico != null)
            {
                Wallet wallet = new Wallet
                {
                    CustomerId       = currentCustomerJuridico.CustomerId,
                    CryptoCurrencyId = UtilConvert.ToInt(pic.Tag)
                }.ObterPorId();

                GeneratePanel(wallet);
            }
            else
            {
                new Alert("Ocorreu um erro grave! comunique ao seu gestor.", uiCSB.Toastr.Type.Error);
            }
        }
Exemplo n.º 5
0
        private void btnAtualizar_Click(object sender, EventArgs e)
        {
            try
            {
                if (UtilValidar.CamposValidos(uiPanelCryptocurrency))
                {
                    if (newImage)
                    {
                        int archiveId = new Archive
                        {
                            Blob = UtilImage.ImageToByte(picCriptocurrency.Image),
                        }.Gravar();

                        bool updated = new Cryptocurency
                        {
                            ArchiveId             = archiveId,
                            Name                  = uiTxtCriptocurrency.Text,
                            Base                  = uiTxtCryptocurrencyBase.Text,
                            Description           = uiTxtDescription.Text,
                            CryptocurrencyBalance = UtilConvert.ToInt(uiTxtCryptocurrencyBalance.Text),
                            CryptocurrencyUnit    = uiTxtCryptocurrencyUnit.Text
                        }.AlterarPorId();

                        if (updated)
                        {
                            new Alert(String.Format("A criptomoeda {0} foi cadastrada.", uiTxtCriptocurrency.Text), uiCSB.Toastr.Type.Info);
                            newImage = false;
                        }
                        else
                        {
                            new Alert(String.Format("A criptomoeda {0} não foi cadastrada. Tente novamente mais tarde.", uiTxtCriptocurrency.Text), uiCSB.Toastr.Type.Warning);
                            newImage = true;
                        }
                    }
                    else
                    {
                        bool response = new Cryptocurency
                        {
                            ArchiveId             = UtilConvert.ToInt(lblArchiveId.Text),
                            Name                  = uiTxtCriptocurrency.Text,
                            Base                  = uiTxtCryptocurrencyBase.Text,
                            Description           = uiTxtDescription.Text,
                            CryptocurrencyBalance = UtilConvert.ToInt(uiTxtCryptocurrencyBalance.Text),
                            CryptocurrencyUnit    = uiTxtCryptocurrencyUnit.Text
                        }.AlterarPorId();

                        new Alert(String.Format("A criptomoeda {0} foi cadastrada.", uiTxtCriptocurrency.Text), uiCSB.Toastr.Type.Info);
                    }
                }
            }
            catch (Exception ex)
            {
                new Alert(ex.Message, uiCSB.Toastr.Type.Warning);
            }
            finally
            {
                ObterCriptomoedas();
            }
        }
Exemplo n.º 6
0
        public string novaReserva(string cpf, string dataStr, string horaStr, string lugaresStr, string informacoes, string codCliente)
        {
            cpf = UtilFormatar.retirarFormatacao(cpf);

            clnCliente objCliente;

            if (clienteBLL.autenticado())
            {
                objCliente = clienteBLL.obterCliente();
            }
            else if (codCliente != null && UtilValidar.validarInt(codCliente))
            {
                objCliente = new clnCliente
                {
                    Cod = UtilConvert.ToInt(codCliente)
                }.obterPorCod();
            }
            else
            {
                return("0Cliente não informado");
            }

            string validar = validarDados(cpf, dataStr, horaStr, lugaresStr, informacoes, objCliente);

            if (string.IsNullOrEmpty(validar))
            {
                if (string.IsNullOrEmpty(informacoes))
                {
                    informacoes = "Sem informações adicionais.";
                }

                clnReserva objReserva = new clnReserva
                {
                    Informacoes = informacoes,
                    Pessoas     = UtilConvert.ToInt(lugaresStr),
                    CodCliente  = objCliente.Cod,
                    Agendado    = UtilConvert.ObterDataHora(dataStr, horaStr),
                    Agendamento = DateTime.Now.Date,
                    Situacao    = clnReserva.reservaSituacao.MARCADA
                };
                objReserva.gravar();

                atribuirMesas(objReserva);

                return("1Reserva realizada com sucesso");
            }
            else
            {
                return("0" + validar);
            }
        }
Exemplo n.º 7
0
        private void btnCriar_Click(object sender, EventArgs e)
        {
            try
            {
                if (UtilValidar.CamposValidos(uiPanelCryptocurrency))
                {
                    if (newImage)
                    {
                        int archiveId = new Archive
                        {
                            Blob = UtilImage.ImageToByte(picCriptocurrency.Image),
                        }.Gravar();

                        int response = new Cryptocurency
                        {
                            ArchiveId             = archiveId,
                            Name                  = uiTxtCriptocurrency.Text,
                            Base                  = uiTxtCryptocurrencyBase.Text,
                            Description           = uiTxtDescription.Text,
                            CryptocurrencyBalance = UtilConvert.ToInt(uiTxtCryptocurrencyBalance.Text),
                            CryptocurrencyUnit    = uiTxtCryptocurrencyUnit.Text
                        }.Gravar();

                        new Alert(String.Format("A criptomoeda {0} foi cadastrada.", uiTxtCriptocurrency.Text), uiCSB.Toastr.Type.Info);
                        newImage = false;
                    }
                    else
                    {
                        int response = new Cryptocurency
                        {
                            ArchiveId             = 1,
                            Name                  = uiTxtCriptocurrency.Text,
                            Base                  = uiTxtCryptocurrencyBase.Text,
                            Description           = uiTxtDescription.Text,
                            CryptocurrencyBalance = UtilConvert.ToInt(uiTxtCryptocurrencyBalance.Text),
                            CryptocurrencyUnit    = uiTxtCryptocurrencyUnit.Text
                        }.Gravar();

                        new Alert(String.Format("A criptomoeda {0} foi cadastrada.", uiTxtCriptocurrency.Text), uiCSB.Toastr.Type.Info);
                    }
                }
            }
            catch (Exception ex)
            {
                new Alert(ex.Message, uiCSB.Toastr.Type.Warning);
            }
        }
Exemplo n.º 8
0
            public bool call(DataGridViewRow row)
            {
                clnFuncionario objFuncionario = new clnFuncionario
                {
                    Cod = UtilConvert.ToInt(row.Cells[0].Value)
                }.obterPorCod();

                if (objFuncionario != null)
                {
                    frmFuncionario frmAlterarFuncionario = new frmFuncionario
                    {
                        ObjFuncionario = objFuncionario
                    };
                    frmAlterarFuncionario.ShowDialog();
                    return(true);
                }
                return(false);
            }
Exemplo n.º 9
0
            public bool call(DataGridViewRow row)
            {
                clnMercadoria objMercadoria = new clnMercadoria
                {
                    Cod = UtilConvert.ToInt(row.Cells[0].Value)
                }.obterPorCod();

                if (objMercadoria != null)
                {
                    frmMercadoria frmAlterarMercadoria = new frmMercadoria
                    {
                        ObjMercadoria = objMercadoria
                    };
                    frmAlterarMercadoria.ShowDialog();
                    return(true);
                }
                return(false);
            }
Exemplo n.º 10
0
            public bool call(DataGridViewRow row)
            {
                clnAtendimento objAtendimento = new clnAtendimento
                {
                    Cod = UtilConvert.ToInt(row.Cells[0].Value)
                }.obterPorCod();

                if (objAtendimento != null)
                {
                    frmAtendimento frmAlterarAtendimento = new frmAtendimento
                    {
                        ObjAtendimento = objAtendimento
                    };
                    frmAlterarAtendimento.ShowDialog();
                    return(true);
                }
                return(false);
            }
Exemplo n.º 11
0
            public bool call(DataGridViewRow row)
            {
                clnEstoque objEstoque = new clnEstoque
                {
                    Cod = UtilConvert.ToInt(row.Cells[0].Value)
                }.obterPorCod();

                if (objEstoque != null)
                {
                    frmEstoque frmAlterarEstoque = new frmEstoque
                    {
                        ObjEstoque = objEstoque
                    };
                    frmAlterarEstoque.ShowDialog();
                    return(true);
                }
                return(false);
            }
Exemplo n.º 12
0
            public bool call(DataGridViewRow row)
            {
                clnReserva objReserva = new clnReserva
                {
                    Cod = UtilConvert.ToInt(row.Cells[0].Value)
                }.obterPorCod();

                if (objReserva != null)
                {
                    frmReserva frmAlterarReserva = new frmReserva
                    {
                        ObjReserva = objReserva
                    };
                    frmAlterarReserva.ShowDialog();
                    return(true);
                }
                return(false);
            }
Exemplo n.º 13
0
            public bool call(DataGridViewRow row)
            {
                clnFornecedor objFornecedor = new clnFornecedor
                {
                    Cod = UtilConvert.ToInt(row.Cells[0].Value)
                }.obterPorCod();

                if (objFornecedor != null)
                {
                    frmFornecedor frmAlterarFornecedor = new frmFornecedor
                    {
                        ObjFornecedor = objFornecedor
                    };
                    frmAlterarFornecedor.ShowDialog();
                    return(true);
                }
                return(false);
            }
Exemplo n.º 14
0
            public bool call(DataGridViewRow row)
            {
                clnIngrediente objIngrediente = new clnIngrediente
                {
                    Cod = UtilConvert.ToInt(row.Cells[0].Value)
                }.obterPorCod();

                if (objIngrediente != null)
                {
                    frmIngrediente frmAlterarIngrediente = new frmIngrediente
                    {
                        ObjIngrediente = objIngrediente
                    };
                    frmAlterarIngrediente.ShowDialog();
                    return(true);
                }
                return(false);
            }
Exemplo n.º 15
0
        private void support_Click(object sender, EventArgs e)
        {
            if (sender is Panel)
            {
                Panel panel = sender as Panel;
                RemoverMensagens();
                PreencheHeader(new Support {
                    SupportId = UtilConvert.ToInt(panel.Tag)
                }.ObterPorId());
                BuscarMensagens(new Support {
                    SupportId = UtilConvert.ToInt(panel.Tag)
                }.ObterPorId());
                uiFlowPanelChat.AutoScroll = true;
                uiFlowPanelChat.HorizontalScroll.Enabled = false;
                uiFlowPanelChat.HorizontalScroll.Visible = false;
                HabilitarChat();

                Support = new Support {
                    SupportId = UtilConvert.ToInt(panel.Tag)
                }.ObterPorId();
            }
            else if (sender is Label)
            {
                Label label = sender as Label;
                RemoverMensagens();
                PreencheHeader(new Support {
                    SupportId = UtilConvert.ToInt(label.Tag)
                }.ObterPorId());
                BuscarMensagens(new Support {
                    SupportId = UtilConvert.ToInt(label.Tag)
                }.ObterPorId());
                uiFlowPanelChat.AutoScroll = true;
                uiFlowPanelChat.HorizontalScroll.Enabled = false;
                uiFlowPanelChat.HorizontalScroll.Visible = false;
                HabilitarChat();

                Support = new Support {
                    SupportId = UtilConvert.ToInt(label.Tag)
                }.ObterPorId();
            }
        }
Exemplo n.º 16
0
        private void uiBtnRegistrar_Click(object sender, EventArgs e)
        {
            try
            {
                new Access
                {
                    EmployeeId = employee.EmployeeId,
                    PositionId = UtilConvert.ToInt(cboPositions.SelectedIndex) + 1,
                    Cpf        = employee.CPF,
                    Hash       = Hash.HASH.cyph(uiTxtHash.Text),
                    Active     = true
                }.Gravar();

                LimparCampos();
                ObterFuncionarios();
            }
            catch (Exception ex)
            {
                new Alert(ex.Message, uiCSB.Toastr.Type.Warning);
            }
        }
Exemplo n.º 17
0
 private void Cryptocurrency_Click(object sender, EventArgs e)
 {
     if (sender is Panel)
     {
         Panel panel = sender as Panel;
         PreencheDadosCryptocurrency(new Cryptocurency {
             CryptocurrencyId = UtilConvert.ToInt(panel.Tag)
         }.ObterPorId());
     }
     else if (sender is Label)
     {
         Label label = sender as Label;
         PreencheDadosCryptocurrency(new Cryptocurency {
             CryptocurrencyId = UtilConvert.ToInt(label.Tag)
         }.ObterPorId());
     }
     else if (sender is PictureBox)
     {
         PictureBox pictureBox = sender as PictureBox;
         PreencheDadosCryptocurrency(new Cryptocurency {
             CryptocurrencyId = UtilConvert.ToInt(pictureBox.Tag)
         }.ObterPorId());
     }
 }
Exemplo n.º 18
0
 private void btnCriar_ClickAsync(object sender, EventArgs e)
 {
     try
     {
         if (UtilValidar.CamposValidos(uiPanelDados))
         {
             if (newImage)
             {
                 new Employee
                 {
                     ArchiveId = new Archive {
                         Blob = UtilImage.ImageToByte(picProfilePhoto.Image)
                     }.Gravar(),
                     Words         = UtilConvert.ToString(RandomWordsAsync(12)),
                     WordsLanguage = UtilConvert.ToString("en-US"),
                     FirstName     = UtilConvert.ToString(uiTxtPNome.Text),
                     LastName      = UtilConvert.ToString(uiTxtUNome.Text),
                     DateBirth     = UtilConvert.ToDateTime(uiTxtDataNasc.Text),
                     Gender        = UtilConvert.ToChar(uiTxtSexo.Text),
                     CPF           = uiTxtCPF.Text,
                     RG            = uiTxtRG.Text,
                     Email         = uiTxtEmail.Text,
                     StreetLine    = uiTxtLogradouro.Text,
                     //uiTxtNumero.Text,
                     //uiTxtBairro.Text,
                     Country      = uiTxtPais.Text,
                     City         = uiTxtCidade.Text,
                     Neighborhood = uiTxtBairro.Text,
                     Region       = uiTxtEstado.Text,
                     Number       = uiTxtNumero.Text,
                     PostCode     = uiTxtCep.Text,
                     MobileNumber = uiTxtTelCel.Text,
                     PhoneNumber  = uiTxtTelFixo.Text
                 }.Gravar();
             }
             else
             {
                 new Employee
                 {
                     ArchiveId     = UtilConvert.ToInt(lblArchiveId.Text),
                     Words         = UtilConvert.ToString(RandomWordsAsync(12)),
                     WordsLanguage = UtilConvert.ToString("en-US"),
                     FirstName     = UtilConvert.ToString(uiTxtPNome.Text),
                     LastName      = UtilConvert.ToString(uiTxtUNome.Text),
                     DateBirth     = UtilConvert.ToDateTime(uiTxtDataNasc.Text),
                     Gender        = UtilConvert.ToChar(uiTxtSexo.Text),
                     CPF           = uiTxtCPF.Text,
                     RG            = uiTxtRG.Text,
                     Email         = uiTxtEmail.Text,
                     StreetLine    = uiTxtLogradouro.Text,
                     //uiTxtNumero.Text,
                     //uiTxtBairro.Text,
                     Country      = uiTxtPais.Text,
                     City         = uiTxtCidade.Text,
                     Neighborhood = uiTxtBairro.Text,
                     Region       = uiTxtEstado.Text,
                     Number       = uiTxtNumero.Text,
                     PostCode     = uiTxtCep.Text,
                     MobileNumber = uiTxtTelCel.Text,
                     PhoneNumber  = uiTxtTelFixo.Text
                 }.Gravar();
             }
         }
     }
     catch (NullReferenceException)
     {
         new Alert("Preencha todos os campos antes de atualizar.", Type.Warning);
     }
     catch (Exception ex)
     {
         new Alert(ex.Message, Type.Warning);
     }
 }
Exemplo n.º 19
0
            public bool validar(Control control)
            {
                if (!control.Visible || !control.Enabled)
                {
                    return(true);
                }
                String conteudo = clnUtil.obterConteudo(control);

                if (!_validacoes.Contains(Validacao.OBRIGATORIO) && UtilValidar.vazio(conteudo))
                {
                    return(true);
                }

                bool valido = true;

                _motivo  = "";
                conteudo = control.Text;
                foreach (Validacao tipo in _validacoes)
                {
                    bool   val = true;
                    String res = "";
                    switch (tipo)
                    {
                    case Validacao.OBRIGATORIO:
                        val = !UtilValidar.vazio(conteudo);
                        res = "precisa ser preenchido.";
                        break;

                    case Validacao.EMAIL:
                        val = UtilValidar.validarEmail(conteudo);
                        res = "deve conter um e-mail válido.";
                        break;

                    case Validacao.CPF:
                        val = UtilValidar.validarCPF(conteudo);
                        res = "deve conter um CPF válido.";
                        break;

                    case Validacao.CNPJ:
                        val = UtilValidar.validarCNPJ(conteudo);
                        res = "deve conter um CNPJ válido.";
                        break;

                    case Validacao.CEP:
                        val = UtilValidar.validarCEP(conteudo);
                        res = "deve conter um CEP válido.";
                        break;

                    case Validacao.INT:
                        val = UtilValidar.validarInt(conteudo);
                        res = "deve conter um número inteiro.";
                        break;

                    case Validacao.QUANTIDADE:
                        val = UtilConvert.ToInt(conteudo) > 0;
                        res = "deve conter um número maior que ZERO.";
                        break;

                    case Validacao.DATA:
                        val = UtilValidar.validarData(conteudo);
                        res = "deve conter uma data válida";
                        break;

                    case Validacao.DATA_NASC:
                        val = UtilValidar.validarDataNasc(conteudo);
                        res = "deve conter uma data da nascimento.";
                        break;

                    case Validacao.CELULAR:
                        val = UtilValidar.validarCelular(conteudo);
                        res = "deve conter um número de celular válido.";
                        break;

                    case Validacao.TELEFONE:
                        val = UtilValidar.validarTelefone(conteudo);
                        res = "deve conter um número de telefone válido.";
                        break;

                    case Validacao.DATA_FUTURA:
                        val = UtilValidar.validarDataFutura(conteudo);
                        res = "deve conter uma data futura.";
                        break;

                    case Validacao.HORA:
                        val = UtilValidar.validarHora(conteudo);
                        res = "deve conter uma hora válida.";
                        break;

                    case Validacao.VALOR:
                        val = UtilValidar.validarValor(conteudo);
                        res = "deve conter um valor válido.";
                        break;

                    case Validacao.DOUBLE:
                        val = UtilValidar.validarDouble(conteudo);
                        res = "deve conter um número decimal válido.";
                        break;
                    }
                    if (!val)
                    {
                        valido  = false;
                        _motivo = res;
                        break;
                    }
                }

                return(valido);
            }
Exemplo n.º 20
0
        private string validarDados(string cpf, string dataStr, string horaStr, string lugaresStr, string informacoes, clnCliente objCliente)
        {
            if (objCliente != null)
            {
                StringBuilder errosBuilder = new StringBuilder();

                if (UtilValidar.vazio(cpf))
                {
                    errosBuilder.Append("É necessário informar o CPF.");
                }
                else if (!UtilValidar.validarCPF(cpf))
                {
                    errosBuilder.Append("O CPF informado é inválido.");
                }
                else if (!cpf.Equals(objCliente.Cpf))
                {
                    errosBuilder.Append("O CPF foi informado incorretamente.");
                }

                if (UtilValidar.vazio(dataStr))
                {
                    errosBuilder.Append("É necessário informar a data.");
                }
                else if (!UtilValidar.validarData(dataStr))
                {
                    errosBuilder.Append("A data informada é inválida.");
                }
                else if (!UtilValidar.validarDataFutura(dataStr))
                {
                    errosBuilder.Append("A data informada é inválida.");
                }

                if (UtilValidar.vazio(horaStr))
                {
                    errosBuilder.Append("É necessário informar a hora.");
                }
                else if (!UtilValidar.validarHora(horaStr))
                {
                    errosBuilder.Append("A hora informada é inválida.");
                }

                if (UtilValidar.vazio(lugaresStr))
                {
                    errosBuilder.Append("É necessário informar os lugares.");
                }
                else if (!UtilValidar.validarValor(lugaresStr))
                {
                    errosBuilder.Append("É necessário informar um valor válido para os lugares.");
                }
                else
                {
                    int lugares = UtilConvert.ToInt(lugaresStr);
                    if (lugares < 2)
                    {
                        errosBuilder.Append("É necessário reservar no minimo 2 lugares.");
                    }
                    else if (lugares > 8)
                    {
                        errosBuilder.Append("Não é possível reservar mais que 8 lugares.");
                    }
                }

                if (informacoes.Length > 256)
                {
                    errosBuilder.Append("O limite de informações é de 256 caracteres.");
                }

                if (errosBuilder.Length == 0)
                {
                    int      lugares = UtilConvert.ToInt(lugaresStr);
                    DateTime data    = UtilConvert.ObterDataHora(dataStr, horaStr);

                    //TODAS AS INFORMAÇÕE ESTÃO OK, VALIDE SE NÃO TEM RESERVA E SE É POSSÍVEL
                    List <clnReserva> objReservas = new clnReserva
                    {
                        CodCliente = objCliente.Cod,
                        Agendado   = data,
                        Ativo      = true
                    }.obterPorClienteData();

                    if (objReservas.Count > 0)
                    {
                        errosBuilder.Append("Você já realizou uma reserva para esta data!");
                    }
                    else
                    {
                        int lugaresTotais = new clnMesa {
                        }.obterLugares();

                        int lugaresReservados = new clnReserva
                        {
                            Agendado = data
                        }.obterLugaresReservados();

                        if (lugaresReservados > (lugaresTotais / 2))
                        {
                            errosBuilder.Append("Não há lugares disponiveis para reserva via Internet nesta data.");
                        }
                        else
                        {
                            int lugaresDisponiveis = lugaresTotais - lugaresReservados;

                            if (lugares > lugaresDisponiveis)
                            {
                                errosBuilder.Append("Não existem lugares disponiveis para esta data");
                            }
                        }
                    }
                }

                return(errosBuilder.ToString());
            }
            else
            {
                return("Você não está autenticado.");
            }
        }