void Inicia(CondicaoInicial c) { fitaBase.Clear(); for (int i = 0; i < regras.Length; i++) { regras[i] = new Lei(TipoDeRegra.Nenhuma); } for (int i = 0; i < c.nDeBotoes; i++) { AdicionaNovaCor(); } for (int i = 0; i < c.nDeRegrasIniciaisASeremSorteadas; i++) { regras[i] = SorteiaRegra(); } for (int i = 0; i < c.regrasIniciais.Length; i++) { if (c.regrasIniciais[i] != TipoDeRegra.Nenhuma) { regras[i] = SorteiaObjetosParaUmaRegra(c.regrasIniciais[i]); } } AtualizaAFitaEsperada(); }
void AdicionaNovaRegraERemoveAMaisAntiga() { regras[2] = regras[1]; regras[1] = regras[0]; regras[0] = new Lei(TipoDeRegra.Nenhuma); regras[0] = SorteiaRegra(); }
/// <summary> /// Apaga da tabela o atual objeto Lei /// </summary> public async Task ApagarLei(Lei lei) { try { await database.DeleteAsync(lei); } catch { Debug.WriteLine("\nError in AutoDatabase.cs: ApagarLei)\n"); } }
/// <summary> /// Realiza um UPDATE na FK da row tabela Geral (caso haja alguma lei selecionada no dropdown). /// </summary> public async Task <Lei> GuardarLei(Lei lei, int autoId) { if (lei.LeiId != 0) { lei = await App.Database.SaveLei(lei, autoId); } return(lei); }
public async Task <Lei> _PHInsert_Lei(Lei lei) { try { await database.InsertAsync(lei); return(lei); } catch { Debug.WriteLine("\nErro in AutoDatabase.cs: _PHInsert_Lei().\n"); return(lei); } }
/// <summary> /// Carrega os objetos com o input correspondente das entries/pickers /// </summary> private void loadObjetos() { Lei = new Lei { LeiId = currentLeiId, Titulo = titulo.SelectedItem.ToString(), Pontos = Int32.Parse(pontos.Text), Descricao = descricao.Text, Min = decimal.Parse(min.Text), Max = decimal.Parse(max.Text), Prazo = Int32.Parse(prazo.Text) }; }
public AutoLegislacaoVM() { Lei = new Lei { Titulo = "", Pontos = 0, Descricao = "", Min = 0, Max = 0, Prazo = 0 }; }
/// <summary> /// Realiza um UPDATE na FK da row na tabela Geral. /// </summary> public async Task <Lei> SaveLei(Lei lei, int autoId) { if (lei.LeiId != 0) { try { var query = $"UPDATE Geral SET LeiId = { lei.LeiId } WHERE AutoId = { autoId }"; await database.QueryAsync <Geral>(query); return(lei); } catch { Debug.WriteLine("\nError in AutoDatabase.cs: SaveLei().\n"); return(lei); } } return(lei); }
void Start() { //Sorteia e inicia os botoes EscolheEIniciaBotoes(); vidas = 3; clock = 0; agulha = 0; fase = 0; unidadeDoCiclo = -1; audioSource = this.GetComponent <AudioSource>(); regras = new Lei[3]; regras[0] = new Lei(TipoDeRegra.Nenhuma); regras[1] = new Lei(TipoDeRegra.Nenhuma); regras[2] = new Lei(TipoDeRegra.Nenhuma); objetosRegras[0].lei = regras[0]; objetosRegras[1].lei = regras[1]; objetosRegras[2].lei = regras[2]; Inicia(ciclos[fase].condInit); }
/// <summary> /// Método responsável pela pesquisa das leis do estado de São Paulo /// </summary> /// <param name="webDriver"></param> /// <param name="ano"></param> /// <param name="hide"></param> public void PesquisaSP(string webDriver, int ano, bool hide) { // Criação do IwebDriver IWebDriver driver; // Lista que armazenará os links dos documentos List <string> listaDocumentos = new List <string>(); // Booleano para auxiliar nas pesqusias bool continuar = true; // Coleção de Matchs, armazenará o resultado das Expressões Regulares MatchCollection Documentos; // Lista contendo os dados das leis extraídas List <Lei> leis = new List <Lei>(); // If para identificar qual webdriver será usado, Chrome ou Phantom if (webDriver.Equals("Chrome")) { var serviceC = ChromeDriverService.CreateDefaultService(); serviceC.HideCommandPromptWindow = hide; driver = new ChromeDriver(serviceC); } else if (webDriver.Equals("Phantom")) { var serviceP = PhantomJSDriverService.CreateDefaultService(); serviceP.HideCommandPromptWindow = hide; driver = new PhantomJSDriver(serviceP); } else { return; } // Iniciando o acesso ao site Legislativo driver.Navigate().GoToUrl("http://www.legislacao.sp.gov.br/legislacao/dg280202.nsf/Leis?OpenView"); // Busca do ano que será efetuada a pesquisa driver.FindElements(By.TagName("img")).FirstOrDefault(c => c.GetAttribute("alt").Contains(ano.ToString())).Click(); // Do-While usado para percorrer todos os documentos do ano // Enquanto existir documento, ele continuará a paginação na busca de mais documentos do { // Armazena a lista de Matches com os documentos encontrados na página Documentos = Regex.Matches(driver.PageSource, @"href=\""(?<linkDoc>\/legislacao\/\S+?OpenDocument)\""", RegexOptions.Compiled | RegexOptions.IgnoreCase); // Foreach percorrendo toda a lista de Matches e adicionando o link do documento no listaDocumentos foreach (Match doc in Documentos) { listaDocumentos.Add(doc.Groups["linkDoc"].Value); } // Compara se terminou os documentos, caso contrário, vá para a outra página e continue a pesquisa. if (Documentos.Count == 0) { continuar = false; } else { driver.FindElement(By.Id("RetângulodePontodeAcesso41")).Click(); } } while (continuar); // For para percorrer os documentos encontrados e adicionar na lista de Leis // o For está limitado a apenas 10 documentos, para que não demore ao nosso retorno, mas pode ser ... // ... limitado ao tamanho total das leis encontradas trocando o valor "10" por "listaDocumentos.Count" for (int i = 0; i < 10; i++) { // Istancia a entidade Lei Lei lei = new Lei(); driver.Navigate().GoToUrl(siteSP + listaDocumentos[i]); // Criamos 3 variáveis para nos auxliar, um Match, um DateTime e um string, ele verificará o retorno do site e depois irá inserir na nossa entidade Match Titulo = Regex.Match(driver.PageSource, @">(?<titulo>Lei\s*n.\s*\d.*?de\s+(?<data>\d+\s+de\s*\S+\s*de\s*\d+))<", RegexOptions.Compiled | RegexOptions.IgnoreCase); DateTime data = new DateTime(); string texto = string.Empty; // Pegamos a data da lei e armazenamos na variável auxiliar "data" DateTime.TryParse(Titulo.Groups["data"].Value.Trim(), out data); // Pegamos o texto da lei, tratamos e armazenamos na variável auxiliar "texto" texto = Regex.Replace(driver.PageSource, @"<.*?>", "", RegexOptions.Compiled | RegexOptions.Singleline); texto = Regex.Match(texto, @"(?<texto>GOVERNO\s+DO\s+ESTADO.+?)\d+\.doc\s*$", RegexOptions.Singleline | RegexOptions.Multiline).Groups["texto"].Value.Trim(); // Inserimos os dados na nossa entidade lei.Titulo = Titulo.Groups["titulo"].Value.Trim(); lei.Data = data; lei.Texto = texto; // Inserimos essa entidade na nossa lista de Leis leis.Add(lei); } // Quando finalizar a extração, fechamos o IWebDriver e exibimos nosso resultado na tela através do DataGridView driver.Quit(); dataGridView1.DataSource = leis; }
// ******************************************************************** // #region Criacao automatica de Autos e Pessoas (placeholders) private async Task UnexpectedCreationism() { var id = await App.Database.GetNextGeralId(); if (id == 0) { // ********************************************************************************** // ********************************************************************************** Geral = new Geral { CodProcesso = "2018-DENR/1", PastaFisica = "53194-DJSO/2018", DataAuto = new DateTime(2018, 07, 15), HoraAuto = DateTime.Now.TimeOfDay, IsAcidenteViacao = false, EntDecisora = "Tribunal", EntidadeAutuante = "PE", EntResponsavel = "DGTR", CodigoInfracao = "COD-302", TipoInfracao = "Teste 1", CategoriaInfracao = "Teste 2" }; await App.Database._PHInsert_Geral(Geral); Geral = new Geral { CodProcesso = "2018-JSCE/2", PastaFisica = "56391-LAKE/2018", DataAuto = new DateTime(2018, 07, 17), HoraAuto = DateTime.Now.TimeOfDay, IsAcidenteViacao = true, EntDecisora = "Tribunal", EntidadeAutuante = "AN", EntResponsavel = "PE", CodigoInfracao = "COD-563", TipoInfracao = "Teste 2", CategoriaInfracao = "Teste 1" }; await App.Database._PHInsert_Geral(Geral); Geral = new Geral { CodProcesso = "2018-ATBN/3", PastaFisica = "45380-EKAL/2018", DataAuto = new DateTime(2018, 06, 30), HoraAuto = DateTime.Now.TimeOfDay, IsAcidenteViacao = false, EntDecisora = "Tribunal", EntidadeAutuante = "AN", EntResponsavel = "DGTR", CodigoInfracao = "COD-941", TipoInfracao = "Teste 3", CategoriaInfracao = "Teste 4" }; await App.Database._PHInsert_Geral(Geral); Geral = new Geral { CodProcesso = "2018-MBAE/4", PastaFisica = "78513-ORNA/2018", DataAuto = new DateTime(2018, 07, 22), HoraAuto = DateTime.Now.TimeOfDay, IsAcidenteViacao = false, EntDecisora = "DGTR", EntidadeAutuante = "DGTR", EntResponsavel = "Tribunal", CodigoInfracao = "COD-915", TipoInfracao = "Teste 4", CategoriaInfracao = "Teste 1" }; await App.Database._PHInsert_Geral(Geral); Geral = new Geral { CodProcesso = "2018-AJEN/5", PastaFisica = "28370-LAIR/2018", DataAuto = new DateTime(2018, 07, 25), HoraAuto = DateTime.Now.TimeOfDay, IsAcidenteViacao = false, EntDecisora = "AN", EntidadeAutuante = "PE", EntResponsavel = "Tribunal", CodigoInfracao = "COD-226", TipoInfracao = "Teste 2", CategoriaInfracao = "Teste 3" }; await App.Database._PHInsert_Geral(Geral); Geral = new Geral { CodProcesso = "2018-LSAN/6", PastaFisica = "47382-LAIR/2018", DataAuto = new DateTime(2018, 08, 03), HoraAuto = DateTime.Now.TimeOfDay, IsAcidenteViacao = true, EntDecisora = "PE", EntidadeAutuante = "AN", EntResponsavel = "Tribunal", CodigoInfracao = "COD-826", TipoInfracao = "Teste 4", CategoriaInfracao = "Teste 1" }; await App.Database._PHInsert_Geral(Geral); // ********************************************************************************** // ********************************************************************************** Localizacao = new Localizacao { Rua = "Rua Morais Soares", EdificioPorta = "143", Cidade = "Lisboa", Localidade = "Arroios" }; await App.Database._PHInsert_Local(Localizacao); Localizacao = new Localizacao { Rua = "Rua António Pereira Carrilho", EdificioPorta = "5", Cidade = "Lisboa", Localidade = "Arroios" }; await App.Database._PHInsert_Local(Localizacao); Localizacao = new Localizacao { Rua = "Rua António Pedro", EdificioPorta = "46", Cidade = "Lisboa", Localidade = "Areeiro" }; await App.Database._PHInsert_Local(Localizacao); Localizacao = new Localizacao { Rua = "Rua São Vicente", EdificioPorta = "19", Cidade = "Loures", Localidade = "São João da Talha" }; await App.Database._PHInsert_Local(Localizacao); Localizacao = new Localizacao { Rua = "Rua da Estrela", EdificioPorta = "12", Cidade = "Loures", Localidade = "Catujal" }; await App.Database._PHInsert_Local(Localizacao); Localizacao = new Localizacao { Rua = "Rua Carlos Mardel", EdificioPorta = "5", Cidade = "Alverca", Localidade = "Alfundão" }; await App.Database._PHInsert_Local(Localizacao); // ********************************************************************************** // ********************************************************************************** Pessoa = new Pessoa { Nome = "Filipa Alexandra Silva", DataNascimento = new DateTime(1974, 01, 23), NIF = new Random().Next(100000000, 299999999), Genero = "Feminino", EstadoCivil = "Solteiro", Nacionalidade = "Portugal", Naturalidade = "Lisboa", Contacto1 = new Random().Next(910000000, 939999999), Contacto2 = new Random().Next(211000000, 299999999), Email = "*****@*****.**" }; await App.Database._PHInsert_Pess(Pessoa); new Random().Next(100000000, 299999999); Pessoa = new Pessoa { Nome = "Ricardo Brito", DataNascimento = new DateTime(1991, 03, 09), NIF = new Random().Next(100000000, 299999999), Genero = "Masculino", EstadoCivil = "Divorciado", Nacionalidade = "Portugal", Naturalidade = "Loures", Contacto1 = new Random().Next(910000000, 939999999), Contacto2 = new Random().Next(211000000, 299999999), Email = "*****@*****.**" }; await App.Database._PHInsert_Pess(Pessoa); new Random().Next(100000000, 299999999); Pessoa = new Pessoa { Nome = "Aníbal Pascoal de Melo", DataNascimento = new DateTime(1954, 06, 15), NIF = new Random().Next(100000000, 299999999), Genero = "Masculino", EstadoCivil = "Viúvo", Nacionalidade = "Brasil", Naturalidade = "Campinas", Contacto1 = new Random().Next(910000000, 939999999), Contacto2 = new Random().Next(211000000, 299999999), Email = "*****@*****.**" }; await App.Database._PHInsert_Pess(Pessoa); new Random().Next(100000000, 299999999); Pessoa = new Pessoa { Nome = "Manuel Santigao Ortega", DataNascimento = new DateTime(1984, 04, 03), NIF = new Random().Next(100000000, 299999999), Genero = "Masculino", EstadoCivil = "Solteiro", Nacionalidade = "México", Naturalidade = "Guadalajara", Contacto1 = new Random().Next(910000000, 939999999), Contacto2 = new Random().Next(211000000, 299999999), Email = "*****@*****.**" }; await App.Database._PHInsert_Pess(Pessoa); new Random().Next(100000000, 299999999); Pessoa = new Pessoa { Nome = "José Pinheiro Douglas", DataNascimento = new DateTime(1985, 04, 25), NIF = new Random().Next(100000000, 299999999), Genero = "Masculino", EstadoCivil = "Solteiro", Nacionalidade = "Portugal", Naturalidade = "Londres", Contacto1 = new Random().Next(910000000, 939999999), Contacto2 = new Random().Next(211000000, 299999999), Email = "*****@*****.**" }; await App.Database._PHInsert_Pess(Pessoa); new Random().Next(100000000, 299999999); Pessoa = new Pessoa { Nome = "Teresa Maria Lopes", DataNascimento = new DateTime(1953, 09, 11), NIF = new Random().Next(100000000, 299999999), Genero = "Feminino", EstadoCivil = "Casado", Nacionalidade = "Angola", Naturalidade = "Luanda", Contacto1 = new Random().Next(910000000, 939999999), Contacto2 = new Random().Next(211000000, 299999999), Email = "*****@*****.**" }; await App.Database._PHInsert_Pess(Pessoa); new Random().Next(100000000, 299999999); Pessoa = new Pessoa { Nome = "Joana Filipa Albuquerque Brito", DataNascimento = new DateTime(1991, 08, 04), NIF = new Random().Next(100000000, 299999999), Genero = "Feminino", EstadoCivil = "Casado", Nacionalidade = "Portugal", Naturalidade = "Aveiro", Contacto1 = new Random().Next(910000000, 939999999), Contacto2 = new Random().Next(211000000, 299999999), Email = "*****@*****.**" }; await App.Database._PHInsert_Pess(Pessoa); new Random().Next(100000000, 299999999); Pessoa = new Pessoa { Nome = "Norberto Leonel Santos", DataNascimento = new DateTime(1966, 07, 23), NIF = new Random().Next(100000000, 299999999), Genero = "Masculino", EstadoCivil = "Divorciado", Nacionalidade = "Brasil", Naturalidade = "Minas Gerais", Contacto1 = new Random().Next(910000000, 939999999), Contacto2 = new Random().Next(211000000, 299999999), Email = "*****@*****.**" }; await App.Database._PHInsert_Pess(Pessoa); new Random().Next(100000000, 299999999); Pessoa = new Pessoa { Nome = "Filipe Faria Maria", DataNascimento = new DateTime(1948, 02, 28), NIF = new Random().Next(100000000, 299999999), Genero = "Masculino", EstadoCivil = "Viúvo", Nacionalidade = "Portugal", Naturalidade = "Braga", Contacto1 = new Random().Next(910000000, 939999999), Contacto2 = new Random().Next(211000000, 299999999), Email = "*****@*****.**" }; await App.Database._PHInsert_Pess(Pessoa); // ********************************************************************************** // ********************************************************************************** Autuante = new Autuante { EntidadeAutuante = "PE", IsPresenciado = false, Equipamento = "Alcoolímetro" }; await App.Database._PHInsert_Autuante(Autuante); Autuante = new Autuante { EntidadeAutuante = "AN", IsPresenciado = true, Equipamento = "Multímetro" }; await App.Database._PHInsert_Autuante(Autuante); Autuante = new Autuante { EntidadeAutuante = "AN", IsPresenciado = false, Equipamento = "Não Definido" }; await App.Database._PHInsert_Autuante(Autuante); Autuante = new Autuante { EntidadeAutuante = "DGTR", IsPresenciado = true, Equipamento = "Voltímetro" }; await App.Database._PHInsert_Autuante(Autuante); Autuante = new Autuante { EntidadeAutuante = "PE", IsPresenciado = true, Equipamento = "Alcoolímetro" }; await App.Database._PHInsert_Autuante(Autuante); Autuante = new Autuante { EntidadeAutuante = "AN", IsPresenciado = true, Equipamento = "Multímetro" }; await App.Database._PHInsert_Autuante(Autuante); // ********************************************************************************** // ********************************************************************************** Lei = new Lei { Titulo = "Legislação Geral, Artigo 1º", Pontos = 2, Descricao = "Placeholder Text 1", //Descricao = "As you do not know the path of the wind, or how the body is formed in a mother’s womb, so you cannot understand the work of God, Maker of all things. Now you shall have 15 days to pay thy 75€ fee.", Min = 30, Max = 90, Prazo = 15 }; await App.Database._PHInsert_Lei(Lei); Lei = new Lei { Titulo = "Legislação Geral, Artigo 2º", Pontos = 4, Descricao = "Placeholder Text 2", //Descricao = "This is my commandment, that you love one another as I have loved you. Greater love has no one than this, that someone lay down his life for his friends. You are my friends if you do what I command you.", Min = 90, Max = 220, Prazo = 25 }; await App.Database._PHInsert_Lei(Lei); Lei = new Lei { Titulo = "Legislação Geral, Artigo 3º", Pontos = 6, Descricao = "Placeholder Text 3", //Descricao = "All that the Father gives me will come to me, and whoever comes to me I will never cast out. You shall now cast out those 120€ from thy wallet.", Min = 120, Max = 380, Prazo = 30 }; await App.Database._PHInsert_Lei(Lei); Lei = new Lei { Titulo = "Legislação Geral, Artigo 4º", Pontos = 6, Descricao = "Placeholder Text 4", //Descricao = "For sin will have no dominion over you, since you are not under law but under grace. Just kidding.. thy license is still losing 6 points, don't forget the 340€ as well.", Min = 220, Max = 500, Prazo = 40 }; await App.Database._PHInsert_Lei(Lei); Lei = new Lei { Titulo = "Legislação Geral, Artigo 5º", Pontos = 12, Descricao = "Placeholder Text 5", //Descricao = "Yes Richard, 12 points off... Should have thinked twice before using the elderly golf camp as a mini rally circuit for your monster truck!", Min = 220, Max = 500, Prazo = 40 }; await App.Database._PHInsert_Lei(Lei); Lei = new Lei { Titulo = "Legislação Geral, Artigo 6º", Pontos = 4, Descricao = "Placeholder Text 6", //Descricao = "For I know the plans I have for you, plans to prosper you and not to harm you, plans to give you hope and a future. Plans to get your 100€ on the next 20 days.", Min = 70, Max = 200, Prazo = 20 }; await App.Database._PHInsert_Lei(Lei); Lei = new Lei { Titulo = "Legislação Geral, Artigo 7º", Pontos = 2, Descricao = "Placeholder Text 7", //Descricao = "Taste and see that the LORD is good; blessed is the one who takes refuge in him. But even more blessed is the one willing to pay 20€ so the officer can pretend you never met eachother.", Min = 40, Max = 100, Prazo = 8 }; await App.Database._PHInsert_Lei(Lei); Lei = new Lei { Titulo = "Legislação Geral, Artigo 8º", Pontos = 6, Descricao = "Placeholder Text 8", //Descricao = "What, then, shall we say in response to these things? If God is for us, who can be against us? Certainly not the court. Nope, they can't be against us. Nope.", Min = 250, Max = 560, Prazo = 45 }; await App.Database._PHInsert_Lei(Lei); Lei = new Lei { Titulo = "Legislação Geral, Artigo 9º", Pontos = 12, Descricao = "Placeholder Text 9", //Descricao = "For now we see only a reflection as in a mirror; then we shall see face to face. Now i know in part; then a shall know fully. But you pay me now 20€ and i - miraculously - will not know at all you were ever here.", Min = 345, Max = 700, Prazo = 60 }; await App.Database._PHInsert_Lei(Lei); Lei = new Lei { Titulo = "Legislação Geral, Artigo 10º", Pontos = 1, Descricao = "Placeholder Text 10", //Descricao = "Too bad, I ran out of quotes. Sorry.", Min = 0, Max = 15, Prazo = 1 }; await App.Database._PHInsert_Lei(Lei); // ********************************************************************************** // ********************************************************************************** Apreensao = new Apreensao { Objeto = "Objeto 1", DataApreensao = new DateTime(2018, 07, 05), HoraApreensao = DateTime.Now.TimeOfDay, LeiApreensao = 1, TipoApreensao = "Temporária", Coima = 30, Motivo = "Sem motivo aparente." }; await App.Database._PHInsert_Apreensao(Apreensao); Apreensao = new Apreensao { Objeto = "Objeto 2", DataApreensao = new DateTime(2018, 07, 06), HoraApreensao = DateTime.Now.TimeOfDay, LeiApreensao = 3, TipoApreensao = "Temporária", Coima = 50, Motivo = "Sem motivo aparente." }; await App.Database._PHInsert_Apreensao(Apreensao); Apreensao = new Apreensao { Objeto = "Objeto 3", DataApreensao = new DateTime(2018, 07, 07), HoraApreensao = DateTime.Now.TimeOfDay, LeiApreensao = 5, TipoApreensao = "Definitiva", Coima = 20, Motivo = "Sem motivo aparente." }; await App.Database._PHInsert_Apreensao(Apreensao); Apreensao = new Apreensao { Objeto = "Objeto 4", DataApreensao = new DateTime(2018, 07, 08), HoraApreensao = DateTime.Now.TimeOfDay, LeiApreensao = 8, TipoApreensao = "Não Definido", Coima = 35, Motivo = "Sem motivo aparente." }; await App.Database._PHInsert_Apreensao(Apreensao); Apreensao = new Apreensao { Objeto = "Objeto 5", DataApreensao = new DateTime(2018, 07, 09), HoraApreensao = DateTime.Now.TimeOfDay, LeiApreensao = 6, TipoApreensao = "Temporária", Coima = 40, Motivo = "Sem motivo aparente." }; await App.Database._PHInsert_Apreensao(Apreensao); Apreensao = new Apreensao { Objeto = "Objeto 1", DataApreensao = new DateTime(2018, 08, 03), HoraApreensao = DateTime.Now.TimeOfDay, LeiApreensao = 1, TipoApreensao = "Temporária", Coima = 30, Motivo = "Sem motivo aparente." }; await App.Database._PHInsert_Apreensao(Apreensao); // ********************************************************************************** // ********************************************************************************** Pagamento = new Pagamento { NIF = new Random().Next(100000000, 299999999), DUC = new Random().Next(100000000, 299999999), DataLimite = new DateTime(2018, 09, 14), HoraPagamento = DateTime.Now.TimeOfDay, TipoPagamento = "Monetário", Valor = new Random().Next(30, 520), DataInicial = new DateTime(2018, 07, 14), DataFinal = new DateTime(2018, 09, 14), DataDevolucao = new DateTime(2018, 07, 27) }; await App.Database._PHInsert_Pagamento(Pagamento); Pagamento = new Pagamento { NIF = new Random().Next(100000000, 299999999), DUC = new Random().Next(100000000, 299999999), DataLimite = new DateTime(2018, 08, 04), HoraPagamento = DateTime.Now.TimeOfDay, TipoPagamento = "Transferência Bancária", Valor = new Random().Next(30, 520), DataInicial = new DateTime(2018, 07, 04), DataFinal = new DateTime(2018, 08, 04), DataDevolucao = new DateTime(2018, 07, 06) }; await App.Database._PHInsert_Pagamento(Pagamento); Pagamento = new Pagamento { NIF = new Random().Next(100000000, 299999999), DUC = new Random().Next(100000000, 299999999), DataLimite = new DateTime(2018, 10, 20), HoraPagamento = DateTime.Now.TimeOfDay, TipoPagamento = "Prestações Mensais", Valor = new Random().Next(30, 520), DataInicial = new DateTime(2018, 08, 05), DataFinal = new DateTime(2018, 08, 20), DataDevolucao = new DateTime(2018, 08, 05) }; await App.Database._PHInsert_Pagamento(Pagamento); Pagamento = new Pagamento { NIF = new Random().Next(100000000, 299999999), DUC = new Random().Next(100000000, 299999999), DataLimite = new DateTime(2018, 10, 08), HoraPagamento = DateTime.Now.TimeOfDay, TipoPagamento = "Monetário", Valor = new Random().Next(30, 520), DataInicial = new DateTime(2018, 07, 08), DataFinal = new DateTime(2018, 10, 08), DataDevolucao = new DateTime(2018, 08, 02) }; await App.Database._PHInsert_Pagamento(Pagamento); Pagamento = new Pagamento { NIF = new Random().Next(100000000, 299999999), DUC = new Random().Next(100000000, 299999999), DataLimite = new DateTime(2018, 07, 30), HoraPagamento = DateTime.Now.TimeOfDay, TipoPagamento = "Referência Multibanco", Valor = new Random().Next(30, 520), DataInicial = new DateTime(2018, 07, 15), DataFinal = new DateTime(2018, 07, 30), DataDevolucao = new DateTime(2018, 07, 27) }; await App.Database._PHInsert_Pagamento(Pagamento); Pagamento = new Pagamento { NIF = new Random().Next(100000000, 299999999), DUC = new Random().Next(100000000, 299999999), DataLimite = new DateTime(2018, 10, 20), HoraPagamento = DateTime.Now.TimeOfDay, TipoPagamento = "Prestações Mensais", Valor = new Random().Next(30, 520), DataInicial = new DateTime(2018, 08, 05), DataFinal = new DateTime(2018, 08, 20), DataDevolucao = new DateTime(2018, 08, 05) }; await App.Database._PHInsert_Pagamento(Pagamento); await App.Database._PHUpdate_Geral(1, 1, 1, 7, 3, 1, 1, 1, 1); await App.Database._PHUpdate_Geral(2, 2, 2, 8, 4, 2, 2, 2, 2); await App.Database._PHUpdate_Geral(3, 3, 3, 9, 5, 3, 3, 3, 3); await App.Database._PHUpdate_Geral(4, 4, 4, 1, 6, 4, 4, 4, 4); await App.Database._PHUpdate_Geral(5, 5, 5, 2, 7, 5, 5, 5, 5); await App.Database._PHUpdate_Geral(6, 6, 9, 6, 8, 6, 6, 6, 6); Debug.WriteLine("\nTodos os 'placeholders' criados. Alegadamente.\n"); } }