Exemplo n.º 1
0
 private void btnEkle_Click(object sender, EventArgs e)
 {
     if (txtAracAdi.Text==""  || txtModel.Text=="" || txtPlaka.Text=="" || txtUcret.Text=="")
     {
         MessageBox.Show("Lutfen Boşlukları Doldurunuz", "Uyarı");
     }
     else
     {
         DialogResult sonuc = MessageBox.Show("Emin misiniz ?", "Uyarı", MessageBoxButtons.YesNo);
         if (sonuc==DialogResult.Yes)
         {
             try
             {
                 Arac a = new Arac();
                 a.AracAdi = txtAracAdi.Text;
                 a.Marka = Convert.ToInt32(cbModel.SelectedValue.ToString());
                 a.Model = Convert.ToInt32(txtModel.Text);
                 a.Plaka = txtPlaka.Text;
                 a.Yakıt = cbYakit.SelectedItem.ToString();
                 a.Ucret = Convert.ToInt32(txtUcret.Text);
                 a.Durum = "Uygun";
                 content.Aracs.InsertOnSubmit(a);
                 content.SubmitChanges();
                 MessageBox.Show("Eklendi ", "Uyarı");
             }
             catch (Exception)
             {
                 MessageBox.Show("Hata !", "Uyarı");
             }
         }
         else
         {
             MessageBox.Show("İşleminiz İptal Edildi");
         }
     }
     txtAracAdi.Clear();
     txtModel.Clear();
     txtPlaka.Clear();
     txtUcret.Clear();
     cbModel.Text = "";
     cbYakit.Text = "";
     txtAracAdi.Focus();
     AracListele();
 }
Exemplo n.º 2
0
 private void btnEkle_Click(object sender, EventArgs e)
 {
     if (txtAracAdi.Text == "" || txtModel.Text == "" || txtPlaka.Text == "" || txtUcret.Text == "")
     {
         MessageBox.Show("Lutfen Boşlukları Doldurunuz", "Uyarı");
     }
     else
     {
         DialogResult sonuc = MessageBox.Show("Emin misiniz ?", "Uyarı", MessageBoxButtons.YesNo);
         if (sonuc == DialogResult.Yes)
         {
             try
             {
                 Arac a = new Arac();
                 a.AracAdi = txtAracAdi.Text;
                 a.Marka   = Convert.ToInt32(cbModel.SelectedValue.ToString());
                 a.Model   = Convert.ToInt32(txtModel.Text);
                 a.Plaka   = txtPlaka.Text;
                 a.Yakıt   = cbYakit.SelectedItem.ToString();
                 a.Ucret   = Convert.ToInt32(txtUcret.Text);
                 a.Durum   = "Uygun";
                 content.Aracs.InsertOnSubmit(a);
                 content.SubmitChanges();
                 MessageBox.Show("Eklendi ", "Uyarı");
             }
             catch (Exception)
             {
                 MessageBox.Show("Hata !", "Uyarı");
             }
         }
         else
         {
             MessageBox.Show("İşleminiz İptal Edildi");
         }
     }
     txtAracAdi.Clear();
     txtModel.Clear();
     txtPlaka.Clear();
     txtUcret.Clear();
     cbModel.Text = "";
     cbYakit.Text = "";
     txtAracAdi.Focus();
     AracListele();
 }
Exemplo n.º 3
0
 partial void DeleteArac(Arac instance);
Exemplo n.º 4
0
 partial void UpdateArac(Arac instance);
Exemplo n.º 5
0
 partial void InsertArac(Arac instance);
Exemplo n.º 6
0
 private void detach_Aracs(Arac entity)
 {
     this.SendPropertyChanging();
     entity.Marka1 = null;
 }
Exemplo n.º 7
0
 private void attach_Aracs(Arac entity)
 {
     this.SendPropertyChanging();
     entity.Marka1 = this;
 }
Exemplo n.º 8
0
 partial void DeleteArac(Arac instance);
Exemplo n.º 9
0
 partial void UpdateArac(Arac instance);
Exemplo n.º 10
0
 partial void InsertArac(Arac instance);
Exemplo n.º 11
0
		private void detach_Aracs(Arac entity)
		{
			this.SendPropertyChanging();
			entity.Marka1 = null;
		}
Exemplo n.º 12
0
		private void attach_Aracs(Arac entity)
		{
			this.SendPropertyChanging();
			entity.Marka1 = this;
		}