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); } }