Example #1
0
 public static bool Cargo(object titulo)
 {
     command             = new SqlCommand("usp_inserir_cargo", connection);
     command.CommandType = CommandType.StoredProcedure;
     command.Parameters.AddWithValue("@titulo", titulo);
     return(Executar.NonQuery());
 }
Example #2
0
            public static bool Info(List <object> list)
            {
                counter = 0;

                command             = new SqlCommand("usp_alterar_estabelecimento", connection);
                command.CommandType = CommandType.StoredProcedure;

                command.Parameters.AddWithValue("@cnpj", list[counter++]);
                command.Parameters.AddWithValue("@razao_social", list[counter++]);
                command.Parameters.AddWithValue("@nome_fantasia", list[counter++]);
                command.Parameters.AddWithValue("@cep", list[counter++]);
                command.Parameters.AddWithValue("@numero", list[counter++]);
                command.Parameters.AddWithValue("@complemento", list[counter++]);
                command.Parameters.AddWithValue("@logradouro", list[counter++]);
                command.Parameters.AddWithValue("@bairro", list[counter++]);
                command.Parameters.AddWithValue("@cidade", list[counter++]);
                command.Parameters.AddWithValue("@uf", list[counter++]);
                command.Parameters.AddWithValue("@email", list[counter++]);
                command.Parameters.AddWithValue("@telefone", list[counter++]);
                command.Parameters.AddWithValue("@celular", list[counter++]);
                command.Parameters.AddWithValue("@abertura", Convert.ToDateTime(list[counter++]));
                command.Parameters.AddWithValue("@fechamento", Convert.ToDateTime(list[counter++]));
                command.Parameters.AddWithValue("@atendimento", list[counter++]);

                return(Executar.NonQuery());
            }
Example #3
0
            public static bool Info(List <object> list)
            {
                counter = 0;

                command             = new SqlCommand("usp_alterar_funcionario", connection);
                command.CommandType = CommandType.StoredProcedure;

                command.Parameters.AddWithValue("@nome", list[counter++]);
                command.Parameters.AddWithValue("@cpf", list[counter++]);
                command.Parameters.AddWithValue("@nascimento", Convert.ToDateTime(list[counter++]));
                command.Parameters.AddWithValue("@sexo", list[counter++]);
                command.Parameters.AddWithValue("@cep", list[counter++]);
                command.Parameters.AddWithValue("@numero", list[counter++]);
                command.Parameters.AddWithValue("@complemento", list[counter++]);
                command.Parameters.AddWithValue("@logradouro", list[counter++]);
                command.Parameters.AddWithValue("@bairro", list[counter++]);
                command.Parameters.AddWithValue("@cidade", list[counter++]);
                command.Parameters.AddWithValue("@uf", list[counter++]);
                command.Parameters.AddWithValue("@email", list[counter++]);
                command.Parameters.AddWithValue("@telefone", list[counter++]);
                command.Parameters.AddWithValue("@celular", list[counter++]);
                command.Parameters.AddWithValue("@cargo", list[counter++]);
                command.Parameters.AddWithValue("@especialidade", list[counter++]);
                command.Parameters.AddWithValue("@registro", list[counter++]);
                command.Parameters.AddWithValue("@registro_uf", list[counter++]);
                command.Parameters.AddWithValue("@id", Buscar.Editor.ID.Equals(0) ? Buscar.Usuario.ID : Buscar.Editor.ID);

                return(Executar.NonQuery());
            }
Example #4
0
            public static void Login(List <object> list)
            {
                counter             = 0;
                command             = new SqlCommand("usp_alterar_administrador_login", connection);
                command.CommandType = CommandType.StoredProcedure;

                command.Parameters.AddWithValue("id", Convert.ToInt32(list[counter++]));
                command.Parameters.AddWithValue("senha", list[counter++]);

                Executar.NonQuery();
            }
Example #5
0
            public static bool CargoEspecialidade(List <object> list)
            {
                counter = 0;

                command             = new SqlCommand("usp_alterar_estabelecimento_cargo_especialidade", connection);
                command.CommandType = CommandType.StoredProcedure;

                command.Parameters.AddWithValue("@cargo_tecnico", list[counter++]);
                command.Parameters.AddWithValue("@especialidade_nenhuma", list[counter++]);

                return(Executar.NonQuery());
            }
Example #6
0
            public static bool Info(List <object> list, int starAt = 0)
            {
                command             = new SqlCommand("usp_alterar_agendamento", connection);
                command.CommandType = CommandType.StoredProcedure;

                command.Parameters.AddWithValue("@tecnico", list[starAt++]);
                command.Parameters.AddWithValue("@dia", Convert.ToDateTime(list[starAt++]));
                command.Parameters.AddWithValue("@hora", Convert.ToDateTime(list[starAt++]));
                command.Parameters.AddWithValue("@situacao", list[starAt++]);
                command.Parameters.AddWithValue("@id", Buscar.Editor.ID);

                return(Executar.NonQuery());
            }
Example #7
0
            public static bool Resumos(List <object> list, int startAt = 0)
            {
                command             = new SqlCommand("usp_alterar_agendamento_resumos", connection);
                command.CommandType = CommandType.StoredProcedure;

                command.Parameters.AddWithValue("@resumo_tecnico", list[startAt++]);
                command.Parameters.AddWithValue("@resumo_cliente", list[startAt++]);
                command.Parameters.AddWithValue("@medicamentos", list[startAt++]);
                command.Parameters.AddWithValue("@encaminhamentos", list[startAt++]);
                command.Parameters.AddWithValue("@id", Buscar.Editor.ID);

                return(Executar.NonQuery());
            }
Example #8
0
            public static void Login(object value1, object value2)
            {
                table = Executar.Reader("usp_buscar_{c}_login".Replace("{c}", Classe), value1, value2);

                if (!table.Rows.Count.Equals(0))
                {
                    ID = Convert.ToInt32(table.Rows[0]["id"]);
                }
                else
                {
                    ID = 0;
                }
            }
Example #9
0
        public static bool Agendamento(List <object> list)
        {
            counter = 0;

            command             = new SqlCommand("usp_inserir_agendamento", connection);
            command.CommandType = CommandType.StoredProcedure;

            command.Parameters.AddWithValue("@cliente", list[counter++]);
            command.Parameters.AddWithValue("@tecnico", list[counter++]);
            command.Parameters.AddWithValue("@dia", Convert.ToDateTime(list[counter++]));
            command.Parameters.AddWithValue("@hora", Convert.ToDateTime(list[counter++]));

            return(Executar.NonQuery());
        }
Example #10
0
            public static bool Login(List <object> list)
            {
                counter = 0;

                command             = new SqlCommand("usp_alterar_funcionario_login", connection);
                command.CommandType = CommandType.StoredProcedure;

                command.Parameters.AddWithValue("@senha_antiga", list[counter++]);
                command.Parameters.AddWithValue("@senha_nova", list[counter++]);
                command.Parameters.AddWithValue("@lembrete", list[counter++]);
                command.Parameters.AddWithValue("@id", Buscar.Usuario.ID);

                return(Executar.NonQuery());
            }
Example #11
0
        public static bool Mensagem(List <object> list)
        {
            counter = 0;

            command             = new SqlCommand("usp_inserir_mensagem", connection);
            command.CommandType = CommandType.StoredProcedure;

            command.Parameters.AddWithValue("@destinatario", list[counter++]);
            command.Parameters.AddWithValue("@remetente", list[counter++]);
            command.Parameters.AddWithValue("@classe", list[counter++]);
            command.Parameters.AddWithValue("@conteudo", list[counter++]);

            return(Executar.NonQuery());
        }
Example #12
0
            public static bool Endereco(List <object> list)
            {
                counter = Buscar.Editor.ID.Equals(0) ? 0 : counter;

                command             = new SqlCommand("usp_alterar_cliente_endereco", connection);
                command.CommandType = CommandType.StoredProcedure;

                command.Parameters.AddWithValue("@cep", list[counter++]);
                command.Parameters.AddWithValue("@numero", list[counter++]);
                command.Parameters.AddWithValue("@complemento", list[counter++]);
                command.Parameters.AddWithValue("@logradouro", list[counter++]);
                command.Parameters.AddWithValue("@bairro", list[counter++]);
                command.Parameters.AddWithValue("@cidade", list[counter++]);
                command.Parameters.AddWithValue("@uf", list[counter++]);
                command.Parameters.AddWithValue("@id", Buscar.Editor.ID.Equals(0) ? Buscar.Usuario.ID : Buscar.Editor.ID);

                return(Executar.NonQuery());
            }
Example #13
0
        public static bool Cliente(List <object> list)
        {
            counter = 0;

            command             = new SqlCommand("usp_inserir_cliente", connection);
            command.CommandType = CommandType.StoredProcedure;

            command.Parameters.AddWithValue("@nome", list[counter++]);
            command.Parameters.AddWithValue("@cpf", list[counter++]);
            command.Parameters.AddWithValue("@nascimento", Convert.ToDateTime(list[counter++]));
            command.Parameters.AddWithValue("@sexo", list[counter++]);
            command.Parameters.AddWithValue("@cep", list[counter++]);
            command.Parameters.AddWithValue("@numero", list[counter++]);
            command.Parameters.AddWithValue("@complemento", list[counter++]);
            command.Parameters.AddWithValue("@logradouro", list[counter++]);
            command.Parameters.AddWithValue("@bairro", list[counter++]);
            command.Parameters.AddWithValue("@cidade", list[counter++]);
            command.Parameters.AddWithValue("@uf", list[counter++]);
            command.Parameters.AddWithValue("@email", list[counter++]);
            command.Parameters.AddWithValue("@telefone", list[counter++]);
            command.Parameters.AddWithValue("@celular", list[counter++]);

            return(Executar.NonQuery());
        }
Example #14
0
 public static bool Overbooking(List <object> list, int id = 0, int startAt = 0)
 {
     table = Executar.Reader("usp_buscar_agendamento_overbook", list[startAt++], list[startAt++], list[startAt++], id);
     return(table.Rows.Count.Equals(0));
 }
Example #15
0
 public static DataTable PorNome(object value1 = null)
 {
     return(Executar.Reader("usp_listar_clientes", value1));
 }
Example #16
0
 public static DataTable PorNome(object value1)
 {
     return(Executar.Reader("usp_listar_funcionarios", value1));
 }
Example #17
0
 public static DataTable Tecnicos()
 {
     return(Executar.Reader("usp_listar_funcionarios_tecnicos", Buscar.Estabelecimento.CargoTecnico));
 }
Example #18
0
 public static DataTable PorDia(object value1)
 {
     return(Executar.Reader("usp_listar_agendamentos", value1, (Buscar.Usuario.IsTecnico ? Buscar.Usuario.ID : 0)));
 }
Example #19
0
 public static DataTable PorCliente(int value1)
 {
     return(Executar.Reader("usp_listar_agendamentos_cliente", value1));
 }
Example #20
0
 public static DataTable Datas()
 {
     return(Executar.Reader("usp_listar_agendamentos_datas", Buscar.Usuario.IsTecnico ? Buscar.Usuario.ID : 0));
 }
Example #21
0
 public static DataTable Finalizados()
 {
     return(Executar.Reader("usp_listar_agendamentos_finalizados", Buscar.Editor.CPF));
 }
Example #22
0
 public static DataTable Contatos()
 {
     return(Executar.Reader("usp_listar_mensagens_contatos", Buscar.Usuario.ID, Buscar.Usuario.Classe));
 }
Example #23
0
 public static DataTable All()
 {
     return(Executar.Reader("usp_listar_mensagens", Buscar.Usuario.ID, Buscar.Editor.ID));
 }
Example #24
0
 public static DataTable Conversa(object value1)
 {
     return(Executar.Reader("usp_listar_mensagens", value1, Usuario.ID));
 }