private void b_new_Click(object sender, EventArgs e) { common_file.common_app.get_czsj(); Xxtsz.Xkrly_add_edit Xkrly_add_edit_new = new Xkrly_add_edit(this); Xkrly_add_edit_new.Left = common_file.common_app.x() - 200; Xkrly_add_edit_new.Top = common_file.common_app.y() - 100; Xkrly_add_edit_new.ShowDialog(); Cursor.Current = Cursors.Default; }
private void b_delete_Click(object sender, EventArgs e) { if (dg_krly.CurrentRow != null) { int i = dg_krly.CurrentRow.Index; DataRowView dgr = dg_krly.CurrentRow.DataBoundItem as DataRowView; i = DS_Xkrly.Tables[0].Rows.IndexOf(dgr.Row); if (DS_Xkrly.Tables[0].Rows[i]["id"].ToString() != "") { Xxtsz.Xkrly_add_edit Xkrly_add_edit_new = new Xkrly_add_edit(this); Xkrly_add_edit_new.Xkrly_id = DS_Xkrly.Tables[0].Rows[i]["id"].ToString(); B_Xkrly.Delete(int.Parse(Xkrly_add_edit_new.Xkrly_id)); } refresh_app(); } }
private void b_amend_Click(object sender, EventArgs e) { common_file.common_app.get_czsj(); if (dg_krly.CurrentRow != null) { int i = dg_krly.CurrentRow.Index; DataRowView dgr = dg_krly.CurrentRow.DataBoundItem as DataRowView; i = DS_Xkrly.Tables[0].Rows.IndexOf(dgr.Row); if (DS_Xkrly.Tables[0].Rows[i]["id"].ToString() != "") { Xxtsz.Xkrly_add_edit Xkrly_add_edit_new = new Xkrly_add_edit(this); Xkrly_add_edit_new.Left = common_file.common_app.x() - 200; Xkrly_add_edit_new.Top = common_file.common_app.y() - 100; Xkrly_add_edit_new.judge_add_edit = common_file.common_app.get_edit; Xkrly_add_edit_new.Xkrly_id = DS_Xkrly.Tables[0].Rows[i]["id"].ToString(); Xkrly_add_edit_new.tB_krly.Text = DS_Xkrly.Tables[0].Rows[i]["krly"].ToString(); Xkrly_add_edit_new.tB_zjm.Text = DS_Xkrly.Tables[0].Rows[i]["zjm"].ToString(); Xkrly_add_edit_new.ShowDialog(); } } Cursor.Current = Cursors.Default; }