Пример #1
0
    public static bool ConfirmarCliente(string codigo, string cpf, string rg, string nome, string nascimento, string telefone, string uf)
    {
        try
        {
            BluSoftService.Service.BluSoftService service = new BluSoftService.Service.BluSoftService();

            var cliente = new BluSoftService.Repository.Cliente();
            cliente.CPF            = cpf;
            cliente.RG             = rg;
            cliente.Nome           = nome;
            cliente.DataNascimento = Convert.ToDateTime(nascimento);
            cliente.Telefone       = telefone;
            cliente.UF             = uf;

            if (!string.IsNullOrEmpty(codigo))
            {
                cliente.Codigo = Int32.Parse(codigo);
            }

            return(service.ConfirmarCliente(cliente));
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
Пример #2
0
    public static bool ExcluirCliente(int codigo)
    {
        try
        {
            BluSoftService.Service.BluSoftService service = new BluSoftService.Service.BluSoftService();

            return(service.ExcluirCliente(codigo));
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
Пример #3
0
    public static List <BluSoftService.Repository.Cliente> BuscarCliente(string tipoPesquisa, string valorPesquisa)
    {
        try
        {
            BluSoftService.Service.BluSoftService service = new BluSoftService.Service.BluSoftService();

            return(service.BuscarCliente(tipoPesquisa, valorPesquisa));
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
Пример #4
0
    public static BluSoftService.Repository.Cliente ObterCliente(int codigo)
    {
        try
        {
            BluSoftService.Service.BluSoftService service = new BluSoftService.Service.BluSoftService();

            return(service.ObterCliente(codigo));
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
Пример #5
0
    public static bool CadastrarCliente(string cpf, string rg, string nome, string nascimento, string telefone, string uf)
    {
        try
        {
            BluSoftService.Service.BluSoftService service = new BluSoftService.Service.BluSoftService();

            var cliente = new BluSoftService.Repository.Cliente();
            cliente.CPF            = cpf;
            cliente.RG             = rg;
            cliente.Nome           = nome;
            cliente.DataNascimento = Convert.ToDateTime(nascimento);
            cliente.Telefone       = telefone;
            cliente.UF             = uf;

            return(service.CadastrarCliente(cliente));
        }
        catch (Exception ex)
        {
            throw ex;
        }

        return(true);
    }