-
Notifications
You must be signed in to change notification settings - Fork 0
/
rezerve_et.cs
152 lines (117 loc) · 4.03 KB
/
rezerve_et.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace Rent_A_Car
{
public partial class rezerve_et : Form
{
public static SqlConnection baglanti = database.baglan();
public static string belirle = "";
public BorderStyle BorderStyle { get; set; }
public rezerve_et()
{
InitializeComponent();
this.FormBorderStyle = FormBorderStyle.None;
}
private void kisiler_btn_Click(object sender, EventArgs e)
{
belirle = "rezerve tıklandı";
musteri_sec musterisec = new musteri_sec();
musterisec.ShowDialog();
belirle = "";
}
private void tamam_btn_Click(object sender, EventArgs e)
{
try
{
string eklenecek = "insert into aracRezerve(baslama,bitis,ad,soyad,plaka,marka) values('"+tarih_bas_time.Text+"','"+tarih_son_time.Text+"','"+musteri_adi_txt.Text+"','"+soyad_txt.Text+"','"+plaka_txt.Text+"','"+marka.Text+"')";
SqlCommand cmd = new SqlCommand(eklenecek, baglanti);
cmd.ExecuteNonQuery();
}
catch
{
Bildiri.Uyari("BİLİNMEYEN HATA!!", Bildiri.AlertType.hata);
}
string rezervle = "";
try
{
rezervle = "update tabloAraclar set durum='REZERVE' where plaka='" + plaka_txt.Text + "'";
}
catch
{
Bildiri.Uyari("SEÇİM YAPMADINIZ!", Bildiri.AlertType.dikkat);
}
SqlCommand komut = new SqlCommand(rezervle, baglanti);
try
{
komut.ExecuteNonQuery();
}
catch
{
Bildiri.Uyari("DURUM DEĞİŞTİRLEMEDİ!!", Bildiri.AlertType.hata);
}
Hide();
}
private void mevcut_rezervasyon_btn_Click(object sender, EventArgs e)
{
mevcut_rezervler mevcutrezervler = new mevcut_rezervler();
mevcutrezervler.label3.Text = plaka_txt.Text;
mevcutrezervler.ShowDialog();
}
private void label3_Click(object sender, EventArgs e)
{
}
private void pictureBox2_Click(object sender, EventArgs e)
{
}
private void pictureBox2_MouseLeave(object sender, EventArgs e)
{
}
private void pictureBox2_MouseMove(object sender, MouseEventArgs e)
{
}
int SimdikiWidth = 1366;
int SimdikiHeight = 768;
private void rezerve_et_Load(object sender, EventArgs e)
{
Rectangle ClientCozunurluk = new Rectangle();
ClientCozunurluk = Screen.GetBounds(ClientCozunurluk);
float OranWidth = ((float)ClientCozunurluk.Width / (float)SimdikiWidth);
float OranHeight = ((float)ClientCozunurluk.Height / (float)SimdikiHeight);
this.Scale(OranWidth, OranHeight);
}
private void panel1_MouseDown(object sender, MouseEventArgs e)
{
}
private void panel1_MouseMove(object sender, MouseEventArgs e)
{
}
private void panel1_MouseUp(object sender, MouseEventArgs e)
{
}
private void panel3_MouseDown(object sender, MouseEventArgs e)
{
}
private void panel3_MouseMove(object sender, MouseEventArgs e)
{
}
private void panel3_MouseUp(object sender, MouseEventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
Close();
}
private void bunifuImageButton1_Click(object sender, EventArgs e)
{
this.Hide();
}
}
}