- | |
+ ; |
@record.CodNegotiation
diff --git a/SHERPA.BBM.UI/Pages/Negotiations.razor.cs b/SHERPA.BBM.UI/Pages/Negotiations.razor.cs
index 8321100..a37e983 100644
--- a/SHERPA.BBM.UI/Pages/Negotiations.razor.cs
+++ b/SHERPA.BBM.UI/Pages/Negotiations.razor.cs
@@ -108,6 +108,7 @@ namespace SHERPA.BBM.UI.Pages
{
CodNegotiation = newCode,
DataIns = DateTime.Now,
+ CompanyId = SelCompanyId,
CustomerId = 1,
Descript = "Nuova Negoziazione",
BasePath = "",
@@ -125,6 +126,26 @@ namespace SHERPA.BBM.UI.Pages
await UpdateData();
}
+ protected async Task Duplicate(DatabaseModels.NegotiationsModel currRecord)
+ {
+ if (!await JSRuntime.InvokeAsync("confirm", $"Sicuro di voler clonare la trattativa/licenza corrente?"))
+ return;
+
+ // recupero counter
+ string newCode = BBMService.CounterGetNext($"{SelectData.Company}.N.{DateTime.Today.Year}", 6);
+ DatabaseModels.NegotiationsModel newRecord = new DatabaseModels.NegotiationsModel()
+ {
+ CodNegotiation = newCode,
+ DataIns = DateTime.Now,
+ CompanyId = currRecord.CompanyId,
+ CustomerId = 1,
+ Descript = "COPIA di " + currRecord.Descript,
+ BasePath = currRecord.BasePath,
+ Refer = currRecord.Refer
+ };
+ currItem = newRecord;
+ }
+
protected void Edit(SHERPA.BBM.DatabaseModels.NegotiationsModel currRecord)
{
currItem = currRecord;
|