public static ExitCard CreateForm(memberInfoModel model, DataBind bind) { bind1 = bind; zhanshimolde = model; if (_danli == null) { _danli = new ExitCard(); } return(_danli); }
private void 打印预览ToolStripMenuItem_Click(object sender, EventArgs e) { DialogResult result = MessageBox.Show("确定退卡?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information); if (DialogResult.Cancel == result) { return; } if (dataGridView1.SelectedRows.Count != 1) { MessageBox.Show("请选择一条记录!"); return; } memberInfoModel model = dataGridView1.SelectedRows[0].DataBoundItem as memberInfoModel; ExitCard fromcard = ExitCard.CreateForm(model, bindData); fromcard.Show(); fromcard.Focus(); }
private void ExitCard_FormClosed(object sender, FormClosedEventArgs e) { _danli = null; }