private void btnprint_Click(object sender, EventArgs e) { if (txtcode.Text == string.Empty || txtm.Text == string.Empty || txtyear.Text == string.Empty) { MessageBox.Show("برجاء ادخال كود الطالب ,شهادة الحصول,العام الدراسى ", "تاجيل الاختباات", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } else { BL.CLS_Testimonies t1 = new BL.CLS_Testimonies(); t1.add_Testimonies(txtt1.Text, int.Parse(txtid.Text), txtname.Text); MessageBox.Show("تم الاضافة بنجاح والان تتم عملية طباعة مستند تاجيل الاختبارات", "تاجيل الاختبارات", MessageBoxButtons.OK, MessageBoxIcon.Information); // Testimonies1 tt = new Testimonies1(); RPT.rpt_testimonies5 t = new RPT.rpt_testimonies5(); TextObject text1 = (TextObject)t.ReportDefinition.Sections["Section2"].ReportObjects["txtmm"]; text1.Text = txtm.Text; TextObject text2 = (TextObject)t.ReportDefinition.Sections["Section2"].ReportObjects["txty"]; text2.Text = txtyear.Text; t.SetParameterValue("@code", txtcode.Text); PL.testimonies5 ll = new PL.testimonies5(); ll.crystalReportViewer1.ReportSource = t; ll.ShowDialog(); txtcode.Focus(); } }
private void btnprint_Click(object sender, EventArgs e) { if (txtcode.Text == string.Empty || txtacode.Text == string.Empty) { MessageBox.Show("برجاء ادخال كود الطالب,رقم ايصال سداد الطالب ", "تغيير النظام الدراسى", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } else { BL.CLS_Testimonies t1 = new BL.CLS_Testimonies(); t1.add_Testimonies(txtt1.Text, int.Parse(txtid.Text), txtname.Text); MessageBox.Show("تم الاضافة بنجاح والان تتم عملية طباعة ورقة تغيير النظام الدراسى ", "تغيير النظام الدراسى", MessageBoxButtons.OK, MessageBoxIcon.Information); RPT.rpt_testimonies3 t = new RPT.rpt_testimonies3(); TextObject text1 = (TextObject)t.ReportDefinition.Sections["Section3"].ReportObjects["txtccode"]; text1.Text = txtacode.Text; TextObject text2 = (TextObject)t.ReportDefinition.Sections["Section3"].ReportObjects["txtsem"]; text2.Text = combotype.Text; t.SetParameterValue("@code", txtcode.Text); PL.testimonies3 ll = new PL.testimonies3(); ll.crystalReportViewer1.ReportSource = t; ll.ShowDialog(); } }
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); }
private void btnprint_Click(object sender, EventArgs e) { if (txtcode.Text == string.Empty || txtm.Text == string.Empty || txtyear.Text == string.Empty || txte.Text == string.Empty) { MessageBox.Show("برجاء ادخال كود الطالب , المكان الموصى به,المؤهل والسنة الدراسية ", "اثبات قيد", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } else { if (txtgender.Text == "أنثى") { BL.CLS_Testimonies t1 = new BL.CLS_Testimonies(); t1.add_Testimonies(txtt2.Text, int.Parse(txtid.Text), txtname.Text); MessageBox.Show("تم الاضافة بنجاح والان تتم عملية طباعة اثبات القيد الموجهه", "اثبات قيد موجهه", MessageBoxButtons.OK, MessageBoxIcon.Information); // Testimonies1 tt = new Testimonies1(); RPT.rpt_testimoniesF2 t = new RPT.rpt_testimoniesF2(); TextObject text1 = (TextObject)t.ReportDefinition.Sections["Section3"].ReportObjects["txtmm"]; text1.Text = txtm.Text; TextObject text2 = (TextObject)t.ReportDefinition.Sections["Section3"].ReportObjects["txty"]; text2.Text = txtyear.Text; TextObject text3 = (TextObject)t.ReportDefinition.Sections["Section3"].ReportObjects["txtee"]; text3.Text = txte.Text; t.SetParameterValue("@code", txtcode.Text); PL.Tesstimonies2 ll = new PL.Tesstimonies2(); ll.crystalReportViewer1.ReportSource = t; ll.ShowDialog(); txtcode.Focus(); } else if (txtgender.Text == "ذكر") { BL.CLS_Testimonies t1 = new BL.CLS_Testimonies(); t1.add_Testimonies(txtt2.Text, int.Parse(txtid.Text), txtname.Text); MessageBox.Show("تم الاضافة بنجاح والان تتم عملية طباعة اثبات القيد الموجهه", "اثبات القيد الموجهه", MessageBoxButtons.OK, MessageBoxIcon.Information); // Testimonies1 tt = new Testimonies1(); RPT.rpt_testimoniesM2 t = new RPT.rpt_testimoniesM2(); TextObject text1 = (TextObject)t.ReportDefinition.Sections["Section3"].ReportObjects["txtmm"]; text1.Text = txtm.Text; TextObject text2 = (TextObject)t.ReportDefinition.Sections["Section3"].ReportObjects["txty"]; text2.Text = txtyear.Text; TextObject text3 = (TextObject)t.ReportDefinition.Sections["Section3"].ReportObjects["txtee"]; text3.Text = txte.Text; t.SetParameterValue("@code", txtcode.Text); PL.Tesstimonies2 ll = new PL.Tesstimonies2(); ll.crystalReportViewer1.ReportSource = t; ll.ShowDialog(); txtcode.Focus(); } } }
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(); }
private void txtcode_Validated(object sender, EventArgs e) { BL.CLS_Testimonies time1 = new BL.CLS_Testimonies(); DataTable dt = new DataTable(); dt = time1.GetAllExam2(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(); combolev.Text = dt.Rows[0][37].ToString(); txtsem.Text = dt.Rows[0][38].ToString(); txtssn.Text = dt.Rows[0][13].ToString(); }