public void PrintCheck(SaleComputersForm saleComputers) { _dockName = $"Чек! {saleComputers.FIO}"; Workbook xlWB = CreateAndGetWorkSheet(out Microsoft.Office.Interop.Excel.Application xlApp); Worksheet xlSht = xlWB.ActiveSheet; xlSht.Cells[2, "B"] = saleComputers.Monufacterer; xlSht.Cells[3, "B"] = saleComputers.Motherboard; xlSht.Cells[4, "B"] = saleComputers.PowerSupply; xlSht.Cells[5, "B"] = saleComputers.VideoCard; xlSht.Cells[6, "B"] = saleComputers.CPU; xlSht.Cells[7, "B"] = saleComputers.OZU; xlSht.Cells[8, "B"] = saleComputers.PZU; xlSht.Cells[9, "B"] = saleComputers.Price; xlSht.Cells[10, "B"] = saleComputers.Guarante; xlSht.Cells[11, "B"] = saleComputers.ToPay; xlSht.Cells[2, "E"] = saleComputers.FIO; xlSht.Cells[3, "E"] = saleComputers.Pasport; xlSht.Cells[4, "E"] = saleComputers.PhoneNumber; xlSht.Cells[5, "E"] = saleComputers.Discount; xlWB.Close(true); xlApp.Quit(); }
public SaleComputersForm() { InitializeComponent(); saleComputers = this; _viewControll.Update(computersDataGridView, "Computers"); _viewControll.Update(clientsDataGridView, "Clients"); }