public ActionResult Index(int dwccardnum, DateTime dateforsignin, string userName) { var wsi = _serv.CreateSignin(dwccardnum, dateforsignin, this.User.Identity.Name); var result = map.Map <WorkerSignin, ViewModel.WorkerSignin>(wsi); return(Json(result, JsonRequestBehavior.AllowGet)); }
public FluentRecordBase AddWorkerSignin( Worker worker = null //DateTime? datecreated = null, //DateTime? dateupdated = null ) { // // DEPENDENCIES _servWSI = container.Resolve <IWorkerSigninService>(); if (worker != null) { _w = worker; } if (_w == null) { AddWorker(); } // // ARRANGE // // ACT _wsi = _servWSI.CreateSignin(_w.dwccardnum, DateTime.Now, _user); return(this); }
public ActionResult Index(int dwccardnum, DateTime dateforsignin, string userName) { var userIdentity = new ClaimsIdentity("Cookies"); var wsi = serv.CreateSignin(dwccardnum, dateforsignin, userIdentity.Name); var result = map.Map <WorkerSignin, ViewModel.WorkerSignin>(wsi); return(Json(result)); }
public FluentRecordBase AddWorkerSignin(Worker worker = null) { // ARRANGE _servWSI = container.GetRequiredService <IWorkerSigninService>(); var _w = worker ?? AddWorker(); // // ACT _wsi = _servWSI.CreateSignin(_w.dwccardnum, DateTime.Now, _user); return(this); }
public ActionResult Index(int dwccardnum, DateTime dateforsignin, string userName) { try { var dateforsigninUTC = TimeZoneInfo.ConvertTimeToUtc(dateforsignin, _clientTimeZoneInfo); var wsi = _serv.CreateSignin(dwccardnum, dateforsigninUTC, userName); var result = _map.Map <Domain.WorkerSignin, ViewModel.WorkerSignin>(wsi); return(Json(result)); } catch (NullReferenceException) { return(Json(new { jobSuccess = false })); } }
public FluentRecordBase AddWorkerSignin(Worker worker = null) { // ARRANGE _servWSI = container.GetRequiredService <IWorkerSigninService>(); var _w = worker ?? AddWorker(); // // ACT (convert to UTC, as the client would) _wsi = _servWSI.CreateSignin( _w.dwccardnum, TimeZoneInfo .ConvertTimeToUtc(DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Unspecified), ClientTimeZoneInfo), _user ); return(this); }