Ejemplo n.º 1
0
        private void b_amend_Click(object sender, EventArgs e)
        {
            common_file.common_app.get_czsj();
            //int i = dg_yhgl.CurrentRow.Index;
            if (dg_yhgl.CurrentRow != null)
            {
                DataRowView dgr = dg_yhgl.CurrentRow.DataBoundItem as DataRowView;
                int         i   = DS_YH_User.Tables[0].Rows.IndexOf(dgr.Row);


                if (DS_YH_User.Tables[0].Rows[i]["id"].ToString() != "")
                {
                    Yhgl.YH_User_add_edit YH_User_add_edit_new = new YH_User_add_edit(this);
                    YH_User_add_edit_new.StartPosition  = FormStartPosition.CenterScreen;
                    YH_User_add_edit_new.judge_add_edit = common_file.common_app.get_edit;

                    YH_User_add_edit_new.tB_yhbh.Text    = DS_YH_User.Tables[0].Rows[i]["yhbh"].ToString();
                    YH_User_add_edit_new.tB_yhxm.Text    = DS_YH_User.Tables[0].Rows[i]["yhxm"].ToString();
                    YH_User_add_edit_new.cB_Role.Text    = DS_YH_User.Tables[0].Rows[i]["RoleName"].ToString();
                    YH_User_add_edit_new.cB_bm.Text      = DS_YH_User.Tables[0].Rows[i]["yhbm"].ToString();
                    YH_User_add_edit_new.YH_id           = DS_YH_User.Tables[0].Rows[i]["ID"].ToString();
                    YH_User_add_edit_new.tB_yhbh.Enabled = false;
                    YH_User_add_edit_new.ShowDialog();
                }
            }
            Cursor.Current = Cursors.Default;
        }
Ejemplo n.º 2
0
 private void b_new_Click(object sender, EventArgs e)
 {
     common_file.common_app.get_czsj();
     Yhgl.YH_User_add_edit YH_User_add_edit_new = new YH_User_add_edit(this);
     YH_User_add_edit_new.StartPosition = FormStartPosition.CenterScreen;
     YH_User_add_edit_new.ShowDialog();
     Cursor.Current = Cursors.Default;
 }