private void linkLabel1_LinkClicked_1(object sender, LinkLabelLinkClickedEventArgs e) { if (of != null && of.IsDisposed) { of = new Form8(); } // Call Show(), not ShowDialog() because ShowDialog will block the UI thread // until you close the dialog. of.Show(); of.BringToFront(); }
private void cidadeToolStripMenuItem_Click(object sender, EventArgs e) { Form8 f8 = new Form8(); f8.ShowDialog(); if (f8.sqlString != null && f8.sqlString != "") carregaGrid(f8.sqlString); }
private void button1_Salvar_Click(object sender, EventArgs e) { try { if (textBox2Senha.Text != textBox1Senha2.Text) { MessageBox.Show("Senhas não conferem", ".:: Atenção ::.", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } string tempL = textBox1Login.Text.Replace(" ", ""); string cryptLogin = textBox1Login.Text.Replace(" ", ""); textBox1Login.Text = EncryptLogin(cryptLogin); string tempP = textBox2Senha.Text.Replace(" ", ""); string cryptPassword = textBox2Senha.Text.Replace(" ", ""); textBox2Senha.Text = EncryptLogin(cryptPassword); DataSet ds; string sXMLFile = (CaminhoDadosXML(caminho) + @"System.net.b.xml"); string strID = idt; //Criando o DataSet ds = new DataSet(); //Preenche o DataSet com o XML ds.ReadXml(sXMLFile); //Fazer uma busca no DataSet para encontrar o cliente com o ID da QueryString DataRow dRow = ds.Tables["B_dado"].Select(" id = '" + strID + "'")[0]; //Definindo os valores do DataRow com os valores do formulário. dRow["Cliente"] = textBox1Client.Text.Replace(" ", ""); dRow["url"] = textBox1Link.Text.Replace(" ", ""); dRow["Username"] = textBox1Login.Text; dRow["Password"] = textBox2Senha.Text.Replace(" ", ""); //Atualizar o XML com os novos valores. ds.WriteXml(sXMLFile); Form8 obj = (Form8)Application.OpenForms["Form8"]; obj.GetDados(); textBox1Login.Text = tempL; textBox2Senha.Text = tempP; MessageBox.Show("Salvo com Sucesso!", ".:: Sucesso ::.", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { File.AppendAllText(logpath + @"\" + "log_erro.txt", "\r\n" + DateTime.Now + @" | " + ex.Message); MessageBox.Show("Erro " + ex.Message, "Erro", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void btnProyecto_Click(object sender, EventArgs e) { DialogResult resultado = MessageBox.Show("Quieres aceptar un proyecto nuevo?", "Nuevo Proyecto", MessageBoxButtons.YesNo); if (resultado == DialogResult.Yes) { Form8 nuevoProyeco = new Form8(); nuevoProyeco.IdPartida = lblPartida.Text; this.Hide(); nuevoProyeco.Show(); this.Close(); } }
public async Task <ActionResult <Form8> > PostForm8(Form8 form8) { try { var newForm8 = new Form8 { StudentSetUpId = form8.StudentSetUpId, WorkExperience = form8.WorkExperience }; _context.Form8.Add(newForm8); await _context.SaveChangesAsync(); return(CreatedAtAction("PostForm8", new { id = newForm8.Id }, newForm8)); } catch (DbUpdateException) { return(StatusCode(500)); } }
private void button5_Click(object sender, EventArgs e) { List <Student> l3 = new List <Student>(); if (this.Tag != null) { l3 = (List <Student>) this.Tag; } if (lista_import.Count != 0) { foreach (Student s in lista_import) { l3.Add(s); } } Form8 frm = new Form8(); l3.Sort(); frm.Tag = l3; frm.ShowDialog(); }
private void button1_Click(object sender, EventArgs e) { nome = textBox1.Text; senha = textBox9.Text; StreamWriter cadastro = new StreamWriter("C:/Users/sirll/Desktop/BACK/Loja Coretta/doc/cadastro" + nome + senha + ".txt", true, Encoding.UTF8); cadastro.WriteLine(textBox1.Text); cadastro.WriteLine(textBox2.Text); cadastro.WriteLine(textBox3.Text); cadastro.WriteLine(textBox4.Text); cadastro.WriteLine(textBox5.Text); cadastro.WriteLine(textBox6.Text); cadastro.WriteLine(textBox7.Text); cadastro.WriteLine(textBox8.Text); cadastro.WriteLine(textBox9.Text); Form8 novo = new Form8(); novo.Show(); Hide(); }
private void pictureBox8_Click(object sender, EventArgs e) { string sql = "SELECT * FROM username WHERE email='" + textBox1.Text + "' AND password='******'"; MySqlConnection con = new MySqlConnection("host=localhost;user=projectnew;password=123456;database=projectnew"); MySqlCommand cmd = new MySqlCommand(sql, con); con.Open(); MySqlDataReader reader = cmd.ExecuteReader(); if (reader.HasRows) { while (reader.Read()) { if (reader.GetString("status") == "Admin") { this.Hide(); Form8 fm8 = new Form8(textBox1.Text); fm8.text = textBox1.Text; fm8.Show(); break; } else { this.Hide(); Form3 fm3 = new Form3(textBox1.Text); fm3.text = textBox1.Text; fm3.Show(); } } } else { MessageBox.Show("E-mail หรือ Password ไม่ถูกต้อง กรุณาลองใหม่อีกครั้ง"); } reader.Close(); con.Close(); }
public async Task <IActionResult> PutForm8(int?id, Form8 form8) { if (id == null) { return(BadRequest("No Record to Update")); } try { var updateForm8 = await _context.Form8.FirstOrDefaultAsync(m => m.StudentSetUpId == id); if (updateForm8 == null) { return(NotFound($"Record Not Found For The Selected Id {id}")); } //updateForm8.WorkExperience = form8.WorkExperience; updateForm8.EmployerSupervisorId = form8.EmployerSupervisorId; updateForm8.StudentExperience = form8.StudentExperience; updateForm8.Reason = form8.Reason; updateForm8.DateIn = form8.DateIn; updateForm8.Performance = form8.Performance; updateForm8.StudentAccept = form8.StudentAccept; updateForm8.ReasonNot = form8.ReasonNot; updateForm8.FutureEmploy = form8.FutureEmploy; updateForm8.SupApproved = form8.SupApproved = true; await _context.SaveChangesAsync(); return(Ok(updateForm8)); } catch (Exception ex) { return(StatusCode(500, ex.Message)); } }
private void button1_Salvar_Click(object sender, EventArgs e) { try { if (textBox2Senha.Text != textBox1Senha2.Text) { MessageBox.Show("Senhas não conferem", ".:: Atenção ::.", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } id = Convert.ToString(GetRandomNumber(1, 9999)); string tempL = textBox1Login.Text.Replace(" ", ""); string cryptLogin = textBox1Login.Text.Replace(" ", ""); textBox1Login.Text = EncryptLogin(cryptLogin); string tempP = textBox2Senha.Text.Replace(" ", ""); string cryptPassword = textBox2Senha.Text.Replace(" ", ""); textBox2Senha.Text = EncryptLogin(cryptPassword); using (DataSet dsResultado = new DataSet()) { dsResultado.ReadXml(CaminhoDadosXML(caminho) + @"System.net.b.xml"); if (dsResultado.Tables.Count != 0) { dsResultado.Tables[0].Rows.Add(dsResultado.Tables[0].NewRow()); dsResultado.Tables[0].Rows[dsResultado.Tables[0].Rows.Count - 1]["id"] = id; dsResultado.Tables[0].Rows[dsResultado.Tables[0].Rows.Count - 1]["Cliente"] = textBox1Client.Text; dsResultado.Tables[0].Rows[dsResultado.Tables[0].Rows.Count - 1]["url"] = textBox1Link.Text; dsResultado.Tables[0].Rows[dsResultado.Tables[0].Rows.Count - 1]["Username"] = textBox1Login.Text; dsResultado.Tables[0].Rows[dsResultado.Tables[0].Rows.Count - 1]["Password"] = textBox2Senha.Text; dsResultado.AcceptChanges(); //-- Escreve para o arquivo XML final usando o método Write dsResultado.WriteXml(CaminhoDadosXML(caminho) + @"System.net.b.xml", XmlWriteMode.IgnoreSchema); } } //using (DataSet dsRess = new DataSet()) //{ // sessao sessao = new sessao(); // sessao.idSessao = Convert.ToInt32(id); // sessao.ClienteSessao = textBox1Client.Text; // XmlTextWriter writer = new XmlTextWriter(CaminhoDadosXML(caminho) + @"System.net.b.xml", System.Text.Encoding.UTF8); // writer.WriteStartDocument(true); // writer.Formatting = Formatting.Indented; // writer.Indentation = 2; // writer.WriteStartElement("B_dados"); // writer.WriteStartElement("sessao"); // writer.WriteStartElement("idsessao"); // writer.WriteString(Convert.ToString(sessao.idSessao)); // writer.WriteEndElement(); // writer.WriteStartElement("Cliente"); // writer.WriteString(sessao.ClienteSessao); // writer.WriteEndElement(); // writer.WriteEndElement(); // writer.WriteEndDocument(); // writer.Close(); // dsRess.ReadXml(CaminhoDadosXML(caminho) + @"System.net.b.xml"); //} // Salva na sessao //XElement x = new XElement("sessao"); //x.Add(new XAttribute("id", id)); //x.Add(new XAttribute("Cliente", textBox1Client.Text)); //XElement xml = XElement.Load(CaminhoDadosXML(caminho) + @"System.net.b.xml"); //xml.Add(x); //xml.Save(CaminhoDadosXML(caminho) + @"System.net.b.xml"); textBox1Login.Text = tempL; textBox2Senha.Text = tempP; Form8 obj = (Form8)Application.OpenForms["Form8"]; obj.GetDados(); MessageBox.Show("Salvo com Sucesso!", ".:: Sucesso ::.", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { File.AppendAllText(logpath + @"\" + "log_erro.txt", "\r\n" + DateTime.Now + @" | " + ex.Message); MessageBox.Show("Erro " + ex.Message, "Erro", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void button3_Click_1(object sender, EventArgs e) { Form8 f8 = new Form8(); f8.textBox24.Text = textBox5.Text; f8.textBox13.Text = textBox1.Text; f8.textBox14.Text = textBox2.Text; switch (comboBox2.SelectedIndex) { case 0: f8.label14.Text = "Ретро"; f8.label14.Visible = true; break; case 1: f8.label14.Text = "Вантажівка"; f8.label14.Visible = true; break; case 2: f8.label14.Text = "ЕS-Стандарт"; f8.label14.Visible = true; break; case 3: f8.label14.Text = "G-33"; f8.label14.Visible = true; break; case 4: f8.label14.Text = "F1-24"; f8.label14.Visible = true; break; case 5: f8.label14.Text = "G12"; f8.label14.Visible = true; break; case 6: f8.label14.Text = "PR24"; f8.label14.Visible = true; break; case 7: f8.label14.Text = "ES-24"; f8.label14.Visible = true; break; case 8: f8.label14.Text = "ES-32"; f8.label14.Visible = true; break; case 9: f8.label14.Text = "F1"; f8.label14.Visible = true; break; case 10: f8.label14.Text = "G15"; f8.label14.Visible = true; break; case 11: f8.label14.Text = "Open-G12"; f8.label14.Visible = true; break; } f8.Show(); }
private void button5_Click(object sender, EventArgs e) { Form8 f = new Form8(); f.ShowDialog(); }
private void button2_Click(object sender, EventArgs e) { Form a = new Form8(); a.Show(); }
private void kaynakçaOluşturToolStripMenuItem_Click(object sender, EventArgs e) { Form8 form8 = new Form8(); form8.Show(); }
protected override void OnCreateMainForm() { MainForm = new Form8(); }
private void button15_Click(object sender, EventArgs e) { if (label25.Text == "") { MessageBox.Show("������� ����� ��� �������� �������� ��������!"); return; } Form8 f8 = new Form8(ReaderRecordFormular); f8.ShowDialog(); }