예제 #1
0
 private void b_new_Click(object sender, EventArgs e)
 {
     common_file.common_app.get_czsj();
     Xxtsz.Xkrgj_add_edit Xkrgj_add_edit_new = new Xkrgj_add_edit(this);
     Xkrgj_add_edit_new.Left = common_file.common_app.x() - 200;
     Xkrgj_add_edit_new.Top  = common_file.common_app.y() - 100;
     Xkrgj_add_edit_new.ShowDialog();
     Cursor.Current = Cursors.Default;
 }
예제 #2
0
 private void b_delete_Click(object sender, EventArgs e)
 {
     if (dg_krgj.CurrentRow != null)
     {
         int         i   = dg_krgj.CurrentRow.Index;
         DataRowView dgr = dg_krgj.CurrentRow.DataBoundItem as DataRowView;
         i = DS_Xkrgj.Tables[0].Rows.IndexOf(dgr.Row);
         if (DS_Xkrgj.Tables[0].Rows[i]["id"].ToString() != "")
         {
             Xxtsz.Xkrgj_add_edit Xkrgj_add_edit_new = new Xkrgj_add_edit(this);
             Xkrgj_add_edit_new.Xkrgj_id = DS_Xkrgj.Tables[0].Rows[i]["id"].ToString();
             B_Xkrgj.Delete(int.Parse(Xkrgj_add_edit_new.Xkrgj_id));
         }
         refresh_app();
     }
 }
예제 #3
0
        private void b_amend_Click(object sender, EventArgs e)
        {
            common_file.common_app.get_czsj();
            if (dg_krgj.CurrentRow != null)
            {
                int         i   = dg_krgj.CurrentRow.Index;
                DataRowView dgr = dg_krgj.CurrentRow.DataBoundItem as DataRowView;
                i = DS_Xkrgj.Tables[0].Rows.IndexOf(dgr.Row);
                if (DS_Xkrgj.Tables[0].Rows[i]["id"].ToString() != "")
                {
                    Xxtsz.Xkrgj_add_edit Xkrgj_add_edit_new = new Xkrgj_add_edit(this);
                    Xkrgj_add_edit_new.Left           = common_file.common_app.x() - 200;
                    Xkrgj_add_edit_new.Top            = common_file.common_app.y() - 100;
                    Xkrgj_add_edit_new.judge_add_edit = common_file.common_app.get_edit;
                    Xkrgj_add_edit_new.Xkrgj_id       = DS_Xkrgj.Tables[0].Rows[i]["id"].ToString();
                    Xkrgj_add_edit_new.tB_krgj.Text   = DS_Xkrgj.Tables[0].Rows[i]["krgj"].ToString();
                    Xkrgj_add_edit_new.tB_zjm.Text    = DS_Xkrgj.Tables[0].Rows[i]["zjm"].ToString();

                    Xkrgj_add_edit_new.ShowDialog();
                }
                Cursor.Current = Cursors.Default;
            }
        }