private void button3_Click(object sender, EventArgs e) { SelectOneForm sof = new SelectOneForm(); if (sof.ShowDialog() == System.Windows.Forms.DialogResult.OK) { if (sof.SelectedForm != null) { FormObject thisForm = sof.SelectedForm; if (this.User != null) { thisForm.Owner = this.User; } if (MessageBox.Show("确定只提取原表单的格式(不要原来的数据)?", "模板提取提醒", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.OK) { thisForm = Commons.GetFormModule(sof.SelectedForm, this.User); } string name; int id = FormObjectLogic.GetInstance().CopyFormObject(thisForm, out name); thisForm.ID = id; LoadFormObject(thisForm); } else { MessageBox.Show("是否没选到合法的表单?要复制的表单为空!"); } } sof.Dispose(); }
private void button3_Click(object sender, EventArgs e) { SelectOneForm sof = new SelectOneForm(); if (sof.ShowDialog() == System.Windows.Forms.DialogResult.OK) { if (sof.SelectedForm != null) { FormObject thisForm = sof.SelectedForm; string name; int id = FormObjectLogic.GetInstance().CopyFormObject(thisForm, out name); thisForm.ID = id; thisForm.FormName = name; LoadFormObject(thisForm); } else { MessageBox.Show("是否没选到合法的表单?要复制的表单为空!"); } } sof.Dispose(); }