public void ucitaj() { Parking park = new Parking(); park.TrenutnoStanje(); textBox1.Text = park.BrojMesta.ToString(); }
public void ucitaj() { Parking park = new Parking(); park.TrenutnoStanje(); textBox1.Text = park.CenaPoSatu.ToString(); textBox2.Text = park.CenaPoDanu.ToString(); }
private void SefForma_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Control && e.KeyCode == Keys.P) { Uvid uv = new Uvid(); uv.Show(); } else if (e.KeyCode == Keys.Control && e.KeyCode == Keys.T) { try { Parking parking = new Parking(); Vozilo vozilo = new Vozilo(); parking.TrenutnoStanje(); int BrojSlobodnih = parking.BrojMesta - vozilo.IzbrojVozila(); textBoxBrojSlobodnih.Text = BrojSlobodnih.ToString(); textBoxBrojVozila.Text = vozilo.IzbrojVozila().ToString(); label2.Visible = true; label3.Visible = true; textBoxBrojSlobodnih.Visible = true; textBoxBrojVozila.Visible = true; } catch (Exception ex) { if (ex is SystemException || ex is NotSupportedException || ex is UnauthorizedAccessException || ex is FormatException || ex is IndexOutOfRangeException || ex is InsufficientMemoryException || ex is EntryPointNotFoundException || ex is EntryPointNotFoundException || ex is EvaluateException || ex is InvalidCastException || ex is InvalidProgramException) { MessageBox.Show(ex.Message, "Greska"); } else { MessageBox.Show(ex.Message, "Greska"); } } } }
private void ucitaj_podatke() { try { Parking par = new Parking(); par.TrenutnoStanje(); adresa = par.adresa; naziv = par.naziv; textBox1.Text = naziv; textBox2.Text = adresa; } catch (Exception ex) { MessageBox.Show(ex.Message, "Greska"); } }
private void izmeniBrojMestaToolStripMenuItem_Click(object sender, EventArgs e) { IzmenaMesta zime = new IzmenaMesta(); zime.ShowDialog(); Parking parking = new Parking(); Vozilo vozilo = new Vozilo(); parking.TrenutnoStanje(); int BrojSlobodnih = parking.BrojMesta - vozilo.IzbrojVozila(); textBoxBrojSlobodnih.Text = BrojSlobodnih.ToString(); textBoxBrojVozila.Text = vozilo.IzbrojVozila().ToString(); }
private void button1_Click(object sender, EventArgs e) { try { Naplata naplata = new Naplata(); naplata.Radnik = logRadnik; naplata.ShowDialog(); textBoxRadnik.Text = logRadnik.Ime; Parking parking = new Parking(); Vozilo vozilo = new Vozilo(); parking.TrenutnoStanje(); BrojSlobodnih = parking.BrojMesta - vozilo.IzbrojVozila(); textBoxBrojSlobodnih.Text = BrojSlobodnih.ToString(); textBoxBrojVozila.Text = vozilo.IzbrojVozila().ToString(); } catch (Exception ex) { if (ex is SystemException || ex is OleDbException || ex is NotSupportedException || ex is UnauthorizedAccessException || ex is FormatException || ex is IndexOutOfRangeException || ex is InsufficientMemoryException || ex is EntryPointNotFoundException || ex is EntryPointNotFoundException || ex is EvaluateException || ex is InvalidCastException || ex is AccessViolationException || ex is InvalidProgramException) { MessageBox.Show(ex.Message, "GRESKA"); } else { MessageBox.Show(ex.Message, "GRESKA"); } } }
public void PostaviRacun() { try { textBoxTablice.Text = Tablice; textBoxVremeDolaska.Text = Dolazak.ToString(); textBoxVremeOdlaska.Text = DateTime.Now.ToString(); TimeSpan span = DateTime.Now.Subtract(Dolazak); textBox1.Text = span.TotalMinutes.ToString("#"); Parking parking = new Parking(); parking.TrenutnoStanje(); textBox2.Text = parking.naziv + "," + parking.adresa; int c = 0; if (span.Hours < 8) { cena = parking.CenaPoSatu / 60; cena *= Decimal.Parse(span.TotalMinutes.ToString()); textBoxUkupno.Text = cena.ToString("#"); } else { c = span.Hours / 8; cena = parking.CenaPoDanu * c + (span.Hours % 8) * parking.CenaPoSatu; textBoxUkupno.Text = cena.ToString("#"); } } catch (Exception ex) { MessageBox.Show(ex.Message, "Greska"); } }