public void Insert(object sender, EventArgs e) { using (uscNacinPlacanjaForm objekt = new uscNacinPlacanjaForm(Enums.FormEditMode.Insert)) { if (objekt.ShowDialogForm("Način plačanja") == DialogResult.OK) { try { BusinessLogic.NacinPlacanja.pSelectedIndex = ugdNacinPlacanja.ActiveRow.Index; } catch { } LoadGridNacinPlacanja(); } } }
public void Copy(object sender, EventArgs e) { if (ugdNacinPlacanja.ActiveRow != null) { BusinessLogic.NacinPlacanja.pID = (int)ugdNacinPlacanja.ActiveRow.Cells["ID"].Value; BusinessLogic.NacinPlacanja.pNaziv = ugdNacinPlacanja.ActiveRow.Cells["Naziv"].Value.ToString(); using (uscNacinPlacanjaForm objekt = new uscNacinPlacanjaForm(Enums.FormEditMode.Copy)) { if (objekt.ShowDialogForm("Način plačanja") == DialogResult.OK) { BusinessLogic.NacinPlacanja.pSelectedIndex = ugdNacinPlacanja.ActiveRow.Index; LoadGridNacinPlacanja(); } } } }