public void Insert(object sender, EventArgs e) { using (IzdatnicaForm objekt = new IzdatnicaForm(Enums.FormEditMode.Insert)) { if (objekt.ShowDialogForm("Izdatnica") == DialogResult.OK) { try { BusinessLogic.Izdatnica.pSelectedIndex = ugdFormPregled.Rows.Count; } catch { } LoadGridData(); } } }
public void Copy(object sender, EventArgs e) { if (ugdFormPregled.ActiveRow != null) { BusinessLogic.Izdatnica.pID = (int)ugdFormPregled.ActiveRow.Cells["ID"].Value; using (IzdatnicaForm objekt = new IzdatnicaForm(Enums.FormEditMode.Copy)) { if (objekt.ShowDialogForm("Izdatnica") == DialogResult.OK) { try { BusinessLogic.Izdatnica.pSelectedIndex = ugdFormPregled.ActiveRow.Index; } catch { } LoadGridData(); } } } }