edit
This commit is contained in:
@@ -28,6 +28,7 @@
|
|||||||
<Style TargetType="{x:Type Window}">
|
<Style TargetType="{x:Type Window}">
|
||||||
<Setter Property="Background" Value="{StaticResource AppWindowBackgroundBrush}" />
|
<Setter Property="Background" Value="{StaticResource AppWindowBackgroundBrush}" />
|
||||||
<Setter Property="Foreground" Value="{StaticResource AppTextBrush}" />
|
<Setter Property="Foreground" Value="{StaticResource AppTextBrush}" />
|
||||||
|
<Setter Property="Icon" Value="pack://application:,,,/Assets/XlabApp.ico" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style TargetType="{x:Type TextBlock}">
|
<Style TargetType="{x:Type TextBlock}">
|
||||||
|
|||||||
BIN
XLAB2/Assets/XlabApp.ico
Normal file
BIN
XLAB2/Assets/XlabApp.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 100 KiB |
BIN
XLAB2/Assets/XlabAppIconPreview.png
Normal file
BIN
XLAB2/Assets/XlabAppIconPreview.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 178 KiB |
@@ -960,14 +960,14 @@ namespace XLAB2
|
|||||||
|
|
||||||
foreach (var pendingLinesByDocument in _pendingLinesByDocumentKey)
|
foreach (var pendingLinesByDocument in _pendingLinesByDocumentKey)
|
||||||
{
|
{
|
||||||
if (string.Equals(pendingLinesByDocument.Key, currentDocument.DocumentKey, StringComparison.OrdinalIgnoreCase))
|
if (MatchesPendingLinesStorageKey(currentDocument, pendingLinesByDocument.Key))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
var otherDocument = Documents.FirstOrDefault(delegate(PsvDocumentSummary document)
|
var otherDocument = Documents.FirstOrDefault(delegate(PsvDocumentSummary document)
|
||||||
{
|
{
|
||||||
return string.Equals(document.DocumentKey, pendingLinesByDocument.Key, StringComparison.OrdinalIgnoreCase);
|
return MatchesPendingLinesStorageKey(document, pendingLinesByDocument.Key);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (otherDocument == null
|
if (otherDocument == null
|
||||||
@@ -1395,7 +1395,7 @@ namespace XLAB2
|
|||||||
RunBusyOperation(async delegate
|
RunBusyOperation(async delegate
|
||||||
{
|
{
|
||||||
var result = await _service.DeleteDocumentAsync(selectedDocument.DocumentNumber);
|
var result = await _service.DeleteDocumentAsync(selectedDocument.DocumentNumber);
|
||||||
_pendingLinesByDocumentKey.Remove(selectedDocument.DocumentKey);
|
_pendingLinesByDocumentKey.Remove(GetPendingLinesStorageKey(selectedDocument));
|
||||||
await RefreshDocumentsCoreAsync(null, null);
|
await RefreshDocumentsCoreAsync(null, null);
|
||||||
_dialogService.ShowInfo(
|
_dialogService.ShowInfo(
|
||||||
string.Format(
|
string.Format(
|
||||||
@@ -1409,7 +1409,7 @@ namespace XLAB2
|
|||||||
private void DeleteDraftDocument(PsvDocumentSummary draft)
|
private void DeleteDraftDocument(PsvDocumentSummary draft)
|
||||||
{
|
{
|
||||||
_draftDocuments.RemoveAll(delegate(PsvDocumentSummary item) { return item.DocumentKey == draft.DocumentKey; });
|
_draftDocuments.RemoveAll(delegate(PsvDocumentSummary item) { return item.DocumentKey == draft.DocumentKey; });
|
||||||
_pendingLinesByDocumentKey.Remove(draft.DocumentKey);
|
_pendingLinesByDocumentKey.Remove(GetPendingLinesStorageKey(draft));
|
||||||
Documents.Remove(draft);
|
Documents.Remove(draft);
|
||||||
DocumentsView.Refresh();
|
DocumentsView.Refresh();
|
||||||
SelectedDocument = Documents.Count > 0 ? Documents[0] : null;
|
SelectedDocument = Documents.Count > 0 ? Documents[0] : null;
|
||||||
@@ -1885,12 +1885,41 @@ namespace XLAB2
|
|||||||
return new List<PsvDocumentLine>();
|
return new List<PsvDocumentLine>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var pendingKey = GetPendingLinesStorageKey(document);
|
||||||
|
if (string.IsNullOrWhiteSpace(pendingKey))
|
||||||
|
{
|
||||||
|
return new List<PsvDocumentLine>();
|
||||||
|
}
|
||||||
|
|
||||||
List<PsvDocumentLine> lines;
|
List<PsvDocumentLine> lines;
|
||||||
return _pendingLinesByDocumentKey.TryGetValue(document.DocumentKey, out lines)
|
return _pendingLinesByDocumentKey.TryGetValue(pendingKey, out lines)
|
||||||
? lines
|
? lines
|
||||||
: new List<PsvDocumentLine>();
|
: new List<PsvDocumentLine>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static string GetPendingLinesStorageKey(PsvDocumentSummary document)
|
||||||
|
{
|
||||||
|
if (document == null)
|
||||||
|
{
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!document.IsDraft && !string.IsNullOrWhiteSpace(document.DocumentNumber))
|
||||||
|
{
|
||||||
|
return document.DocumentNumber.Trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
return string.IsNullOrWhiteSpace(document.DocumentKey)
|
||||||
|
? string.Empty
|
||||||
|
: document.DocumentKey.Trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static bool MatchesPendingLinesStorageKey(PsvDocumentSummary document, string pendingKey)
|
||||||
|
{
|
||||||
|
return !string.IsNullOrWhiteSpace(pendingKey)
|
||||||
|
&& string.Equals(GetPendingLinesStorageKey(document), pendingKey, StringComparison.OrdinalIgnoreCase);
|
||||||
|
}
|
||||||
|
|
||||||
private List<PsvDocumentLine> MergeDocumentLinesForPrint(PsvDocumentSummary document, IEnumerable<PsvDocumentLine> persistedLines)
|
private List<PsvDocumentLine> MergeDocumentLinesForPrint(PsvDocumentSummary document, IEnumerable<PsvDocumentLine> persistedLines)
|
||||||
{
|
{
|
||||||
var mergedLines = new List<PsvDocumentLine>();
|
var mergedLines = new List<PsvDocumentLine>();
|
||||||
@@ -2103,11 +2132,17 @@ namespace XLAB2
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var pendingKey = GetPendingLinesStorageKey(SelectedDocument);
|
||||||
|
if (string.IsNullOrWhiteSpace(pendingKey))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
List<PsvDocumentLine> pendingLines;
|
List<PsvDocumentLine> pendingLines;
|
||||||
if (!_pendingLinesByDocumentKey.TryGetValue(SelectedDocument.DocumentKey, out pendingLines))
|
if (!_pendingLinesByDocumentKey.TryGetValue(pendingKey, out pendingLines))
|
||||||
{
|
{
|
||||||
pendingLines = new List<PsvDocumentLine>();
|
pendingLines = new List<PsvDocumentLine>();
|
||||||
_pendingLinesByDocumentKey[SelectedDocument.DocumentKey] = pendingLines;
|
_pendingLinesByDocumentKey[pendingKey] = pendingLines;
|
||||||
}
|
}
|
||||||
|
|
||||||
var candidateLines = selectedItems
|
var candidateLines = selectedItems
|
||||||
@@ -2220,11 +2255,17 @@ namespace XLAB2
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var pendingKey = GetPendingLinesStorageKey(SelectedDocument);
|
||||||
|
if (string.IsNullOrWhiteSpace(pendingKey))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
List<PsvDocumentLine> pendingLines;
|
List<PsvDocumentLine> pendingLines;
|
||||||
if (!_pendingLinesByDocumentKey.TryGetValue(SelectedDocument.DocumentKey, out pendingLines))
|
if (!_pendingLinesByDocumentKey.TryGetValue(pendingKey, out pendingLines))
|
||||||
{
|
{
|
||||||
pendingLines = new List<PsvDocumentLine>();
|
pendingLines = new List<PsvDocumentLine>();
|
||||||
_pendingLinesByDocumentKey[SelectedDocument.DocumentKey] = pendingLines;
|
_pendingLinesByDocumentKey[pendingKey] = pendingLines;
|
||||||
}
|
}
|
||||||
|
|
||||||
var serialNumber = string.IsNullOrWhiteSpace(result.SerialNumber) ? string.Empty : result.SerialNumber.Trim();
|
var serialNumber = string.IsNullOrWhiteSpace(result.SerialNumber) ? string.Empty : result.SerialNumber.Trim();
|
||||||
@@ -2234,6 +2275,12 @@ namespace XLAB2
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (serialNumber.Length > EkzDirectoryRules.SerialNumberMaxLength)
|
||||||
|
{
|
||||||
|
_dialogService.ShowWarning(string.Format("Заводской номер не должен превышать {0} символов.", EkzDirectoryRules.SerialNumberMaxLength));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!result.TypeItem.HasTemplate)
|
if (!result.TypeItem.HasTemplate)
|
||||||
{
|
{
|
||||||
_dialogService.ShowWarning("Выбранный тип нельзя добавить: для него не найден шаблон EKZMK, период из TPRMCP или регистрационный период TIPS.");
|
_dialogService.ShowWarning("Выбранный тип нельзя добавить: для него не найден шаблон EKZMK, период из TPRMCP или регистрационный период TIPS.");
|
||||||
@@ -2541,13 +2588,14 @@ namespace XLAB2
|
|||||||
|
|
||||||
var currentDocumentNumber = selectedDocument.IsDraft ? null : selectedDocument.DocumentNumber;
|
var currentDocumentNumber = selectedDocument.IsDraft ? null : selectedDocument.DocumentNumber;
|
||||||
var documentKey = selectedDocument.DocumentKey;
|
var documentKey = selectedDocument.DocumentKey;
|
||||||
|
var documentPendingKey = GetPendingLinesStorageKey(selectedDocument);
|
||||||
var wasDraft = selectedDocument.IsDraft;
|
var wasDraft = selectedDocument.IsDraft;
|
||||||
var closingNow = !selectedDocument.IssuedOn.HasValue && request.IssuedOn.HasValue;
|
var closingNow = !selectedDocument.IssuedOn.HasValue && request.IssuedOn.HasValue;
|
||||||
var printDocument = closingNow ? CreateSavedDocumentSummaryForPrint(selectedDocument, request) : null;
|
var printDocument = closingNow ? CreateSavedDocumentSummaryForPrint(selectedDocument, request) : null;
|
||||||
var documentLinesSnapshot = DocumentLines.ToList();
|
var documentLinesSnapshot = DocumentLines.ToList();
|
||||||
var result = await Task.Run(delegate { return _service.SaveDocument(currentDocumentNumber, request, documentLinesSnapshot); });
|
var result = await Task.Run(delegate { return _service.SaveDocument(currentDocumentNumber, request, documentLinesSnapshot); });
|
||||||
|
|
||||||
_pendingLinesByDocumentKey.Remove(documentKey);
|
_pendingLinesByDocumentKey.Remove(documentPendingKey);
|
||||||
if (wasDraft)
|
if (wasDraft)
|
||||||
{
|
{
|
||||||
_draftDocuments.RemoveAll(delegate(PsvDocumentSummary draft) { return draft.DocumentKey == documentKey; });
|
_draftDocuments.RemoveAll(delegate(PsvDocumentSummary draft) { return draft.DocumentKey == documentKey; });
|
||||||
|
|||||||
@@ -1930,13 +1930,19 @@ ORDER BY names.NMTP, tips.TP, sizeInfo.DPZN, sizeInfo.NNGSRS;";
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!verificationTypeLoaded)
|
var effectiveVerificationTypeId = template.IdSpvdmk;
|
||||||
|
if (!effectiveVerificationTypeId.HasValue || effectiveVerificationTypeId.Value <= 0)
|
||||||
{
|
{
|
||||||
verificationTypeId = LoadVerificationTypeId(connection, transaction);
|
if (!verificationTypeLoaded)
|
||||||
verificationTypeLoaded = true;
|
{
|
||||||
|
verificationTypeId = LoadVerificationTypeId(connection, transaction);
|
||||||
|
verificationTypeLoaded = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
effectiveVerificationTypeId = verificationTypeId;
|
||||||
}
|
}
|
||||||
|
|
||||||
var cardId = InsertEkzMk(connection, transaction, verificationTypeId, document, normalizedNumber, instrumentId, template, pendingLine);
|
var cardId = InsertEkzMk(connection, transaction, effectiveVerificationTypeId.Value, document, normalizedNumber, instrumentId, template, pendingLine);
|
||||||
if (!string.IsNullOrWhiteSpace(pendingLine.VerificationDocumentNumber))
|
if (!string.IsNullOrWhiteSpace(pendingLine.VerificationDocumentNumber))
|
||||||
{
|
{
|
||||||
if (!pendingLine.VerificationDocumentFormId.HasValue || !pendingLine.VerificationDocumentLinkTypeId.HasValue)
|
if (!pendingLine.VerificationDocumentFormId.HasValue || !pendingLine.VerificationDocumentLinkTypeId.HasValue)
|
||||||
@@ -2200,6 +2206,7 @@ ORDER BY names.NMTP, tips.TP, sizeInfo.DPZN, sizeInfo.NNGSRS;";
|
|||||||
private static bool IsPendingLineReadyForSave(PsvDocumentLine line)
|
private static bool IsPendingLineReadyForSave(PsvDocumentLine line)
|
||||||
{
|
{
|
||||||
return line != null
|
return line != null
|
||||||
|
&& line.IsPendingInsert
|
||||||
&& (line.InstrumentId > 0
|
&& (line.InstrumentId > 0
|
||||||
|| (line.TypeSizeId > 0 && !string.IsNullOrWhiteSpace(line.SerialNumber)));
|
|| (line.TypeSizeId > 0 && !string.IsNullOrWhiteSpace(line.SerialNumber)));
|
||||||
}
|
}
|
||||||
@@ -2227,6 +2234,11 @@ ORDER BY names.NMTP, tips.TP, sizeInfo.DPZN, sizeInfo.NNGSRS;";
|
|||||||
throw new InvalidOperationException("Для новой строки ПСВ не указан заводской номер.");
|
throw new InvalidOperationException("Для новой строки ПСВ не указан заводской номер.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (serialNumber.Length > EkzDirectoryRules.SerialNumberMaxLength)
|
||||||
|
{
|
||||||
|
throw new InvalidOperationException(string.Format("Заводской номер не должен превышать {0} символов.", EkzDirectoryRules.SerialNumberMaxLength));
|
||||||
|
}
|
||||||
|
|
||||||
if (!document.CustomerId.HasValue)
|
if (!document.CustomerId.HasValue)
|
||||||
{
|
{
|
||||||
throw new InvalidOperationException("Для добавления прибора по типу должен быть выбран заказчик ПСВ.");
|
throw new InvalidOperationException("Для добавления прибора по типу должен быть выбран заказчик ПСВ.");
|
||||||
@@ -2269,7 +2281,7 @@ SELECT TOP (1) z.IDEKZ
|
|||||||
FROM dbo.EKZ z
|
FROM dbo.EKZ z
|
||||||
WHERE z.IDTPRZ = @TypeSizeId
|
WHERE z.IDTPRZ = @TypeSizeId
|
||||||
AND z.IDFRPDV = @CustomerId
|
AND z.IDFRPDV = @CustomerId
|
||||||
AND z.NNZV = @SerialNumber
|
AND LTRIM(RTRIM(z.NNZV)) = @SerialNumber
|
||||||
AND ISNULL(z.IsDeleted, 0) = 0
|
AND ISNULL(z.IsDeleted, 0) = 0
|
||||||
ORDER BY z.IDEKZ DESC;";
|
ORDER BY z.IDEKZ DESC;";
|
||||||
|
|
||||||
@@ -2278,7 +2290,7 @@ ORDER BY z.IDEKZ DESC;";
|
|||||||
command.CommandTimeout = SqlServerConnectionFactory.Current.Options.CommandTimeoutSeconds;
|
command.CommandTimeout = SqlServerConnectionFactory.Current.Options.CommandTimeoutSeconds;
|
||||||
command.Parameters.Add("@TypeSizeId", SqlDbType.Int).Value = typeSizeId;
|
command.Parameters.Add("@TypeSizeId", SqlDbType.Int).Value = typeSizeId;
|
||||||
command.Parameters.Add("@CustomerId", SqlDbType.Int).Value = customerId;
|
command.Parameters.Add("@CustomerId", SqlDbType.Int).Value = customerId;
|
||||||
command.Parameters.Add("@SerialNumber", SqlDbType.VarChar, 30).Value = serialNumber;
|
command.Parameters.Add("@SerialNumber", SqlDbType.NVarChar, EkzDirectoryRules.SerialNumberMaxLength).Value = serialNumber;
|
||||||
|
|
||||||
var result = command.ExecuteScalar();
|
var result = command.ExecuteScalar();
|
||||||
return result == null || result == DBNull.Value ? (int?)null : Convert.ToInt32(result);
|
return result == null || result == DBNull.Value ? (int?)null : Convert.ToInt32(result);
|
||||||
@@ -2315,7 +2327,7 @@ SELECT CAST(SCOPE_IDENTITY() AS int);";
|
|||||||
command.Parameters.Add("@TypeSizeId", SqlDbType.Int).Value = typeSizeId;
|
command.Parameters.Add("@TypeSizeId", SqlDbType.Int).Value = typeSizeId;
|
||||||
command.Parameters.Add("@CustomerId", SqlDbType.Int).Value = customerId;
|
command.Parameters.Add("@CustomerId", SqlDbType.Int).Value = customerId;
|
||||||
command.Parameters.Add("@Klsipr", SqlDbType.Int).Value = 1;
|
command.Parameters.Add("@Klsipr", SqlDbType.Int).Value = 1;
|
||||||
command.Parameters.Add("@SerialNumber", SqlDbType.VarChar, 30).Value = serialNumber;
|
command.Parameters.Add("@SerialNumber", SqlDbType.NVarChar, EkzDirectoryRules.SerialNumberMaxLength).Value = serialNumber;
|
||||||
command.Parameters.Add("@GuidEkz", SqlDbType.UniqueIdentifier).Value = Guid.NewGuid();
|
command.Parameters.Add("@GuidEkz", SqlDbType.UniqueIdentifier).Value = Guid.NewGuid();
|
||||||
return Convert.ToInt32(command.ExecuteScalar());
|
return Convert.ToInt32(command.ExecuteScalar());
|
||||||
}
|
}
|
||||||
@@ -2419,7 +2431,7 @@ ORDER BY m.NNZVPV;";
|
|||||||
command.CommandTimeout = SqlServerConnectionFactory.Current.Options.CommandTimeoutSeconds;
|
command.CommandTimeout = SqlServerConnectionFactory.Current.Options.CommandTimeoutSeconds;
|
||||||
command.Parameters.Add("@CustomerId", SqlDbType.Int).Value = customerId;
|
command.Parameters.Add("@CustomerId", SqlDbType.Int).Value = customerId;
|
||||||
command.Parameters.Add("@TypeSizeId", SqlDbType.Int).Value = candidateLine.TypeSizeId;
|
command.Parameters.Add("@TypeSizeId", SqlDbType.Int).Value = candidateLine.TypeSizeId;
|
||||||
command.Parameters.Add("@SerialNumber", SqlDbType.VarChar, 30).Value = candidateLine.SerialNumber.Trim();
|
command.Parameters.Add("@SerialNumber", SqlDbType.NVarChar, EkzDirectoryRules.SerialNumberMaxLength).Value = candidateLine.SerialNumber.Trim();
|
||||||
command.Parameters.Add("@CurrentDocumentNumber", SqlDbType.NVarChar, 60).Value = currentDocumentNumber ?? string.Empty;
|
command.Parameters.Add("@CurrentDocumentNumber", SqlDbType.NVarChar, 60).Value = currentDocumentNumber ?? string.Empty;
|
||||||
|
|
||||||
using (var reader = command.ExecuteReader())
|
using (var reader = command.ExecuteReader())
|
||||||
@@ -2521,7 +2533,7 @@ ORDER BY m.NNZVPV;";
|
|||||||
command.CommandTimeout = SqlServerConnectionFactory.Current.Options.CommandTimeoutSeconds;
|
command.CommandTimeout = SqlServerConnectionFactory.Current.Options.CommandTimeoutSeconds;
|
||||||
command.Parameters.Add("@CustomerId", SqlDbType.Int).Value = customerId;
|
command.Parameters.Add("@CustomerId", SqlDbType.Int).Value = customerId;
|
||||||
command.Parameters.Add("@TypeSizeId", SqlDbType.Int).Value = candidateLine.TypeSizeId;
|
command.Parameters.Add("@TypeSizeId", SqlDbType.Int).Value = candidateLine.TypeSizeId;
|
||||||
command.Parameters.Add("@SerialNumber", SqlDbType.VarChar, 30).Value = candidateLine.SerialNumber.Trim();
|
command.Parameters.Add("@SerialNumber", SqlDbType.NVarChar, EkzDirectoryRules.SerialNumberMaxLength).Value = candidateLine.SerialNumber.Trim();
|
||||||
command.Parameters.Add("@CurrentDocumentNumber", SqlDbType.NVarChar, 60).Value = currentDocumentNumber ?? string.Empty;
|
command.Parameters.Add("@CurrentDocumentNumber", SqlDbType.NVarChar, 60).Value = currentDocumentNumber ?? string.Empty;
|
||||||
},
|
},
|
||||||
cancellationToken).ConfigureAwait(false);
|
cancellationToken).ConfigureAwait(false);
|
||||||
@@ -3688,8 +3700,17 @@ WHERE z.IDEKZ = @InstrumentId;";
|
|||||||
const string sql = @"
|
const string sql = @"
|
||||||
SELECT TOP (1) IDSPVDMK
|
SELECT TOP (1) IDSPVDMK
|
||||||
FROM dbo.SPVDMK
|
FROM dbo.SPVDMK
|
||||||
WHERE OBVDMK = N'П' OR NMVDMK = N'Поверка'
|
WHERE UPPER(LTRIM(RTRIM(ISNULL(OBVDMK, N'')))) = N'П'
|
||||||
ORDER BY CASE WHEN OBVDMK = N'Рџ' THEN 0 ELSE 1 END, IDSPVDMK;";
|
OR UPPER(LTRIM(RTRIM(ISNULL(NMVDMK, N'')))) = N'ПОВЕРКА'
|
||||||
|
OR UPPER(LTRIM(RTRIM(ISNULL(NMVDMK, N'')))) LIKE N'ПОВЕРК%'
|
||||||
|
OR UPPER(LTRIM(RTRIM(ISNULL(NMVDMK, N'')))) LIKE N'%ПОВЕРК%'
|
||||||
|
ORDER BY CASE
|
||||||
|
WHEN UPPER(LTRIM(RTRIM(ISNULL(OBVDMK, N'')))) = N'П' THEN 0
|
||||||
|
WHEN UPPER(LTRIM(RTRIM(ISNULL(NMVDMK, N'')))) = N'ПОВЕРКА' THEN 1
|
||||||
|
WHEN UPPER(LTRIM(RTRIM(ISNULL(NMVDMK, N'')))) LIKE N'ПОВЕРК%' THEN 2
|
||||||
|
ELSE 3
|
||||||
|
END,
|
||||||
|
IDSPVDMK;";
|
||||||
|
|
||||||
using (var command = new SqlCommand(sql, connection, transaction))
|
using (var command = new SqlCommand(sql, connection, transaction))
|
||||||
{
|
{
|
||||||
@@ -3719,6 +3740,7 @@ WITH TemplateCandidates AS
|
|||||||
m.IDSPMU,
|
m.IDSPMU,
|
||||||
m.IDGRSI,
|
m.IDGRSI,
|
||||||
m.IDKSPRL,
|
m.IDKSPRL,
|
||||||
|
m.IDSPVDMK,
|
||||||
m.IDSPVDMC,
|
m.IDSPVDMC,
|
||||||
m.IDFRPD,
|
m.IDFRPD,
|
||||||
m.IDSPMPOB,
|
m.IDSPMPOB,
|
||||||
@@ -3757,6 +3779,7 @@ WITH TemplateCandidates AS
|
|||||||
m.IDSPMU,
|
m.IDSPMU,
|
||||||
m.IDGRSI,
|
m.IDGRSI,
|
||||||
m.IDKSPRL,
|
m.IDKSPRL,
|
||||||
|
m.IDSPVDMK,
|
||||||
m.IDSPVDMC,
|
m.IDSPVDMC,
|
||||||
m.IDFRPD,
|
m.IDFRPD,
|
||||||
m.IDSPMPOB,
|
m.IDSPMPOB,
|
||||||
@@ -3805,6 +3828,7 @@ ORDER BY Priority;";
|
|||||||
IdSpmu = GetNullableInt32(reader, "IDSPMU"),
|
IdSpmu = GetNullableInt32(reader, "IDSPMU"),
|
||||||
IdGrsi = GetNullableInt32(reader, "IDGRSI"),
|
IdGrsi = GetNullableInt32(reader, "IDGRSI"),
|
||||||
IdKsprl = GetNullableInt32(reader, "IDKSPRL"),
|
IdKsprl = GetNullableInt32(reader, "IDKSPRL"),
|
||||||
|
IdSpvdmk = GetNullableInt32(reader, "IDSPVDMK"),
|
||||||
IdSpvdmc = GetNullableInt32(reader, "IDSPVDMC"),
|
IdSpvdmc = GetNullableInt32(reader, "IDSPVDMC"),
|
||||||
IdFrpd = GetInt32(reader, "IDFRPD"),
|
IdFrpd = GetInt32(reader, "IDFRPD"),
|
||||||
IdSpmpob = GetNullableInt32(reader, "IDSPMPOB"),
|
IdSpmpob = GetNullableInt32(reader, "IDSPMPOB"),
|
||||||
@@ -3906,6 +3930,7 @@ WHERE z.IDEKZ = @InstrumentId
|
|||||||
IdSpmu = null,
|
IdSpmu = null,
|
||||||
IdGrsi = GetNullableInt32(reader, "IDGRSI"),
|
IdGrsi = GetNullableInt32(reader, "IDGRSI"),
|
||||||
IdKsprl = null,
|
IdKsprl = null,
|
||||||
|
IdSpvdmk = null,
|
||||||
IdSpvdmc = GetNullableInt32(reader, "IDSPVDMC"),
|
IdSpvdmc = GetNullableInt32(reader, "IDSPVDMC"),
|
||||||
IdFrpd = GetInt32(reader, "IDFRPD"),
|
IdFrpd = GetInt32(reader, "IDFRPD"),
|
||||||
IdSpmpob = null,
|
IdSpmpob = null,
|
||||||
|
|||||||
@@ -659,6 +659,8 @@ namespace XLAB2
|
|||||||
|
|
||||||
public int? IdSptsmp { get; set; }
|
public int? IdSptsmp { get; set; }
|
||||||
|
|
||||||
|
public int? IdSpvdmk { get; set; }
|
||||||
|
|
||||||
public int? IdSpvdkl { get; set; }
|
public int? IdSpvdkl { get; set; }
|
||||||
|
|
||||||
public int? IdSpvdsbmk { get; set; }
|
public int? IdSpvdsbmk { get; set; }
|
||||||
|
|||||||
@@ -30,7 +30,8 @@
|
|||||||
Text="{Binding SearchText, UpdateSourceTrigger=PropertyChanged}" />
|
Text="{Binding SearchText, UpdateSourceTrigger=PropertyChanged}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<DataGrid Grid.Row="2"
|
<DataGrid x:Name="InstrumentsGrid"
|
||||||
|
Grid.Row="2"
|
||||||
ItemsSource="{Binding InstrumentsView}"
|
ItemsSource="{Binding InstrumentsView}"
|
||||||
AutoGenerateColumns="False"
|
AutoGenerateColumns="False"
|
||||||
CanUserAddRows="False"
|
CanUserAddRows="False"
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
|
||||||
namespace XLAB2
|
namespace XLAB2
|
||||||
{
|
{
|
||||||
@@ -13,6 +14,12 @@ namespace XLAB2
|
|||||||
|
|
||||||
private void ViewModelOnCloseRequested(object sender, bool? dialogResult)
|
private void ViewModelOnCloseRequested(object sender, bool? dialogResult)
|
||||||
{
|
{
|
||||||
|
if (dialogResult.GetValueOrDefault())
|
||||||
|
{
|
||||||
|
InstrumentsGrid.CommitEdit(DataGridEditingUnit.Cell, true);
|
||||||
|
InstrumentsGrid.CommitEdit(DataGridEditingUnit.Row, true);
|
||||||
|
}
|
||||||
|
|
||||||
DialogResult = dialogResult;
|
DialogResult = dialogResult;
|
||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,9 +5,18 @@
|
|||||||
<TargetFramework>net10.0-windows</TargetFramework>
|
<TargetFramework>net10.0-windows</TargetFramework>
|
||||||
<Nullable>disable</Nullable>
|
<Nullable>disable</Nullable>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<ApplicationIcon>Assets\XlabApp.ico</ApplicationIcon>
|
||||||
<UseWPF>true</UseWPF>
|
<UseWPF>true</UseWPF>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Assets\XlabApp.ico" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Remove="obj-temp-*\**\*.cs;bin-temp-*\**\*.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.Data.SqlClient" Version="6.1.1" />
|
<PackageReference Include="Microsoft.Data.SqlClient" Version="6.1.1" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="10.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration" Version="10.0.0" />
|
||||||
|
|||||||
BIN
XLAB2/bin-temp-verify-app-icon/Azure.Core.dll
Normal file
BIN
XLAB2/bin-temp-verify-app-icon/Azure.Core.dll
Normal file
Binary file not shown.
BIN
XLAB2/bin-temp-verify-app-icon/Azure.Identity.dll
Normal file
BIN
XLAB2/bin-temp-verify-app-icon/Azure.Identity.dll
Normal file
Binary file not shown.
BIN
XLAB2/bin-temp-verify-app-icon/ClosePsv.docx
Normal file
BIN
XLAB2/bin-temp-verify-app-icon/ClosePsv.docx
Normal file
Binary file not shown.
BIN
XLAB2/bin-temp-verify-app-icon/Izv.docx
Normal file
BIN
XLAB2/bin-temp-verify-app-icon/Izv.docx
Normal file
Binary file not shown.
BIN
XLAB2/bin-temp-verify-app-icon/Microsoft.Bcl.AsyncInterfaces.dll
Normal file
BIN
XLAB2/bin-temp-verify-app-icon/Microsoft.Bcl.AsyncInterfaces.dll
Normal file
Binary file not shown.
BIN
XLAB2/bin-temp-verify-app-icon/Microsoft.Bcl.Cryptography.dll
Normal file
BIN
XLAB2/bin-temp-verify-app-icon/Microsoft.Bcl.Cryptography.dll
Normal file
Binary file not shown.
BIN
XLAB2/bin-temp-verify-app-icon/Microsoft.Data.SqlClient.dll
Normal file
BIN
XLAB2/bin-temp-verify-app-icon/Microsoft.Data.SqlClient.dll
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
XLAB2/bin-temp-verify-app-icon/Microsoft.Extensions.Hosting.dll
Normal file
BIN
XLAB2/bin-temp-verify-app-icon/Microsoft.Extensions.Hosting.dll
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
XLAB2/bin-temp-verify-app-icon/Microsoft.Extensions.Logging.dll
Normal file
BIN
XLAB2/bin-temp-verify-app-icon/Microsoft.Extensions.Logging.dll
Normal file
Binary file not shown.
Binary file not shown.
BIN
XLAB2/bin-temp-verify-app-icon/Microsoft.Extensions.Options.dll
Normal file
BIN
XLAB2/bin-temp-verify-app-icon/Microsoft.Extensions.Options.dll
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
XLAB2/bin-temp-verify-app-icon/Microsoft.Identity.Client.dll
Normal file
BIN
XLAB2/bin-temp-verify-app-icon/Microsoft.Identity.Client.dll
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
XLAB2/bin-temp-verify-app-icon/Microsoft.SqlServer.Server.dll
Normal file
BIN
XLAB2/bin-temp-verify-app-icon/Microsoft.SqlServer.Server.dll
Normal file
Binary file not shown.
BIN
XLAB2/bin-temp-verify-app-icon/OpenPsv.docx
Normal file
BIN
XLAB2/bin-temp-verify-app-icon/OpenPsv.docx
Normal file
Binary file not shown.
BIN
XLAB2/bin-temp-verify-app-icon/Svid.docx
Normal file
BIN
XLAB2/bin-temp-verify-app-icon/Svid.docx
Normal file
Binary file not shown.
BIN
XLAB2/bin-temp-verify-app-icon/System.ClientModel.dll
Normal file
BIN
XLAB2/bin-temp-verify-app-icon/System.ClientModel.dll
Normal file
Binary file not shown.
Binary file not shown.
BIN
XLAB2/bin-temp-verify-app-icon/System.Memory.Data.dll
Normal file
BIN
XLAB2/bin-temp-verify-app-icon/System.Memory.Data.dll
Normal file
Binary file not shown.
1007
XLAB2/bin-temp-verify-app-icon/XLAB2.deps.json
Normal file
1007
XLAB2/bin-temp-verify-app-icon/XLAB2.deps.json
Normal file
File diff suppressed because it is too large
Load Diff
BIN
XLAB2/bin-temp-verify-app-icon/XLAB2.dll
Normal file
BIN
XLAB2/bin-temp-verify-app-icon/XLAB2.dll
Normal file
Binary file not shown.
BIN
XLAB2/bin-temp-verify-app-icon/XLAB2.exe
Normal file
BIN
XLAB2/bin-temp-verify-app-icon/XLAB2.exe
Normal file
Binary file not shown.
19
XLAB2/bin-temp-verify-app-icon/XLAB2.runtimeconfig.json
Normal file
19
XLAB2/bin-temp-verify-app-icon/XLAB2.runtimeconfig.json
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"runtimeOptions": {
|
||||||
|
"tfm": "net10.0",
|
||||||
|
"frameworks": [
|
||||||
|
{
|
||||||
|
"name": "Microsoft.NETCore.App",
|
||||||
|
"version": "10.0.0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Microsoft.WindowsDesktop.App",
|
||||||
|
"version": "10.0.0"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"configProperties": {
|
||||||
|
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false,
|
||||||
|
"CSWINRT_USE_WINDOWS_UI_XAML_PROJECTIONS": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
18
XLAB2/bin-temp-verify-app-icon/appsettings.json
Normal file
18
XLAB2/bin-temp-verify-app-icon/appsettings.json
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"Database": {
|
||||||
|
"ApplicationName": "XLAB2",
|
||||||
|
"CommandTimeoutSeconds": 60,
|
||||||
|
"ConnectRetryCount": 3,
|
||||||
|
"ConnectRetryIntervalSeconds": 10,
|
||||||
|
"ConnectTimeoutSeconds": 15,
|
||||||
|
"Database": "ASUMS",
|
||||||
|
"Encrypt": false,
|
||||||
|
"IntegratedSecurity": true,
|
||||||
|
"MultipleActiveResultSets": true,
|
||||||
|
"Pooling": true,
|
||||||
|
"MaxPoolSize": 100,
|
||||||
|
"MinPoolSize": 0,
|
||||||
|
"Server": "SEVENHILL\\SQLEXPRESS",
|
||||||
|
"TrustServerCertificate": true
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
XLAB2/build-psv-save-fix.txt
Normal file
BIN
XLAB2/build-psv-save-fix.txt
Normal file
Binary file not shown.
Reference in New Issue
Block a user