public void Insert(object sender, EventArgs e) { using (uscVrsteNabaveForm vrste_nabave = new uscVrsteNabaveForm(Enums.FormEditMode.Insert)) { if (vrste_nabave.ShowDialogForm("Vrste Nabave") == DialogResult.OK) { try { BusinessLogic.VrsteNabave.pSelectedIndex = ugdVrsteNabave.ActiveRow.Index; } catch { } LoadGridVrsteNabave(); } } }
public void Copy(object sender, EventArgs e) { if (ugdVrsteNabave.ActiveRow != null) { BusinessLogic.VrsteNabave.pID = (int)ugdVrsteNabave.ActiveRow.Cells["ID"].Value; BusinessLogic.VrsteNabave.pNaziv = ugdVrsteNabave.ActiveRow.Cells["Naziv"].Value.ToString(); using (uscVrsteNabaveForm vrste_nabave = new uscVrsteNabaveForm(Enums.FormEditMode.Copy)) { if (vrste_nabave.ShowDialogForm("Vrste Nabave") == DialogResult.OK) { BusinessLogic.VrsteNabave.pSelectedIndex = ugdVrsteNabave.ActiveRow.Index; LoadGridVrsteNabave(); } } } }