public void Insert(object sender, EventArgs e) { using (OtvaranjeSkladistaForm objekt = new OtvaranjeSkladistaForm(Enums.FormEditMode.Insert)) { if (objekt.ShowDialogForm("OtvaranjeSkladista") == DialogResult.OK) { try { BusinessLogic.OtvaranjeSkladista.pSelectedIndex = ugdFormPregled.ActiveRow.Index; } catch { } LoadGridData(); } } }
public void Update(object sender, EventArgs e) { if (ugdFormPregled.ActiveRow != null) { BusinessLogic.OtvaranjeSkladista.pID = Convert.ToInt32(ugdFormPregled.ActiveRow.Cells["ID"].Value); using (OtvaranjeSkladistaForm objekt = new OtvaranjeSkladistaForm(Enums.FormEditMode.Update)) { if (objekt.ShowDialogForm("OtvaranjeSkladista") == DialogResult.OK) { try { BusinessLogic.OtvaranjeSkladista.pSelectedIndex = ugdFormPregled.ActiveRow.Index; } catch { } LoadGridData(); } } } }