예제 #1
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            FRM_USER_ADD frm_user_add = new FRM_USER_ADD();

            frm_user_add.id           = 0;
            frm_user_add.btn_add.Text = "اضافة";
            frm_user_add.Show();
        }
예제 #2
0
        private void btn_edit_Click(object sender, EventArgs e)
        {
            FRM_USER_ADD frm_user_add = new FRM_USER_ADD();

            id      = Convert.ToInt32(gridView1.GetFocusedRowCellValue("USER_ID"));
            tb_user = dbs.TB_USERS.Where(x => x.USER_ID == id).FirstOrDefault();

            frm_user_add.txt_Name.Text = tb_user.USER_NAME;
            frm_user_add.txt_pass.Text = tb_user.USER_PASS;
            frm_user_add.txt_roll.Text = tb_user.USER_ROLL;
            frm_user_add.id            = id;
            frm_user_add.btn_add.Text  = "التعديل";
            frm_user_add.Show();
        }