Esempio n. 1
0
        private void narucibtn_Click(object sender, EventArgs e)
        {
            int proizvodID = 0;

            proizvodID = Convert.ToInt32(skladistedatagrid.SelectedRows[0].Cells[1].Value);

            string vrsta   = Convert.ToString(skladistedatagrid.SelectedRows[0].Cells[5].Value);
            string sorta   = Convert.ToString(skladistedatagrid.SelectedRows[0].Cells[6].Value);
            string ime     = Convert.ToString(skladistedatagrid.SelectedRows[0].Cells[7].Value);
            string prezime = Convert.ToString(skladistedatagrid.SelectedRows[0].Cells[8].Value);

            DialogResult = DialogResult.OK;
            if (proizvodID != 0)
            {
                Storage.NabavkaStavkaAdd novif = new Storage.NabavkaStavkaAdd(proizvodID, vrsta, sorta, ime, prezime);
                if (novif.ShowDialog() == DialogResult.OK)
                {
                    BindGrid();
                    this.Close();
                }
            }
            else
            {
                Products.IndexForm novif = new Products.IndexForm(Global.UlazIDHLP);

                if (novif.ShowDialog() == DialogResult.OK)
                {
                    BindGrid();
                }
                this.Close();
            }
        }
Esempio n. 2
0
 private void button5_Click(object sender, EventArgs e)
 {
     if (this.ValidateChildren())
     {
         Products.IndexForm novif = new Products.IndexForm(Global.UlazIDHLP);
         if (novif.ShowDialog() == DialogResult.OK)
         {
             BindGrid();
         }
     }
 }