Esempio n. 1
0
        private void DodajVmestna_Click(object sender, EventArgs e)
        {
            FirstWebService.ServiceClient client = new FirstWebService.ServiceClient();
            int maxavti       = client.VrniAvte().Count();
            int maxAvtosaloni = client.VrniAvtoSalone().Count();

            if (!string.IsNullOrEmpty(FKAvtoPolje.Text) && !string.IsNullOrEmpty(FKAvtoSalonPolje.Text))
            {
                int nekaj, nekaj2;
                nekaj  = Convert.ToInt32(FKAvtoPolje.Text);
                nekaj2 = Convert.ToInt32(FKAvtoSalonPolje.Text);
                if (nekaj > 0 && nekaj2 > 0 && nekaj <= maxavti && nekaj2 <= maxAvtosaloni)
                {
                    client.DodajAvtoVavtoSalon(Convert.ToInt32(FKAvtoPolje.Text), Convert.ToInt32(FKAvtoSalonPolje.Text));
                    MessageBox.Show("Uspesno dodano!");
                    Close();
                    Vmestna vmestna = new Vmestna();
                    vmestna.ShowDialog();
                }
                else
                {
                    MessageBox.Show("To tak ne bo slo, pubec dragi!");
                }
            }
            else
            {
                MessageBox.Show("Polja nesmejo biti prazna!");
            }
        }
Esempio n. 2
0
        private void UrediVmestna_Click(object sender, EventArgs e)
        {
            FirstWebService.ServiceClient client = new FirstWebService.ServiceClient();
            client.poosodobiAvtoVSalonu(Convert.ToInt32(VmestnaList.SelectedItems[0].Text), Convert.ToInt32(FKAvtoPolje.Text), Convert.ToInt32(FKAvtoSalonPolje.Text));
            MessageBox.Show("Uspesno!");
            Close();
            Vmestna neke = new Vmestna();

            neke.Show();
        }
Esempio n. 3
0
        private void OdstraniVmestna_Click(object sender, EventArgs e)
        {
            ListViewItem listView = new ListViewItem(VmestnaList.SelectedItems[0].SubItems[0].Text);

            FirstWebService.ServiceClient client = new FirstWebService.ServiceClient();
            DialogResult dialogResult            = MessageBox.Show("Izbrisi?", "Brisanje_Vmestne", MessageBoxButtons.YesNo);

            if (dialogResult == DialogResult.Yes)
            {
                client.OdstraniAvtoVavtosalonu(Convert.ToInt32(VmestnaList.SelectedItems[0].Text));
                MessageBox.Show("Izbrisano!");
            }



            Close();
            Vmestna admin2 = new Vmestna();

            admin2.Show();
        }
Esempio n. 4
0
        private void button2_Click(object sender, EventArgs e)
        {
            Vmestna vmestna = new Vmestna();

            vmestna.Show();
        }