Исправил namespace, работает скачивание
This commit is contained in:
parent
e1e37a6611
commit
686c98f1e8
@ -3,8 +3,8 @@ using ComputerShopContracts.BusinessLogicContracts;
|
||||
using ComputerShopContracts.SearchModels;
|
||||
using ComputerShopContracts.StorageContracts;
|
||||
using ComputerShopContracts.ViewModels;
|
||||
using GarmentFactoryBusinessLogic.OfficePackage;
|
||||
using GarmentFactoryBusinessLogic.OfficePackage.HelperModels;
|
||||
using ComputerShopBusinessLogic.OfficePackage;
|
||||
using ComputerShopBusinessLogic.OfficePackage.HelperModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@ -55,7 +55,7 @@ namespace ComputerShopBusinessLogic.BusinessLogics
|
||||
_saveToWord.CreateDoc(new WordInfoImplementer
|
||||
{
|
||||
FileName = model.FileName,
|
||||
Title = "Список сборок по выбранным заявкам",
|
||||
Title = "Список сборок по выбранным заказам",
|
||||
OrderAssemblies = GetReportOrdersAssemblies(model.Ids)
|
||||
});;
|
||||
//throw new NotImplementedException();
|
||||
|
@ -1,12 +1,12 @@
|
||||
using GarmentFactoryBusinessLogic.OfficePackage.HelperEnums;
|
||||
using GarmentFactoryBusinessLogic.OfficePackage.HelperModels;
|
||||
using ComputerShopBusinessLogic.OfficePackage.HelperEnums;
|
||||
using ComputerShopBusinessLogic.OfficePackage.HelperModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace GarmentFactoryBusinessLogic.OfficePackage
|
||||
namespace ComputerShopBusinessLogic.OfficePackage
|
||||
{
|
||||
public abstract class AbstractSaveToExcelImplementer
|
||||
{
|
||||
@ -143,7 +143,7 @@ namespace GarmentFactoryBusinessLogic.OfficePackage
|
||||
}
|
||||
}
|
||||
|
||||
rowIndex++;
|
||||
//rowIndex++;
|
||||
|
||||
// foreach (var (Component, Count) in tc.Components)
|
||||
// {
|
||||
|
@ -1,12 +1,12 @@
|
||||
using GarmentFactoryBusinessLogic.OfficePackage.HelperEnums;
|
||||
using GarmentFactoryBusinessLogic.OfficePackage.HelperModels;
|
||||
using ComputerShopBusinessLogic.OfficePackage.HelperEnums;
|
||||
using ComputerShopBusinessLogic.OfficePackage.HelperModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace GarmentFactoryBusinessLogic.OfficePackage
|
||||
namespace ComputerShopBusinessLogic.OfficePackage
|
||||
{
|
||||
public abstract class AbstractSaveToPdfImplementer
|
||||
{
|
||||
|
@ -1,12 +1,12 @@
|
||||
using GarmentFactoryBusinessLogic.OfficePackage.HelperEnums;
|
||||
using GarmentFactoryBusinessLogic.OfficePackage.HelperModels;
|
||||
using ComputerShopBusinessLogic.OfficePackage.HelperEnums;
|
||||
using ComputerShopBusinessLogic.OfficePackage.HelperModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace GarmentFactoryBusinessLogic.OfficePackage
|
||||
namespace ComputerShopBusinessLogic.OfficePackage
|
||||
{
|
||||
public abstract class AbstractSaveToWordImplementer
|
||||
{
|
||||
|
@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace GarmentFactoryBusinessLogic.OfficePackage.HelperEnums
|
||||
namespace ComputerShopBusinessLogic.OfficePackage.HelperEnums
|
||||
{
|
||||
public enum ExcelStyleInfoType
|
||||
{
|
||||
|
@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace GarmentFactoryBusinessLogic.OfficePackage.HelperEnums
|
||||
namespace ComputerShopBusinessLogic.OfficePackage.HelperEnums
|
||||
{
|
||||
public enum PdfParagraphAlignmentType
|
||||
{
|
||||
|
@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace GarmentFactoryBusinessLogic.OfficePackage.HelperEnums
|
||||
namespace ComputerShopBusinessLogic.OfficePackage.HelperEnums
|
||||
{
|
||||
public enum WordJustificationType
|
||||
{
|
||||
|
@ -1,11 +1,11 @@
|
||||
using GarmentFactoryBusinessLogic.OfficePackage.HelperEnums;
|
||||
using ComputerShopBusinessLogic.OfficePackage.HelperEnums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace GarmentFactoryBusinessLogic.OfficePackage.HelperModels
|
||||
namespace ComputerShopBusinessLogic.OfficePackage.HelperModels
|
||||
{
|
||||
public class ExcelCellParameters
|
||||
{
|
||||
|
@ -5,7 +5,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace GarmentFactoryBusinessLogic.OfficePackage.HelperModels
|
||||
namespace ComputerShopBusinessLogic.OfficePackage.HelperModels
|
||||
{
|
||||
public class ExcelInfoImplementer
|
||||
{
|
||||
|
@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace GarmentFactoryBusinessLogic.OfficePackage.HelperModels
|
||||
namespace ComputerShopBusinessLogic.OfficePackage.HelperModels
|
||||
{
|
||||
public class ExcelMergeParameters
|
||||
{
|
||||
|
@ -5,7 +5,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace GarmentFactoryBusinessLogic.OfficePackage.HelperModels
|
||||
namespace ComputerShopBusinessLogic.OfficePackage.HelperModels
|
||||
{
|
||||
public class PdfInfoImplementer
|
||||
{
|
||||
|
@ -1,11 +1,11 @@
|
||||
using GarmentFactoryBusinessLogic.OfficePackage.HelperEnums;
|
||||
using ComputerShopBusinessLogic.OfficePackage.HelperEnums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace GarmentFactoryBusinessLogic.OfficePackage.HelperModels
|
||||
namespace ComputerShopBusinessLogic.OfficePackage.HelperModels
|
||||
{
|
||||
public class PdfParagraph
|
||||
{
|
||||
|
@ -1,11 +1,11 @@
|
||||
using GarmentFactoryBusinessLogic.OfficePackage.HelperEnums;
|
||||
using ComputerShopBusinessLogic.OfficePackage.HelperEnums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace GarmentFactoryBusinessLogic.OfficePackage.HelperModels
|
||||
namespace ComputerShopBusinessLogic.OfficePackage.HelperModels
|
||||
{
|
||||
public class PdfRowParameters
|
||||
{
|
||||
|
@ -5,7 +5,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace GarmentFactoryBusinessLogic.OfficePackage.HelperModels
|
||||
namespace ComputerShopBusinessLogic.OfficePackage.HelperModels
|
||||
{
|
||||
public class WordInfoImplementer
|
||||
{
|
||||
|
@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace GarmentFactoryBusinessLogic.OfficePackage.HelperModels
|
||||
namespace ComputerShopBusinessLogic.OfficePackage.HelperModels
|
||||
{
|
||||
public class WordParagraph
|
||||
{
|
||||
|
@ -1,11 +1,11 @@
|
||||
using GarmentFactoryBusinessLogic.OfficePackage.HelperEnums;
|
||||
using ComputerShopBusinessLogic.OfficePackage.HelperEnums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace GarmentFactoryBusinessLogic.OfficePackage.HelperModels
|
||||
namespace ComputerShopBusinessLogic.OfficePackage.HelperModels
|
||||
{
|
||||
public class WordTextProperties
|
||||
{
|
||||
|
@ -3,15 +3,15 @@ using DocumentFormat.OpenXml.Office2013.Excel;
|
||||
using DocumentFormat.OpenXml.Packaging;
|
||||
using DocumentFormat.OpenXml.Spreadsheet;
|
||||
using DocumentFormat.OpenXml;
|
||||
using GarmentFactoryBusinessLogic.OfficePackage.HelperEnums;
|
||||
using GarmentFactoryBusinessLogic.OfficePackage.HelperModels;
|
||||
using ComputerShopBusinessLogic.OfficePackage.HelperEnums;
|
||||
using ComputerShopBusinessLogic.OfficePackage.HelperModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace GarmentFactoryBusinessLogic.OfficePackage.Implements
|
||||
namespace ComputerShopBusinessLogic.OfficePackage.Implements
|
||||
{
|
||||
public class SaveToExcelImplementer : AbstractSaveToExcelImplementer
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
using GarmentFactoryBusinessLogic.OfficePackage.HelperEnums;
|
||||
using GarmentFactoryBusinessLogic.OfficePackage.HelperModels;
|
||||
using ComputerShopBusinessLogic.OfficePackage.HelperEnums;
|
||||
using ComputerShopBusinessLogic.OfficePackage.HelperModels;
|
||||
using MigraDoc.DocumentObjectModel;
|
||||
using MigraDoc.DocumentObjectModel.Tables;
|
||||
using MigraDoc.Rendering;
|
||||
@ -9,7 +9,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace GarmentFactoryBusinessLogic.OfficePackage.Implements
|
||||
namespace ComputerShopBusinessLogic.OfficePackage.Implements
|
||||
{
|
||||
public class SaveToPdfImplementer : AbstractSaveToPdfImplementer
|
||||
{
|
||||
|
@ -1,15 +1,15 @@
|
||||
using DocumentFormat.OpenXml;
|
||||
using DocumentFormat.OpenXml.Packaging;
|
||||
using DocumentFormat.OpenXml.Wordprocessing;
|
||||
using GarmentFactoryBusinessLogic.OfficePackage.HelperEnums;
|
||||
using GarmentFactoryBusinessLogic.OfficePackage.HelperModels;
|
||||
using ComputerShopBusinessLogic.OfficePackage.HelperEnums;
|
||||
using ComputerShopBusinessLogic.OfficePackage.HelperModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace GarmentFactoryBusinessLogic.OfficePackage.Implements
|
||||
namespace ComputerShopBusinessLogic.OfficePackage.Implements
|
||||
{
|
||||
public class SaveToWordImplementer : AbstractSaveToWordImplementer
|
||||
{
|
||||
|
@ -560,8 +560,19 @@ namespace ComputerShopImplementerApp.Controllers
|
||||
return View();
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public IActionResult GetWordFile()
|
||||
{
|
||||
return PhysicalFile("C:\\!КУРСОВАЯ\\Сборки по выбранным заказам.docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "Сборки по выбранным заказам.docx");
|
||||
}
|
||||
|
||||
public IActionResult GetExcelFile()
|
||||
{
|
||||
return PhysicalFile("C:\\!КУРСОВАЯ\\Сборки по выбранным заказам.xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "Сборки по выбранным заказам.xlsx");
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public void ReportOrdersAssembliesToFile(int[] orders, string type)
|
||||
public IActionResult ReportOrdersAssembliesToFile(int[] orders, string type)
|
||||
{
|
||||
if (APIUser.User == null)
|
||||
{
|
||||
@ -583,7 +594,8 @@ namespace ComputerShopImplementerApp.Controllers
|
||||
Ids = ids,
|
||||
FileName = "C:\\!КУРСОВАЯ\\Сборки по выбранным заказам.docx"
|
||||
});
|
||||
Response.Redirect("Index");
|
||||
return GetWordFile();
|
||||
//Response.Redirect("GetWordFile");
|
||||
}
|
||||
|
||||
if (type == "xlsx")
|
||||
@ -593,10 +605,11 @@ namespace ComputerShopImplementerApp.Controllers
|
||||
Ids = ids,
|
||||
FileName = "C:\\!КУРСОВАЯ\\Сборки по выбранным заказам.xlsx"
|
||||
});
|
||||
Response.Redirect("Index");
|
||||
return GetExcelFile();
|
||||
//Response.Redirect("GetExcelFile");
|
||||
}
|
||||
}
|
||||
Response.Redirect("Index");
|
||||
return Redirect("Index");
|
||||
}
|
||||
|
||||
|
||||
|
@ -5,8 +5,8 @@ using ComputerShopDatabaseImplement.Implements;
|
||||
using ComputerShopDatabaseImplement.Models;
|
||||
using ComputerShopDataModels.Models;
|
||||
using ComputerShopImplementerApp;
|
||||
using GarmentFactoryBusinessLogic.OfficePackage;
|
||||
using GarmentFactoryBusinessLogic.OfficePackage.Implements;
|
||||
using ComputerShopBusinessLogic.OfficePackage;
|
||||
using ComputerShopBusinessLogic.OfficePackage.Implements;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
@* !!!ЕСЛИ НЕ БУДЕТ РАБОТАТЬ, УБРАТЬ ОТСЮДА @order.Sum *@
|
||||
@foreach (var order in ViewBag.Orders)
|
||||
{
|
||||
<option value="@order.Id">@order.DateCreate; @order.Sum</option>
|
||||
<option value="@order.Id">@order.Id) @order.DateCreate; @order.Sum</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
|
@ -5,8 +5,8 @@ using ComputerShopDatabaseImplement.Implements;
|
||||
using ComputerShopBusinessLogic.MailWorker;
|
||||
using ComputerShopDatabaseImplement.Models;
|
||||
using ComputerShopDataModels.Models;
|
||||
using GarmentFactoryBusinessLogic.OfficePackage;
|
||||
using GarmentFactoryBusinessLogic.OfficePackage.Implements;
|
||||
using ComputerShopBusinessLogic.OfficePackage;
|
||||
using ComputerShopBusinessLogic.OfficePackage.Implements;
|
||||
using Microsoft.OpenApi.Models;
|
||||
using ComputerShopContracts.BindingModels;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user