private void btnAddIn_Click(object sender, EventArgs e) { frmInOut editor = new frmInOut(true); if (editor.ShowDialog() == DialogResult.OK) { if (DAL.AddInOut(editor.InOut)) { this.ViewAll(); } } }
private void btnEditOut_Click(object sender, EventArgs e) { VOut vOut = this.GetFirstSelectedVOut(); if (vOut != null) { InOut inOut = DAL.GetInOutByVOut(vOut); int oldId = inOut.ID; frmInOut editor = new frmInOut(inOut); if (editor.ShowDialog() == DialogResult.OK) { if (DAL.EditInOut(oldId, inOut)) { this.ViewAll(); } } } }