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 metroButton2_Click(object sender, EventArgs e) { PL.Tesstimonies2 t2 = new PL.Tesstimonies2(); t2.ShowDialog(); }
private void اثباتقيدموجههToolStripMenuItem_Click(object sender, EventArgs e) { PL.Tesstimonies2 testimonies2 = new PL.Tesstimonies2(); testimonies2.ShowDialog(); }