Merge branch 'master' of https://github.com/samsyntax24/OriginalGozareshgir
This commit is contained in:
@@ -94,7 +94,14 @@ public class PersonnelCodeRepository : RepositoryBase<long, PersonnelCodeDomain>
|
||||
#region Mahan
|
||||
public long GetLastPersonnelCodeByWorkshop(long workshopId)
|
||||
{
|
||||
return _context.PersonnelCodeSet.Where(x => x.WorkshopId == workshopId).Max(x => x.PersonnelCode);
|
||||
var codes = _context.PersonnelCodeSet.Where(x => x.WorkshopId == workshopId);
|
||||
|
||||
if (!codes.Any())
|
||||
{
|
||||
return 0; // مقدار پیشفرض یا هندل خاص تو این حالت
|
||||
}
|
||||
|
||||
return codes.Max(x => x.PersonnelCode);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -251,7 +251,7 @@ namespace ServiceHost.Areas.Client.Pages.Company.SalaryAid
|
||||
data = result
|
||||
});
|
||||
}
|
||||
public IActionResult OnGetCheckoutExists(string calculationDate, string employeeIds)
|
||||
public IActionResult OnPostCheckoutExists(string calculationDate, string employeeIds)
|
||||
{
|
||||
var extractNumbers = employeeIds.ExtractNumbers();
|
||||
var calculationDateGr = calculationDate.ToGeorgianDateTime();
|
||||
|
||||
@@ -333,7 +333,7 @@ function CheckExistAjax() {
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
type: 'POST',
|
||||
url: checkoutExistsAjaxUrl,
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
traditional: true,
|
||||
|
||||
@@ -263,7 +263,7 @@ function CheckExistAjax() {
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
type: 'POST',
|
||||
url: checkoutExistsAjaxUrl,
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
traditional: true,
|
||||
|
||||
@@ -753,7 +753,7 @@ function CheckExistAjax() {
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
type: 'POST',
|
||||
url: checkoutExistsAjaxUrl,
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
traditional: true,
|
||||
|
||||
Reference in New Issue
Block a user