public void Insert(object sender, EventArgs e) { using (uscNeoporeziviPrimitakElement user_control = new uscNeoporeziviPrimitakElement(Enums.FormEditMode.Insert)) { if (user_control.ShowDialogForm("Neoporezivi primitak element") == DialogResult.OK) { LoadGridNNeoporeziviPrimitakElement(); } } }
public void Update(object sender, EventArgs e) { if (ugdNeoporeziviPrimitakElement.ActiveRow != null) { BusinessLogic.pID = (int)ugdNeoporeziviPrimitakElement.ActiveRow.Cells["ID"].Value; BusinessLogic.pJOPPDOznaka = (int)ugdNeoporeziviPrimitakElement.ActiveRow.Cells["JOPPDOznakaNeoporezivogPrimitkaID"].Value; BusinessLogic.pElement = (int)ugdNeoporeziviPrimitakElement.ActiveRow.Cells["IDELEMENT"].Value; using (uscNeoporeziviPrimitakElement user_control = new uscNeoporeziviPrimitakElement(Enums.FormEditMode.Update)) { if (user_control.ShowDialogForm("Naeoporezivi primitak element") == DialogResult.OK) { LoadGridNNeoporeziviPrimitakElement(); } } } }