почта не ворк
This commit is contained in:
parent
7ea4b12dad
commit
1ec31b773b
@ -65,6 +65,7 @@ namespace BeautySalonBusinesLogic.BusinessLogics
|
||||
.Select(x => new ReportServicesViewModel
|
||||
{
|
||||
Id = x.Id,
|
||||
ServiceName = x.ServiceName,
|
||||
Cosmetics = x.ServiceCosmetics,
|
||||
Procedures = x.ServiceProcedures,
|
||||
ServicePrice = x.ServiceProcedures.Sum(kv => kv.Value.Item1.ProcedurePrice) +
|
||||
@ -94,12 +95,13 @@ namespace BeautySalonBusinesLogic.BusinessLogics
|
||||
|
||||
public void SaveServicesToPdfFile(ReportServiceBindingModel model)
|
||||
{
|
||||
_saveToPdf.CreateReport(new PdfInfo
|
||||
var report = new PdfInfo
|
||||
{
|
||||
FileName = model.FileName,
|
||||
Title = "Список услуг",
|
||||
Services = GetServices(model)
|
||||
});
|
||||
};
|
||||
_saveToPdf.CreateReport(report);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ namespace BeautySalonBusinesLogics.OfficePackage
|
||||
string procedure = (i < procedures.Count) ? procedures[i] : "";
|
||||
CreateRow(new PdfRowParameters
|
||||
{
|
||||
Texts = new List<string> { "", cosmetic, procedure },
|
||||
Texts = new List<string> { "", procedure, cosmetic },
|
||||
Style = "Normal",
|
||||
ParagraphAlignment = PdfParagraphAlignmentType.Left
|
||||
});
|
||||
|
@ -28,7 +28,7 @@ namespace BeatySalonBusinesLogic.OfficePackage
|
||||
CreateParagraph(new WordParagraph
|
||||
{
|
||||
Texts = new List<(string, WordTextProperties)> {
|
||||
(cp.CosmeticName + " :", new WordTextProperties { Size = "24", Bold = true, }),
|
||||
(cp.CosmeticName + " : ", new WordTextProperties { Size = "24", Bold = true, }),
|
||||
},
|
||||
TextProperties = new WordTextProperties
|
||||
{
|
||||
@ -36,25 +36,22 @@ namespace BeatySalonBusinesLogic.OfficePackage
|
||||
JustificationType = WordJustificationType.Both
|
||||
}
|
||||
});
|
||||
foreach (var procedure in cp.Procedures)
|
||||
{
|
||||
CreateParagraph(new WordParagraph
|
||||
{
|
||||
Texts = new List<(string, WordTextProperties)>
|
||||
foreach (var procedure in cp.Procedures)
|
||||
{
|
||||
CreateParagraph(new WordParagraph
|
||||
{
|
||||
Texts = new List<(string, WordTextProperties)>
|
||||
{
|
||||
// Пустая строка для смещения во вторую колонку
|
||||
(string.Empty, new WordTextProperties { Size = "24" }),
|
||||
// Наименование косметики
|
||||
(procedure, new WordTextProperties { Size = "24" })
|
||||
(" " + procedure, new WordTextProperties { Size = "24" }) // Добавляем отступ в виде Tab
|
||||
},
|
||||
TextProperties = new WordTextProperties
|
||||
{
|
||||
Size = "24",
|
||||
JustificationType = WordJustificationType.Both
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
TextProperties = new WordTextProperties
|
||||
{
|
||||
Size = "24",
|
||||
JustificationType = WordJustificationType.Both
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
SaveWord(info);
|
||||
}
|
||||
//Создание док-файла
|
||||
|
@ -17,7 +17,7 @@ namespace BeautySalonDatabaseImplement
|
||||
{
|
||||
if (optionsBuilder.IsConfigured == false)
|
||||
{
|
||||
optionsBuilder.UseSqlServer(@"Data Source=ALYONA\;Initial Catalog=BeautySalonDatabase2;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
||||
optionsBuilder.UseSqlServer(@"Data Source=PRETTYNAME;Initial Catalog=BeautySalonDatabase2;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
||||
}
|
||||
base.OnConfiguring(optionsBuilder);
|
||||
}
|
||||
|
@ -5,5 +5,11 @@
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*"
|
||||
"AllowedHosts": "*",
|
||||
"SmtpClientHost": "smtp.gmail.com",
|
||||
"SmtpClientPort": "587",
|
||||
"PopHost": "pop.gmail.com",
|
||||
"PopPort": "995",
|
||||
"MailLogin": "theredguy13@gmail.com",
|
||||
"MailPassword": "gcok utyv qyce qfre"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user