private void btnEdit_Click(object sender, EventArgs e) { info.FillGaps(); frmAddEditInfo edit_info = new frmAddEditInfo(info); if (edit_info.ShowDialog() == System.Windows.Forms.DialogResult.OK) { info = edit_info._info; info.UpdateInfo(); LoadTable(); moveFirstPB_Click(sender, e); } }
private void addPB_Click(object sender, EventArgs e) { frmAddEditInfo aei = new frmAddEditInfo(); info.AddBlankInfo(); aei.info_id = FormattingRulesLibrary.GeneralInfo.LastWork(); if (aei.ShowDialog() == System.Windows.Forms.DialogResult.OK) { info = aei._info; // переменная получает значение из формы info.UpdateInfo(); LoadTable(); moveLastPB_Click(sender, e); } }