forked from saitorhan/OtobusOtomasyon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathForm_MusteriIslenleri.cs
63 lines (58 loc) · 1.97 KB
/
Form_MusteriIslenleri.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace otobus_otomasyon_linq
{
public partial class Form_MusteriIslenleri : Form
{
private VeriTabaniIslemleriDataContext ctx;
public static bool form_acik_mi;
public Form_MusteriIslenleri()
{
InitializeComponent();
}
private void Form_MusteriIslenleri_Load(object sender, EventArgs e)
{
form_acik_mi = true;
ctx = new VeriTabaniIslemleriDataContext();
}
private void Form_MusteriIslenleri_FormClosing(object sender, FormClosingEventArgs e)
{
form_acik_mi = false;
}
private void button__ara_Click(object sender, EventArgs e)
{
Musteriler musteri = null;
try
{
int musteriID = Convert.ToInt32(textBox_ID.Text);
musteri = ctx.Musterilers.Where(m => m.ID == musteriID).Select(m => m).Single();
Form_musteriKayitAl musteriKaydi = new Form_musteriKayitAl(musteri);
foreach (Form item in this.MdiParent.MdiChildren)
{
if (item.Text==musteriKaydi.Text)
{
item.Close();
musteriKaydi.MdiParent = this.MdiParent;
musteriKaydi.Show();
this.Close();
return;
}
}
musteriKaydi.MdiParent = this.MdiParent;
musteriKaydi.Show();
this.Close();
}
catch (Exception ex)
{
Form_ana_ekran.HataKaydi(ex);
toolStripStatusLabel_bilgi.Text="Aranan müşteri bulunamadı";
}
}
}
}