private void 公司原始表ToolStripMenuItem_Click(object sender, EventArgs e) { frmTemplateAssitant frm = new frmTemplateAssitant(); frm.MdiParent = this; frm.Show(); }
/// <summary> /// 新建 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnNew_Click(object sender, EventArgs e) { using (frmTemplateAssitant fa = new frmTemplateAssitant()) { fa.flag = "NEW"; if (fa.ShowDialog() == System.Windows.Forms.DialogResult.OK) { loadTemplates(); } } }
/// <summary> /// 更改模板 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnUpdate_Click(object sender, EventArgs e) { if (dgvTemplates.SelectedRows.Count != 1) { MessageBox.Show("请选择一条记录后进行修改操作", this.funName, MessageBoxButtons.OK); return; } using (frmTemplateAssitant fa = new frmTemplateAssitant()) { fa.flag = "UPDATE"; fa.tiidtmp = (int)dgvTemplates.SelectedRows[0].Cells[0].Value; if (fa.ShowDialog() == System.Windows.Forms.DialogResult.OK) { loadTemplates(); } } }