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()); }
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()); }
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()); }
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(); }
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()); }
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()); }
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()); }
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; } }
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()); }
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()); }
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()); }
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()); }
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()); }
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)); }
public static DataTable PorNome(object value1 = null) { return(Executar.Reader("usp_listar_clientes", value1)); }
public static DataTable PorNome(object value1) { return(Executar.Reader("usp_listar_funcionarios", value1)); }
public static DataTable Tecnicos() { return(Executar.Reader("usp_listar_funcionarios_tecnicos", Buscar.Estabelecimento.CargoTecnico)); }
public static DataTable PorDia(object value1) { return(Executar.Reader("usp_listar_agendamentos", value1, (Buscar.Usuario.IsTecnico ? Buscar.Usuario.ID : 0))); }
public static DataTable PorCliente(int value1) { return(Executar.Reader("usp_listar_agendamentos_cliente", value1)); }
public static DataTable Datas() { return(Executar.Reader("usp_listar_agendamentos_datas", Buscar.Usuario.IsTecnico ? Buscar.Usuario.ID : 0)); }
public static DataTable Finalizados() { return(Executar.Reader("usp_listar_agendamentos_finalizados", Buscar.Editor.CPF)); }
public static DataTable Contatos() { return(Executar.Reader("usp_listar_mensagens_contatos", Buscar.Usuario.ID, Buscar.Usuario.Classe)); }
public static DataTable All() { return(Executar.Reader("usp_listar_mensagens", Buscar.Usuario.ID, Buscar.Editor.ID)); }
public static DataTable Conversa(object value1) { return(Executar.Reader("usp_listar_mensagens", value1, Usuario.ID)); }