From aa7c41169f1b0076f3674b1fd4e39c56da49e91b Mon Sep 17 00:00:00 2001 From: jojo aquino Date: Mon, 16 Dec 2024 17:29:57 +0000 Subject: [PATCH] fix register datetime kind --- EnotaryoPH/EnotaryoPH.Web/Pages/Register.cshtml.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/EnotaryoPH/EnotaryoPH.Web/Pages/Register.cshtml.cs b/EnotaryoPH/EnotaryoPH.Web/Pages/Register.cshtml.cs index 5f37033..71ae9b2 100644 --- a/EnotaryoPH/EnotaryoPH.Web/Pages/Register.cshtml.cs +++ b/EnotaryoPH/EnotaryoPH.Web/Pages/Register.cshtml.cs @@ -1,7 +1,6 @@ using System.ComponentModel.DataAnnotations; using EnotaryoPH.Data; using EnotaryoPH.Data.Entities; -using EnotaryoPH.Web.Common.Services; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; using Microsoft.EntityFrameworkCore; @@ -61,13 +60,15 @@ namespace EnotaryoPH.Web.Pages CommissionNumber = CommissionNumber, IBPNumber = IBPNumber, MCLEComplianceNumber = MCLEComplianceNumber, - MCLEDate = new DateTime(MCLEDate.Value.Ticks, DateTimeKind.Utc), + MCLEDate = MCLEDate.ToUTC(), OfficeAddress = OfficeAddress, - PTRDate = new DateTime(PTRDate.Value.Ticks, DateTimeKind.Utc), + PTRDate = PTRDate.ToUTC(), PTRlocation = PTRLocation, PTRNumber = PTRNumber, Rollnumber = RollNumber, - Status = "New" + Status = "New", + CreatedOn = DateTime.UtcNow, + Lawyer_UID = Guid.NewGuid() }; _notaryoDBContext.Lawyers.Add(newLawyer); }