public static void PurchasingFromSupplier() { IList <orderFromSupplierTable> purchaseFromSupplier = DataLayer.GetAllOrderFromSupplierDL(); String fileName = Path.GetTempFileName() + ".html"; string body = "<html><head><style>body { direction:rtl; font-family: Arial, Sans Serif; }" + "table { width: 100%; } " + "thead th { background: gray; }</style>" + "<title>דוח רכישה מספק</title>" + "</head><body><h1>תוצאות דוח רכישה מספק</h1>" + "<table>" + "<thead><tr><th>מזהה</th><th>מספר משלוח</th><th>מספר קבלה</th><th> מזהה עובד</th><th>תאריך הזמנה</th><th>תאריך הספקה</th><th>הערות</th><th>מצב פעילות</th></tr></thead>" + "<tbody>"; foreach (orderFromSupplierTable elemant in purchaseFromSupplier) { bool active; if (elemant.active == 0) { active = true; } else { active = false; } body += "<tr><td>" + elemant.Id.ToString() + "</td><td>" + elemant.shippingNumber + "</td><td>" + elemant.receptionNumber + "</td><td>" + elemant.employee_id.ToString() + "</td><td>" + elemant.orderDate.ToString() + "</td><td>" + elemant.supplyingDate.ToString() + "</td><td>" + elemant.notes + "</td><td>" + active.ToString() + "</td></tr>"; } body += "</tbody></table></body></html>"; File.WriteAllText(fileName, body); ProcessStartInfo processStartInfo = new ProcessStartInfo(fileName); processStartInfo.UseShellExecute = true; Process.Start(processStartInfo); }
public IList <orderFromSupplierTable> GetAll() { return(DataLayer.GetAllOrderFromSupplierDL()); }