Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (tbxSifra.Text != string.Empty)
- {
- MessageBox.Show("Da bi ste uneli novog morate da obrisete sifru");
- }
- Klijent x = new Klijent();
- if (tbxIme.Text!=string.Empty) x.Ime = tbxIme.Text;
- if (tbxPrezime.Text != string.Empty) x.Prezime = tbxPrezime.Text;
- if (tbxAdresa.Text != string.Empty) x.Adresa = tbxAdresa.Text;
- if (tbxTelefon.Text != string.Empty) x.Telefon = tbxTelefon.Text;
- if (tbxMail.Text != string.Empty) x.Email = tbxMail.Text;
- if (rbtnDa.Checked) x.Aktivan = true;
- else x.Aktivan = false;
- //citanje iz combobox-a
- if (cbxGrad.SelectedIndex > -1)
- {
- x.GradId = (int)cbxGrad.SelectedValue;
- }
- try
- {
- if (x.Upisi())
- {
- tbxSifra.Text = x.KlijentID.ToString();
- MessageBox.Show("Klijent upisan");
- }
- else throw new Exception(x.ErrorMessage);
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.Message);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement