Пример #1
0
 private void fillFields()
 {
     lblNomeCliente.Text              = faturamento.cliente.nome;
     lblEnderecoCliente.Text          = faturamento.cliente.endereco.ToString();
     lblValorFaturamento.Text         = Utilidades.Util.formatValor(faturamento.valorTotal());
     lblServicosCustosAdicionais.Text = faturamento.servicos_custosAdicionais();
     lblCidadeData.Text = String.Format("Garça, {0} de {1} de {2}", DateTime.Now.Day, Utilidades.Util.getMes(DateTime.Now.Month), DateTime.Now.Year);
 }
Пример #2
0
        public static bool fechaFaturamento(ref Faturamento faturamento, ref String mensagemRetorno)
        {
            // Verifica se foi selecionado um veículo
            if (faturamento.veiculo == null)
            {
                mensagemRetorno = "Deve ser selecionado um veículo";

                return(false);
            }

            // Verifica se o valor do orçamento é maior que 0
            if (faturamento.valorTotal() <= 0)
            {
                mensagemRetorno = "O valor está zerado";

                return(false);
            }

            faturamento.fechado          = true;
            faturamento.dataEncerramento = DateTime.Now;
            FaturamentoRepositorio.Instance.update(faturamento);
            return(true);
        }