public void Insert(object sender, EventArgs e) { using (uscRegistarNabave registar_nabave = new uscRegistarNabave(Enums.FormEditMode.Insert)) { if (registar_nabave.ShowDialogForm("Registar nabave") == DialogResult.OK) { try { BusinessLogic.RegistarNabave.pSelectedIndex = ugdRegistarNabave.ActiveRow.Index; } catch { } LoadGridRegistarNabave(); } } }
public void Copy(object sender, EventArgs e) { if (ugdRegistarNabave.ActiveRow != null) { BusinessLogic.RegistarNabave.pID = Convert.ToInt32(ugdRegistarNabave.ActiveRow.Cells["ID"].Value); using (uscRegistarNabave registar_nabave = new uscRegistarNabave(Enums.FormEditMode.Copy)) { if (registar_nabave.ShowDialogForm("Registar nabave") == DialogResult.OK) { BusinessLogic.RegistarNabave.pSelectedIndex = ugdRegistarNabave.ActiveRow.Index; LoadGridRegistarNabave(); } } } }