Ejemplo n.º 1
0
        private void txtid_Validated(object sender, EventArgs e)
        {
            BL.CLS_Testimonies time1 = new BL.CLS_Testimonies();
            DataTable          dt    = new DataTable();

            dt = time1.getall_stu_info_bycode(txtcode.Text);
            dt = std.VerifiedStd_code(txtcode.Text);

            if (dt.Rows.Count <= 0)
            {
                MessageBox.Show("برجاء ادخال كود الطالب بشكل صحيح لجلب جميع البيانات الخاصة به", "اثبات قيد", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            txtid.Text = dt.Rows[0][0].ToString();
            //txtyear.Text = dt.Rows[0][2].ToString();
            txtname.Text       = dt.Rows[0][4].ToString();
            txtdepartment.Text = dt.Rows[0][36].ToString();
            txtlevel.Text      = dt.Rows[0][37].ToString();

            //   pictureBox1.Image = pictureBox1.Image = Image.FromStream(std.GetImgStd(int.Parse(txtid.Text)));

            byte[]       img    = (byte[])dt.Rows[0][35];
            MemoryStream memory = new MemoryStream(img);

            pictureBox1.Image = Image.FromStream(memory);
        }
Ejemplo n.º 2
0
        private void txtcode_Validated(object sender, EventArgs e)
        {
            //BL.CLS_Testimonies time1 = new BL.CLS_Testimonies();
            //DataTable dt = new DataTable();
            //dt = time1.getall_stu_info_bycode(txtcode.Text);
            //dt = std.VerifiedStd_code(txtcode.Text);

            //if (dt.Rows.Count <= 0)
            //{

            //    MessageBox.Show("برجاء ادخال كود الطالب بشكل صحيح لجلب جميع البيانات الخاصة به", "اثبات قيد موجهه", MessageBoxButtons.OK, MessageBoxIcon.Error);
            //    return;

            //}



            //txtid.Text = dt.Rows[0][0].ToString();
            ////txtyear.Text = dt.Rows[0][2].ToString();
            //txtname.Text = dt.Rows[0][4].ToString();
            //combodept.Text = dt.Rows[0][36].ToString();
            //combolevel.Text = dt.Rows[0][37].ToString();

            //txtssn.Text = dt.Rows[0][13].ToString();
            //txtgender.Text = dt.Rows[0][11].ToString();



            BL.CLS_Testimonies time2 = new BL.CLS_Testimonies();
            DataTable          dt    = new DataTable();

            dt = time2.getall_stu_info_bycode(txtcode.Text);
            dt = std.VerifiedStd_code(txtcode.Text);

            if (dt.Rows.Count <= 0)
            {
                MessageBox.Show("برجاء ادخال كود الطالب بشكل صحيح لجلب جميع البيانات الخاصة به", "اثبات قيد", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            txtid.Text = dt.Rows[0][0].ToString();
            //txtyear.Text = dt.Rows[0][2].ToString();
            txtname.Text    = dt.Rows[0][4].ToString();
            combodept.Text  = dt.Rows[0][36].ToString();
            combolevel.Text = dt.Rows[0][37].ToString();

            txtssn.Text    = dt.Rows[0][13].ToString();
            txtgender.Text = dt.Rows[0][11].ToString();
        }