private void b_amend_Click(object sender, EventArgs e) { common_file.common_app.get_czsj(); if (dg_qzrx.CurrentRow != null) { int i = dg_qzrx.CurrentRow.Index; DataRowView dgr = dg_qzrx.Rows[i].DataBoundItem as DataRowView; i = DS_Xqzrx.Tables[0].Rows.IndexOf(dgr.Row); if (DS_Xqzrx.Tables[0].Rows[i]["id"].ToString() != "") { Xxtsz.Xqzrx_add_edit Xqzrx_add_edit_new = new Xqzrx_add_edit(this); Xqzrx_add_edit_new.Left = common_file.common_app.x(); Xqzrx_add_edit_new.Top = common_file.common_app.y(); Xqzrx_add_edit_new.judge_add_edit = common_file.common_app.get_edit; Xqzrx_add_edit_new.Xqzrx_id = DS_Xqzrx.Tables[0].Rows[i]["id"].ToString(); Xqzrx_add_edit_new.tB_qzrx.Text = DS_Xqzrx.Tables[0].Rows[i]["qzrx"].ToString(); Xqzrx_add_edit_new.tB_zjm.Text = DS_Xqzrx.Tables[0].Rows[i]["zjm"].ToString(); Xqzrx_add_edit_new.ShowDialog(); } Cursor.Current = Cursors.Default; } }
private void b_new_Click(object sender, EventArgs e) { common_file.common_app.get_czsj(); Xxtsz.Xqzrx_add_edit Xqzrx_add_edit_new = new Xqzrx_add_edit(this); Xqzrx_add_edit_new.Left = common_file.common_app.x(); Xqzrx_add_edit_new.Top = common_file.common_app.y(); Xqzrx_add_edit_new.ShowDialog(); Cursor.Current = Cursors.Default; }
private void b_delete_Click(object sender, EventArgs e) { if (dg_qzrx.CurrentRow != null) { int i = dg_qzrx.CurrentRow.Index; if (DS_Xqzrx.Tables[0].Rows[i]["id"].ToString() != "") { Xxtsz.Xqzrx_add_edit Xqzrx_add_edit_new = new Xqzrx_add_edit(this); Xqzrx_add_edit_new.Xqzrx_id = DS_Xqzrx.Tables[0].Rows[i]["id"].ToString(); B_Xqzrx.Delete(int.Parse(Xqzrx_add_edit_new.Xqzrx_id)); } refresh_app(); } }