示例#1
0
        private void b_amend_Click(object sender, EventArgs e)
        {
            common_file.common_app.get_czsj();
            if (dg_bmsz.CurrentRow != null)
            {
                int i = dg_bmsz.CurrentRow.Index;

                DataRowView dgr = dg_bmsz.Rows[i].DataBoundItem as DataRowView;
                i = DS_Bmsz.Tables[0].Rows.IndexOf(dgr.Row);


                if (DS_Bmsz.Tables[0].Rows[i]["id"].ToString() != "")
                {
                    Yhgl.YH_BM_add_edit YH_BM_add_edit_new = new YH_BM_add_edit(this);

                    YH_BM_add_edit_new.StartPosition  = FormStartPosition.CenterScreen;
                    YH_BM_add_edit_new.judge_add_edit = common_file.common_app.get_edit;
                    YH_BM_add_edit_new.Xqzrx_id       = DS_Bmsz.Tables[0].Rows[i]["id"].ToString();
                    YH_BM_add_edit_new.tB_bm.Text     = DS_Bmsz.Tables[0].Rows[i]["yhbm"].ToString();
                    YH_BM_add_edit_new.tB_zjm.Text    = DS_Bmsz.Tables[0].Rows[i]["zjm"].ToString();
                    YH_BM_add_edit_new.ShowDialog();
                }
                Cursor.Current = Cursors.Default;
            }
        }
示例#2
0
 private void b_new_Click(object sender, EventArgs e)
 {
     common_file.common_app.get_czsj();
     Yhgl.YH_BM_add_edit YH_BM_add_edit_new = new YH_BM_add_edit(this);
     YH_BM_add_edit_new.StartPosition = FormStartPosition.CenterScreen;
     YH_BM_add_edit_new.ShowDialog();
     Cursor.Current = Cursors.Default;
 }
示例#3
0
 private void b_delete_Click(object sender, EventArgs e)
 {
     if (dg_bmsz.CurrentRow != null)
     {
         int         i   = dg_bmsz.CurrentRow.Index;
         DataRowView dgr = dg_bmsz.Rows[i].DataBoundItem as DataRowView;
         i = DS_Bmsz.Tables[0].Rows.IndexOf(dgr.Row);
         if (DS_Bmsz.Tables[0].Rows[i]["id"].ToString() != "")
         {
             Yhgl.YH_BM_add_edit bm_add_edit_new = new YH_BM_add_edit(this);
             bm_add_edit_new.Xqzrx_id = DS_Bmsz.Tables[0].Rows[i]["id"].ToString();
             B_Bmsz.Delete(int.Parse(bm_add_edit_new.Xqzrx_id));
         }
         refresh_app();
     }
 }