ворд работает(?)
This commit is contained in:
parent
209784fc73
commit
c508544699
@ -54,7 +54,7 @@ namespace LawFirmBusinessLogic.BusinessLogics
|
||||
public List<ReportClientsConsultationViewModel> GetClientsConsultation(ReportBindingModel model)
|
||||
{
|
||||
var clients = _clientStorage.GetFilteredList(new ClientSearchModel { Id = model.ClientId });
|
||||
var cases = _caseStorage.GetFullList();
|
||||
var cases = _caseStorage.GetFilteredList(new CaseSearchModel { ExecutorId = model.ExecutorId });
|
||||
var consultations = _consultationStorage.GetFullList();
|
||||
|
||||
var list = new List<ReportClientsConsultationViewModel>();
|
||||
@ -74,6 +74,7 @@ namespace LawFirmBusinessLogic.BusinessLogics
|
||||
{
|
||||
record.ConsultationDate = cons.ConsultationDate;
|
||||
record.ConsultationCost = cons.Cost;
|
||||
record.Consultations.Add(new(cons.ConsultationDate, cons.Cost));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -188,7 +189,7 @@ namespace LawFirmBusinessLogic.BusinessLogics
|
||||
var record = new ReportConsultationHearingViewModel
|
||||
{
|
||||
LawyerName = lawyer.FIO,
|
||||
Consultation = new List<(DateTime ConsultationDate, double Price)>(),
|
||||
//Consultation = new List<(DateTime ConsultationDate, double Price)>(),
|
||||
Hearing = new List<(DateTime HearingDate, string Judge)>()
|
||||
};
|
||||
|
||||
@ -196,7 +197,7 @@ namespace LawFirmBusinessLogic.BusinessLogics
|
||||
{
|
||||
if (consultation.ConsultationLawyers.ContainsKey(lawyer.Id))
|
||||
{
|
||||
record.Consultation.Add(new(consultation.ConsultationDate, consultation.Cost));
|
||||
// record.Consultation.Add(new(consultation.ConsultationDate, consultation.Cost));
|
||||
}
|
||||
}
|
||||
foreach (var hearing in hearings)
|
||||
|
@ -41,7 +41,7 @@ namespace LawFirmBusinessLogic.OfficePackages
|
||||
{
|
||||
ColumnName = "B",
|
||||
RowIndex = rowIndex,
|
||||
Text = consultation.Cost,
|
||||
Text = consultation.Cost.ToString(),
|
||||
StyleInfo =
|
||||
ExcelStyleInfoType.TextWithBroder
|
||||
});
|
||||
|
@ -5,6 +5,6 @@
|
||||
public string ClientFIO { get; set; } = string.Empty;
|
||||
public double? ConsultationCost { get; set; }
|
||||
public DateTime? ConsultationDate { get; set; }
|
||||
public List<(DateTime ConsultationDate, string Cost)> Consultations { get; set; } = new();
|
||||
public List<(DateTime ConsultationDate, double Cost)> Consultations { get; set; } = new();
|
||||
}
|
||||
}
|
||||
|
@ -11,9 +11,9 @@ namespace LawFirmDatabaseImplement
|
||||
{
|
||||
if (optionsBuilder.IsConfigured == false)
|
||||
{
|
||||
//optionsBuilder.UseSqlServer(@"Data Source=ZIRAEL\SQLEXPRESS;Initial Catalog=LawFirmDatabase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
||||
optionsBuilder.UseSqlServer(@"Data Source=ZIRAEL\SQLEXPRESS;Initial Catalog=LawFirmDatabase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
||||
|
||||
optionsBuilder.UseSqlServer(@"Data Source=PC-Anna\SQLEXPRESS;Initial Catalog=LawFirmDatabase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
||||
//optionsBuilder.UseSqlServer(@"Data Source=PC-Anna\SQLEXPRESS;Initial Catalog=LawFirmDatabase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
||||
}
|
||||
base.OnConfiguring(optionsBuilder);
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ namespace LawFirmRestApi.Controllers
|
||||
{
|
||||
DateFrom = report.DateFrom,
|
||||
DateTo = report.DateTo,
|
||||
FileName = "D:\\CourseWork\\pdfclientsreport.pdf",
|
||||
FileName = "E:\\reports\\pdfclientsreport.pdf",
|
||||
ClientId = report.ClientId,
|
||||
ExecutorId = report.ExecutorId,
|
||||
});
|
||||
@ -46,7 +46,7 @@ namespace LawFirmRestApi.Controllers
|
||||
{
|
||||
try
|
||||
{
|
||||
_reportLogic.SaveClientsConsultationToWordFile(new ReportBindingModel { ExecutorId = report.ExecutorId, FileName = "D:\\CourseWork\\wordclientsreport.docx", ClientId = report.ClientId });
|
||||
_reportLogic.SaveClientsConsultationToWordFile(new ReportBindingModel { ExecutorId = report.ExecutorId, FileName = "E:\\reports\\wordclientsreport.docx", ClientId = report.ClientId });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@ -59,7 +59,7 @@ namespace LawFirmRestApi.Controllers
|
||||
{
|
||||
try
|
||||
{
|
||||
_reportLogic.SaveClientsConsultationToExcelFile(new ReportBindingModel { ExecutorId = report.ExecutorId, FileName = "D:\\CourseWork\\excelclientsreport.xlsx", ClientId = report.ClientId });
|
||||
_reportLogic.SaveClientsConsultationToExcelFile(new ReportBindingModel { ExecutorId = report.ExecutorId, FileName = "E:\\reports\\excelclientsreport.xlsx", ClientId = report.ClientId });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user