set current date when create or update

This commit is contained in:
dibakor 2026-07-08 18:37:40 +06:00
parent a64aa85d33
commit cbd94a76ac
2 changed files with 1 additions and 3 deletions

View File

@ -64,8 +64,6 @@ public class GetAttendanceByEmpRequest
public class UpsertAttendanceByEmpRequest public class UpsertAttendanceByEmpRequest
{ {
[Required]
public DateTime AttendanceDate { get; set; }
[Required, NotNull, StringLength(maximumLength: 10, MinimumLength = 3, ErrorMessage = "EmployeeNumber must be between 3 and 10 characters.")] [Required, NotNull, StringLength(maximumLength: 10, MinimumLength = 3, ErrorMessage = "EmployeeNumber must be between 3 and 10 characters.")]
public string EmployeeNumber { get; set; } public string EmployeeNumber { get; set; }
public DateTime? CheckInTime { get; set; } public DateTime? CheckInTime { get; set; }

View File

@ -539,7 +539,7 @@ public class MobileMasterDataService : IMobileMasterDataService
{ {
SqlParameter[] p = SqlParameter[] p =
[ [
SqlHelperExtension.CreateInParam(pName: "@AttendanceDate", pType: SqlDbType.Date, pValue: request.AttendanceDate), SqlHelperExtension.CreateInParam(pName: "@AttendanceDate", pType: SqlDbType.Date, pValue: DateTime.Now),
SqlHelperExtension.CreateInParam(pName: "@EmployeeNumber", pType: SqlDbType.VarChar, pValue: request.EmployeeNumber), SqlHelperExtension.CreateInParam(pName: "@EmployeeNumber", pType: SqlDbType.VarChar, pValue: request.EmployeeNumber),
SqlHelperExtension.CreateInParam(pName: "@CheckInTime", pType: SqlDbType.DateTime, pValue: request.CheckInTime), SqlHelperExtension.CreateInParam(pName: "@CheckInTime", pType: SqlDbType.DateTime, pValue: request.CheckInTime),
SqlHelperExtension.CreateInParam(pName: "@CheckInLatitude", pType: SqlDbType.VarChar, pValue: request.CheckInLatitude), SqlHelperExtension.CreateInParam(pName: "@CheckInLatitude", pType: SqlDbType.VarChar, pValue: request.CheckInLatitude),