public void Update(object sender, EventArgs e) { if (this.UltraGridUstanove.ActiveRow != null) { int id = Convert.ToInt32(this.UltraGridUstanove.ActiveRow.Cells["ID"].Value); UstanovaForm ustanovaForm = new UstanovaForm(Enums.FormEditMode.Update, id); if (ustanovaForm.ShowDialogForm("Ustanova") == DialogResult.OK) { BusinessLogic.Ustanove.pSelectedIndex = UltraGridUstanove.ActiveRow.Index; LoadGridUstanove(); } } }
public void Copy(object sender, EventArgs e) { if (this.UltraGridUstanove.ActiveRow != null) { int id = Convert.ToInt32(this.UltraGridUstanove.ActiveRow.Cells["ID"].Value); UstanovaForm ustanovaForm = new UstanovaForm(Enums.FormEditMode.Copy, id); if (ustanovaForm.ShowDialogForm("Ustanova") == DialogResult.OK) { LoadGridUstanove(); } } }
public void Insert(object sender, EventArgs e) { UstanovaForm ustanovaForm = new UstanovaForm(Enums.FormEditMode.Insert, null); if (ustanovaForm.ShowDialogForm("Ustanova") == DialogResult.OK) { try { BusinessLogic.Ustanove.pSelectedIndex = UltraGridUstanove.ActiveRow.Index; } catch { } LoadGridUstanove(); } }