WebConfig Added - Financia;Statmet create bug Fixed
This commit is contained in:
@@ -18,7 +18,7 @@ public class FinancialTransactionApplication : IFinancialTransactionApplication
|
||||
{
|
||||
var op = new OperationResult();
|
||||
var now = DateTime.Now;
|
||||
var check = _financialTransactionRepository.Exists(x => x.CreationDate.Date == now.Date && x.CreationDate.Hour == now.Hour && x.CreationDate.Minute == now.Minute &&
|
||||
var check = _financialTransactionRepository.Exists(x => x.CreationDate.Date == now.Date && x.CreationDate.Hour == now.Hour && x.CreationDate.Minute == now.Minute && x.CreationDate.Second == now.Second &&
|
||||
x.FinancialStatementId == command.FinancialStatementId
|
||||
&& x.Creditor == command.Creditor &&
|
||||
x.Deptor == command.Deptor &&
|
||||
@@ -32,9 +32,14 @@ public class FinancialTransactionApplication : IFinancialTransactionApplication
|
||||
command.TypeOfTransaction, command.DescriptionOption, command.Deptor, command.Creditor, 0);
|
||||
_financialTransactionRepository.Create(transaction);
|
||||
_financialTransactionRepository.SaveChanges();
|
||||
return op.Succcedded();
|
||||
}
|
||||
else
|
||||
{
|
||||
return op.Failed("تکراری است");
|
||||
}
|
||||
|
||||
return op.Succcedded();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -656,6 +656,7 @@ CreateWorkingHoursTemp command, bool holidayWorking)
|
||||
validCount = (int)((totalDays * 8) / 28);
|
||||
}
|
||||
|
||||
Console.WriteLine(validCount);
|
||||
if (moriningCount >= validCount)
|
||||
RotatingfaName.Add("صبح");
|
||||
if (eveningCount >= validCount)
|
||||
|
||||
@@ -280,6 +280,7 @@
|
||||
<script src="~/AdminTheme/assets/js/site.js"></script>
|
||||
<script src="~/AdminTheme/js/numeral.min.js"></script>
|
||||
<script>
|
||||
var antiForgeryToken = $(`@Html.AntiForgeryToken()`).val();
|
||||
var ajaxCurrentDay ='@Url.Page("./FinancialStatments", "DateOfToday")';
|
||||
var ajaxPagination ='@Url.Page("./FinancialStatments", "Pagination")';
|
||||
var ajaxRemoveTransaction = '@Url.Page("./FinancialStatments", "RemoveTransaction")';
|
||||
|
||||
19
ServiceHost/web.config
Normal file
19
ServiceHost/web.config
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<location path="." inheritInChildApplications="false">
|
||||
<system.webServer>
|
||||
<handlers>
|
||||
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
|
||||
</handlers>
|
||||
|
||||
<aspNetCore processPath="dotnet" arguments=".\ServiceHost.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" />
|
||||
<security>
|
||||
<requestFiltering>
|
||||
<requestLimits maxAllowedContentLength="200000000" />
|
||||
</requestFiltering>
|
||||
</security>
|
||||
</system.webServer>
|
||||
</location>
|
||||
</configuration>
|
||||
<!--ProjectGuid: 35b6b963-974a-4414-8609-b0668181fa64-->
|
||||
|
||||
@@ -260,13 +260,14 @@ function removeTransaction(Id) {
|
||||
},
|
||||
function (isConfirm) {
|
||||
if (isConfirm) {
|
||||
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
url: ajaxRemoveTransaction,
|
||||
data: { "id": Id },
|
||||
headers: { "RequestVerificationToken": $('input[name="__RequestVerificationToken"]').val() },
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
success: function (response) {
|
||||
if (response.success) {
|
||||
window.location.reload();
|
||||
@@ -327,17 +328,20 @@ function checkNecessaryInputs() {
|
||||
command.Creditor = 0;
|
||||
command.CreditorString = $(".creditor").val();
|
||||
command.DescriptionOption = selectedOption2;
|
||||
console.log(command);
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
url: ajaxCreate,
|
||||
data: command,
|
||||
headers: { "RequestVerificationToken": $('input[name="__RequestVerificationToken"]').val() },
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
success: function (response) {
|
||||
if (response.success) {
|
||||
console.log("success");
|
||||
window.location.reload();
|
||||
} else {
|
||||
$.Notification.autoHideNotify('error', 'top right', 'پیام سیستم ', "رکورد تکراری است");
|
||||
}
|
||||
},
|
||||
failure: function (response) {
|
||||
@@ -478,7 +482,7 @@ function removeBlocked(trId) {
|
||||
type: 'GET',
|
||||
url: ajaxRemoveBlocked,
|
||||
data: { "id": Number(trId) },
|
||||
headers: { "RequestVerificationToken": $('input[name="__RequestVerificationToken"]').val() },
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
success: function (response) {
|
||||
if (response.isSuccedded) {
|
||||
$(`#${trId}`).removeClass("blocked");
|
||||
|
||||
Reference in New Issue
Block a user