/////////// public void PrintReOut(int id) { RPT.RequstOut rt = new RPT.RequstOut(); DataTable dtttt = new DataTable(); dtttt = dbsql.PrintRequstOut(id, Contrl.UserId, user); rt.SetDataSource(dtttt); crystalReportViewer1.ReportSource = rt; crystalReportViewer1.Refresh(); if (printexit == true) { DataTable dtt1 = new DataTable(); RPT.ExitStatement rt1 = new RPT.ExitStatement(); dtt1 = dbsql.printrequstOutExit(id, Contrl.UserId, user); for (int i = 0; i < dtt1.Rows.Count; i++) { dtt1.Rows[i][6] = "تصريح خروج مواد"; } rt1.SetDataSource(dtt1); rt1.PrintToPrinter(1, false, 0, 0); //print dicret } }
/////// public void PrintReSupply(int id) { RPT.RptRqustSupply rt = new RPT.RptRqustSupply(); rt.SetDataSource(dbsql.PrintRequstSupply(id, Contrl.UserId, user)); crystalReportViewer1.ReportSource = rt; crystalReportViewer1.Refresh(); if (printexit == true) { DataTable dtt1 = new DataTable(); RPT.ExitStatement rt1 = new RPT.ExitStatement(); dtt1 = dbsql.printrequstOutExit1(id, Contrl.UserId, user); for (int i = 0; i < dtt1.Rows.Count; i++) { dtt1.Rows[i][4] = "مسؤول المخازن"; dtt1.Rows[i][6] = "تصريح توريد مخزني"; dtt1.Rows[i][7] = "المخازن"; } rt1.SetDataSource(dtt1); rt1.PrintToPrinter(1, false, 0, 0); //print dicret } }