private void button3_Click(object sender, EventArgs e) { if (cmbRacun.SelectedValue != null && tbRedniBroj.Text != "") { stavkaRacuna.ID_Racuna = int.Parse(cmbRacun.SelectedValue.ToString()); stavkaRacuna.Redni_Broj = int.Parse(tbRedniBroj.Text); stavkaRacuna.izbrisiStavkuRacuna(stavkaRacuna); MessageBox.Show("Uspesno ste izbrisali stavku iz evidencije", "Informacija", MessageBoxButtons.OK, MessageBoxIcon.Information); combo.popuniCmbRacun(cmbRacun); table = (DataTable)cmbRacun.DataSource; groupBox1.Visible = true; groupBox2.Visible = false; groupBox3.Visible = false; dgvStavkeRacuna.Visible = false; tbRedniBroj.Text = ""; foreach (var c in this.Controls) { if (c is TextBox) { ((TextBox)c).Text = String.Empty; } else if (c is ComboBox) { ((ComboBox)c).Text = String.Empty; } } } else { MessageBox.Show("Morate izabrati Otkupno mesto"); } }
private void button2_Click(object sender, EventArgs e) { bool provera = false; foreach (var c in this.Controls) { if (c is TextBox && ((TextBox)c).Text == "") { MessageBox.Show("Morate popuniti sva polja"); provera = false; break; } else if (c is ComboBox && ((ComboBox)c).Text == "") { MessageBox.Show("Morate popuniti sva polja"); provera = false; break; } else { provera = true; } } if (provera == true) { stavkaRacuna.Redni_Broj = int.Parse(tbRedniBroj.Text); stavkaRacuna.Kolicina = int.Parse(tbKolicina.Text); stavkaRacuna.ID_Racuna = int.Parse(cmbRacun.SelectedValue.ToString()); stavkaRacuna.ID_Proizvoda = int.Parse(cmbProizvod.SelectedValue.ToString()); stavkaRacuna.izmeniStavkuRacuna(stavkaRacuna); MessageBox.Show("Uspesno ste izmenili podatke ", "Informacija", MessageBoxButtons.OK, MessageBoxIcon.Information); combo.popuniCmbRacun(cmbRacun); combo.popuniCmbProizvod(cmbProizvod); table = (DataTable)cmbRacun.DataSource; groupBox2.Visible = false; groupBox3.Visible = false; dgvStavkeRacuna.Visible = false; tbRedniBroj.Text = ""; tbKolicina.Text = ""; foreach (var c in this.Controls) { if (c is TextBox) { ((TextBox)c).Text = String.Empty; } else if (c is ComboBox) { ((ComboBox)c).Text = String.Empty; } } } }
public frmAzuriranjeStavkiRacuna() { InitializeComponent(); combo = new PopunaCmBox(); kupac = new KupacBLL(); jm = new JedinicaMereBLL(); proizvod = new ProizvodBLL(); racun = new RacunBLL(); stavkaRacuna = new StavkaRacunaBLL(); table = new DataTable(); dgv = new PopunaCmBox(); combo.popuniCmbRacun(cmbRacun); table = (DataTable)cmbRacun.DataSource; combo.popuniCmbKupac(cmbKupac); combo.popuniCmbRacun(cmbRacun); combo.popuniCmbProizvod(cmbProizvod); dgvStavkeRacuna.AllowUserToAddRows = false; dgvStavkeRacuna.AllowUserToAddRows = false; dgvStavkeRacuna.ReadOnly = true; }
public frmIsporuka() { InitializeComponent(); statusisporuke = new StatusIsporukeBLL(); racun = new RacunBLL(); combo = new PopunaCmBox(); isporuka = new IsporukaBLL(); table = new DataTable(); combo.popuniCmbRacun(cmbRacun); combo.popuniCmbStatusIsporuke(cmbStatusIsporuke); }
public frmUnosStavkiRacuna() { InitializeComponent(); combo = new PopunaCmBox(); klijent = new KupacBLL(); artikal = new ProizvodBLL(); jm = new JedinicaMereBLL(); racun = new RacunBLL(); stavkaRacuna = new StavkaRacunaBLL(); table = new DataTable(); combo.popuniCmbRacun(cmbRacun); table = (DataTable)cmbRacun.DataSource; combo.popuniCmbKupac(cmbKupac); combo.popuniCmbProizvod(cmbProizvod); combo.popuniCmbJM(cmbJM); }