private void b_amend_Click(object sender, EventArgs e) { common_file.common_app.get_czsj(); if (dg_yhsz.CurrentRow != null) { int i = dg_yhsz.CurrentRow.Index; DataRowView dgr = dg_yhsz.Rows[i].DataBoundItem as DataRowView; i = DS_Xyhsz.Tables[0].Rows.IndexOf(dgr.Row); if (DS_Xyhsz.Tables[0].Rows[i]["id"].ToString() != "") { Xxtsz.Xyhsz_add_edit Xyhsz_add_edit_new = new Xyhsz_add_edit(this); Xyhsz_add_edit_new.Left = common_file.common_app.x() - 200; Xyhsz_add_edit_new.Top = common_file.common_app.y() - 100; Xyhsz_add_edit_new.judge_add_edit = common_file.common_app.get_edit; Xyhsz_add_edit_new.Xyhsz_id = DS_Xyhsz.Tables[0].Rows[i]["id"].ToString(); Xyhsz_add_edit_new.tB_yhbl.Text = DS_Xyhsz.Tables[0].Rows[i]["yhbl"].ToString(); Xyhsz_add_edit_new.tB_yh.Text = DS_Xyhsz.Tables[0].Rows[i]["yh"].ToString(); Xyhsz_add_edit_new.ShowDialog(); } Cursor.Current = Cursors.Default; } }
private void b_new_Click(object sender, EventArgs e) { common_file.common_app.get_czsj(); Xxtsz.Xyhsz_add_edit Xhysz_add_edit_new = new Xyhsz_add_edit(this); Xhysz_add_edit_new.Left = common_file.common_app.x() - 200; Xhysz_add_edit_new.Top = common_file.common_app.y() - 100; Xhysz_add_edit_new.ShowDialog(); Cursor.Current = Cursors.Default; }