public object GetObject() { if (_functionName == "") { throw new Exception("引出函数名不能为空!"); } Form f = null; switch (_functionName) { case "Fun_ts_yp_tj_cx": Frmyptj Frmyptj = new Frmyptj((MenuTag)CommunicateValue[0], Convert.ToString(CommunicateValue[1]), _mdiParent); if (_mdiParent != null) { Frmyptj.MdiParent = _mdiParent; } Frmyptj.FillDj(new Guid(Convert.ToString(CommunicateValue[2])), true); Frmyptj.Show(); Frmyptj.FindRecord((int)CommunicateValue[4], 0); return(Frmyptj); default: throw new Exception("引出函数名称错误!"); } return(f); }
private void butnew_Click(object sender, System.EventArgs e) { if (!bpltj) { Frmyptj f = new Frmyptj(_menuTag, _chineseName, _mdiParent); Point point = new Point(160, 75); f.Location = point; f.MdiParent = _mdiParent; f.Show(); } else { Frmpltj f = new Frmpltj(_menuTag, _chineseName, _mdiParent); Point point = new Point(160, 75); f.Location = point; f.MdiParent = _mdiParent; f.Show(); f.FillDj(Guid.Empty, 0); } }
private void butsh_Click(object sender, System.EventArgs e) { try { if (!bpltj)//不进行批量调价 { int nrow = this.myDataGrid1.CurrentCell.RowNumber; DataTable tb = (DataTable)this.myDataGrid1.DataSource; if (tb.Rows.Count == 0) { return; } Frmyptj f = new Frmyptj(_menuTag, _chineseName, _mdiParent); Point point = new Point(160, 75); f.Location = point; f.MdiParent = _mdiParent; f.Show(); f.FillDj(new Guid(tb.Rows[nrow]["id"].ToString()), this.rdo2.Checked); } else//进行批量调价 { int nrow = this.myDataGrid1.CurrentCell.RowNumber; DataTable tb = (DataTable)this.myDataGrid1.DataSource; if (tb.Rows.Count == 0) { return; } Frmpltj f = new Frmpltj(_menuTag, _chineseName, _mdiParent); Point point = new Point(160, 75); f.Location = point; f.Show(); f.FillDj(new Guid(tb.Rows[nrow]["id"].ToString()), Convert.ToInt32(this.rdo2.Checked)); } } catch (System.Exception err) { MessageBox.Show("发生错误" + err.Message); } }