1 / 20

G épjármű kölcsönzés i szoftver

G épjármű kölcsönzés i szoftver. Windows / .NET / MS SQL. Készítette: Vajda Zsombor vzs@inf.elte.hu. A projectről általánosan. Bejelentkezés. A projectről általánosan. A Főmenü. Egyszerűbb táblakarbantartás. Userek, Munkatársak… táblák, megjelenítése és módosítása. DE MOST….

urbain
Télécharger la présentation

G épjármű kölcsönzés i szoftver

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Gépjármű kölcsönzési szoftver Windows / .NET / MS SQL Készítette: Vajda Zsombor vzs@inf.elte.hu

  2. A projectről általánosan • Bejelentkezés

  3. A projectről általánosan • A Főmenü

  4. Egyszerűbb táblakarbantartás • Userek, Munkatársak… táblák, megjelenítése és módosítása

  5. DE MOST…

  6. Először a kapcsolódó adatbázis:

  7. A Szűrők:

  8. DataView gepjarmuvekDataView = autokolcsonzoDataSet.Gepjarmuvek.DefaultView; gepjarmuvekBindingSource.DataSource = gepjarmuvekDataView; private void textBox1_TextChanged(object sender, EventArgs e) { gepjarmuvekDataView.RowFilter = "gyartmany LIKE '" + textBox1.Text + "*' AND kategoria LIKE '" +textBox3.Text+ "*' AND tipus LIKE '"+textBox2.Text+"*'"; } A Szűrők:

  9. Szűrők: private void gepjarmuvekDataGridView_SelectionChanged(object sender, EventArgs e) { if (gepjarmuvekDataGridView.RowCount > 1) { int i = ((DataGridView)sender).CurrentRow.Index; if (i >= 0 && i <= gepjarmuvekDataGridView.RowCount) { kikolcsonzottekBindingSource.DataSource= gepjarmuvekDataView[i].CreateChildView("Gepjarmuvek_Kikolcsonzottek"); tarifakBindingSource.DataSource = gepjarmuvekDataView[i].CreateChildView("Gepjarmuvek_Tarifak"); } } else { kikolcsonzottekBindingSource.DataSource = autokolcsonzoDataSet.Kikolcsonzottek; tarifakBindingSource.DataSource = autokolcsonzoDataSet.Tarifak; } }

  10. A Kölcsönzés: A dátummal kapcsolatos üzenetek

  11. A Kölcsönzés: TextBox-ok: Jármü: this.rendszamTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.gepjarmuvekBindingSource, "rendszam", true)); Partner: this.nevTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.partnerekBindingSource, "nev", true));

  12. A Kölcsönzés(idő kiszámítása): private void KolcsonzesiIdo() { pido=1; System.DateTime inddate = inddateDateTimePicker.Value; System.DateTime erkdate = erkdateDateTimePicker.Value; while (inddate < erkdate) { inddate = inddate.AddDays(1); pido++; } idoTextBox.Text = pido.ToString(); }

  13. A Kölcsönzés(díj kiszámítása): private void DijKiszamitas() { pdij = 0; int priceido = int.Parse(idoTextBox.Text.ToString()); int price = int.Parse(tarifakDataGridView.Rows[0].Cells[1]. Value.ToString()); pdij = (priceido * price); dijTextBox.Text = pdij.ToString(); }

  14. A Kölcsönzés(idő ellenőrzése): Már lefoglalt időpontok: Az új időpont:

  15. A Kölcsönzés(idő ellenőrzése): Egy nem ellenőrzött dolog: Már lefoglalt időpontok: Az új időpont:

  16. A Kölcsönzés(idő ellenőrzése): List<System.DateTime> tolDateTime = new List<DateTime>(); List<System.DateTime> igDateTime = new List<DateTime>(); private void button3_Click(object sender, EventArgs e) { tolDateTime.Clear(); igDateTime.Clear(); kolcsonozhetoe = true; textBox5.Text = ""; textBox6.Text = ""; for (int j = 0; j < kikolcsonzottekDataGridView.Rows.Count-1; j++) { System.DateTime tido = DateTime.Parse(kikolcsonzottekDataGridView. Rows[j].Cells[0].Value.ToString()); tolDateTime.Add(tido); System.DateTime iido = DateTime.Parse(kikolcsonzottekDataGridView. Rows[j].Cells[1].Value.ToString()); igDateTime.Add(iido); }

  17. A Kölcsönzés(idő ellenőrzése): DateTime inddate = inddateDateTimePicker.Value; DateTime erkdate = erkdateDateTimePicker.Value; for(int i=0; i<tolDateTime.Count; i++){ if ( inddate.CompareTo(tolDateTime[i]) >= 0 && inddate.CompareTo(igDateTime[i]) <= 0) { textBox5.Text = "Indulas nem Jo!!!"; kolcsonozhetoe = false; } if (erkdate.CompareTo(tolDateTime[i]) >= 0 && erkdate.CompareTo(igDateTime[i]) <= 0) { textBox6.Text = "Erkezes nem Jo!!!"; kolcsonozhetoe = false; } }

  18. A Kölcsönzés(idő ellenőrzése): if (kolcsonozhetoe) { indulas = inddateDateTimePicker.Value; erkezes = erkdateDateTimePicker.Value; KolcsonzesiIdo(); DijKiszamitas(); }

  19. A Kölcsönzés: DataRowView drw = kikolcsonzottekDataView.AddNew(); drw["kikolcsonzottID"] = int.Parse(kikolID)+1; drw["auto_ID"] = int.Parse(gepjID); drw["tol"] = inddateDateTimePicker.Value; drw["ig"] = erkdateDateTimePicker.Value; drw.EndEdit(); DataRowView drv = kolcsonzesDataView.AddNew(); drv["kolcsonzesID"] = kolcsID; drv["jarmu"] = rendszamTextBox.Text; drv["partner"] = nevTextBox.Text; drv["szerzodat"] = System.DateTime.Now; drv["ido"] = pido; drv["dij"] = pdij; drv["eloleg"] = int.Parse(elolegTextBox.Text); drv["inddate"] = indulas; drv["erkdate"] = erkezes; drv.EndEdit();

  20. Vége http://people.inf.elte.hu/vzs/eloadas Köszönöm a figyelmet

More Related