private void temizle() { TextBox1.Clear(); TextBox2.Clear(); TextBox3.Clear(); TextBox4.Clear(); }
private void Button2_Click(object sender, EventArgs e) { DialogResult g; g = MessageBox.Show(DataGridView1.CurrentRow.Cells[0].Value + " nolu Barkod Kodu silinecek. Emin misiniz?", "DİKKAT", MessageBoxButtons.YesNo, MessageBoxIcon.Stop); if (g == DialogResult.Yes) { OleDbCommand cmd = new OleDbCommand("DELETE FROM BARKOD WHERE BarkodNo=" + Convert.ToInt32(DataGridView1.CurrentRow.Cells[0].Value), bag); cmd.ExecuteNonQuery(); MessageBox.Show("Barkod veritabanından silindi.", "İŞLEM TAMAM", MessageBoxButtons.OK, MessageBoxIcon.Information); DataGridView1.Rows.Clear(); TextBox3.Clear(); TextBox4.Clear(); cmd = new OleDbCommand("SELECT * FROM BARKOD ORDER BY BarkodNo ASC", bag); OleDbDataReader oku = cmd.ExecuteReader(); while (oku.Read()) { DataGridView1.Rows.Add(oku[0].ToString(), oku[1].ToString()); } oku.Close(); } else { return; } }
private void Button1_Click(object sender, EventArgs e) { baglanti(); if (TextBox3.Text == "" || TextBox4.Text == "") { MessageBox.Show("Barkod Numarası ve Tanım alanlarını doldurunuz.", "UYARI", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } OleDbCommand cmd = new OleDbCommand("INSERT INTO BARKOD(BarkodNo,Tanim,StokKodu) Values('" + TextBox3.Text + "','" + TextBox4.Text + "','" + TextBox1.Text + "')", bag); cmd.ExecuteNonQuery(); MessageBox.Show("Veritabanına Kaydedildi.", "İŞLEM TAMAM", MessageBoxButtons.OK, MessageBoxIcon.Information); DataGridView1.Rows.Clear(); TextBox3.Clear(); TextBox4.Clear(); cmd = new OleDbCommand("SELECT * FROM BARKOD ORDER BY BarkodNo ASC", bag); OleDbDataReader oku = cmd.ExecuteReader(); while (oku.Read()) { DataGridView1.Rows.Add(oku[0].ToString(), oku[1].ToString()); } oku.Close(); }
private void button9_Click(object sender, EventArgs e) { TextBox1.Clear(); TextBox2.Clear(); TextBox3.Clear(); TextBox4.Clear(); textBox5.Clear(); }
private void DeliteRecord_Click(object sender, RoutedEventArgs e) { AllRecords.RemoveAt(ListView1.SelectedIndex); TextBox1.Clear(); TextBox2.Clear(); TextBox3.Clear(); TextBox4.Clear(); MessageBox.Show("Complite!"); }
private void limpiar() { TextBox1.Clear(); TextBox4.Clear(); textBox5.Clear(); TextBox6.Clear(); TextBox7.Clear(); TextBox3.Clear(); }
private void Button3_Click(object sender, EventArgs e) { TextBox2.Clear(); ComboBox1.Text = ""; TextBox4.Clear(); TextBox1.Clear(); TextBox3.Clear(); TextBox5.Clear(); textBox6.Clear(); TextBox2.Focus(); }
public void ClearTextBoxes() { TextBox1.Clear(); TextBox2.Clear(); TextBox3.Clear(); TextBox4.Clear(); TextBox5.Clear(); TextBox6.Clear(); TextBox7.Clear(); TextBox8.Clear(); TextBoxID.Clear(); }
private void Button2_Click(object sender, EventArgs e) { TextBox1.Clear(); TextBox2.Clear(); TextBox3.Clear(); TextBox4.Clear(); TextBox5.Clear(); MessageBox.Show("Se ha eliminado el reporte.", "Importante", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1); }
/*private void Button_Click_3(object sender, RoutedEventArgs e) * { * try * { * Text1.Clear(); * } * catch * { * } * }*/ private void Button_Click_4(object sender, RoutedEventArgs e) { try { TextBox1.Clear(); TextBox2.Clear(); TextBox3.Clear(); TextBox4.Clear(); } catch { } }
private void ChangeRecord_Click(object sender, RoutedEventArgs e) { if (Check()) { AllRecords.RemoveAt(ListView1.SelectedIndex); AllRecords.Add(new Record(TextBox1.Text, TextBox2.Text, TextBox3.Text, TextBox4.Text)); TextBox1.Clear(); TextBox2.Clear(); TextBox3.Clear(); TextBox4.Clear(); MessageBox.Show("Complite!"); } }
private void Button3_Click(object sender, EventArgs e) { TextBox1.Clear(); TextBox2.Clear(); TextBox3.Clear(); TextBox4.Clear(); TextBox5.Clear(); TextBox6.Clear(); TextBox7.Clear(); TextBox8.Clear(); TextBox9.Clear(); ComboBox1.Items.Clear(); RadioButton1.Checked = false; RadioButton2.Checked = false; }
private void Button_Click_3(object sender, RoutedEventArgs e) { string xmlfilepath = @"D:\programs\Visual Studio 2017\XML Märkmed\MärkmeteHarjutus\MärkmeteHarjutus\bin\Debug\Märkmed.xml"; XmlDocument doc = new XmlDocument(); doc.Load(xmlfilepath); XmlNode node2 = doc.SelectSingleNode("/Märkmik/Märge/Sisu"); if (node2 != null) { XmlNode parent2 = node2.ParentNode; parent2.RemoveChild(node2); string newXML = doc.OuterXml; TextBox4.Clear(); doc.Save("Märkmed.xml"); } }
private void button5_Click(object sender, EventArgs e) { SqlConnection con = new SqlConnection(@"Data Source=(localdb)\v11.0;Initial Catalog=hekim1;Integrated Security=SSPI"); con.Open(); SqlCommand cmd = new SqlCommand("UPDATE bilgiler1 SET tedavi=@tedavi,adi=@adi,soyadi=@soyadi,ilet=@ilet,dipnot=@dipnot", con); cmd.Parameters.AddWithValue("tedavi", ComboBox1.Text); cmd.Parameters.AddWithValue("adi", TextBox1.Text); cmd.Parameters.AddWithValue("soyadi", TextBox2.Text); cmd.Parameters.AddWithValue("ilet", TextBox3.Text); cmd.Parameters.AddWithValue("dipnot", TextBox4.Text); cmd.Parameters.AddWithValue("tc", textBox5.Text); cmd.ExecuteNonQuery(); con.Close(); MessageBox.Show("Kayıt Düzeltilmiştir"); TextBox1.Clear(); TextBox2.Clear(); TextBox3.Clear(); TextBox4.Clear(); }
private void Button2_Click(object sender, EventArgs e) { TextBox1.Clear(); TextBox2.Clear(); TextBox3.Clear(); TextBox4.Clear(); TextBox5.Clear(); TextBox6.Clear(); TextBox7.Clear(); TextBox8.Clear(); TextBox9.Clear(); TextBox10.Clear(); ComboBox1.Text = "Selecione..."; ComboBox2.Text = "Selecione..."; CheckBox1.Checked = false; CheckBox2.Checked = false; CheckBox3.Checked = false; RadioButton1.Checked = false; RadioButton2.Checked = false; TextBox1.Focus(); }
private void Button1_Click(object sender, EventArgs e) { if (textBox5.Text.Trim() == "") { MessageBox.Show("TC KİMLİK NUMARASI BOŞ OLAMAZ"); textBox5.Focus(); return; } if (TextBox1.Text.Trim() == "") { MessageBox.Show("AD BOŞ OLAMAZ"); textBox5.Focus(); return; } if (true) { } bilgiler uye = new bilgiler(); uye.ad = TextBox1.Text; uye.soyad = TextBox2.Text; uye.ilet = TextBox3.Text; uye.dipnot = TextBox4.Text; uye.tc = Convert.ToInt32(textBox5.Text); uye.tedavi = ComboBox1.Text; uye.tarih = dateTimePicker1.Value.Date; uye.saat = comboBox2.Text; uye.kutu = checkBox1.Checked; uye.kutu1 = checkBox2.Checked; uye.kutu2 = checkBox3.Checked; uye.kutu3 = checkBox4.Checked; uye.kutu4 = checkBox5.Checked; uye.kutu5 = checkBox6.Checked; uye.kutu6 = checkBox7.Checked; uye.kutu7 = checkBox8.Checked; uye.kutu8 = checkBox9.Checked; uye.kutu9 = checkBox10.Checked; uye.kutu10 = checkBox11.Checked; uye.kutu11 = checkBox12.Checked; uye.kutu12 = checkBox13.Checked; uye.kutu13 = checkBox14.Checked; uye.kutu14 = checkBox15.Checked; uye.kutu15 = checkBox16.Checked; uye.kutu16 = checkBox17.Checked; uye.kutu17 = checkBox18.Checked; uye.kutu18 = checkBox19.Checked; uye.kutu19 = checkBox20.Checked; uye.kutu20 = checkBox21.Checked; uye.kutu21 = checkBox22.Checked; uye.kutu22 = checkBox23.Checked; uye.kutu23 = checkBox24.Checked; uye.kutu24 = checkBox25.Checked; uye.kutu25 = checkBox26.Checked; uye.kutu26 = checkBox27.Checked; uye.kutu27 = checkBox28.Checked; uye.kutu28 = checkBox29.Checked; uye.kutu29 = checkBox30.Checked; uye.kutu30 = checkBox31.Checked; uye.kutu31 = checkBox32.Checked; db.bilgilers.InsertOnSubmit(uye); db.SubmitChanges(); MessageBox.Show("RANDEVU KAYIT EDİLDİ"); TextBox1.Clear(); TextBox2.Clear(); TextBox3.Clear(); TextBox4.Clear(); textBox5.Clear(); comboBox4.Items.Clear(); }