//Register User Login Device public JsonResult RegisterLoginDevice(UserLoginActivity register) { try { if (register != null) { var deviceLog = new UserLoginActivity { UserId = User.GetUserId(), Browser = register.Browser, DeviceOs = register.DeviceOs, Ipaddress = register.Ipaddress, City = register.City, Country = register.Country, UniqueId = register.UniqueId, Status = false, LoginDate = _now }; _db.UserLoginActivity.Add(deviceLog); _db.SaveChanges(); return(Json(true)); } } catch (Exception e) { return(Json(false)); } return(Json(false)); }
public bool UpdateUserLoginActivity(UserLoginActivity loginActivity) { try { var processedUserLoginActivity = _repository.Update(loginActivity); _uoWork.SaveChanges(); return(processedUserLoginActivity.UserLoginActivityId > 0); } catch (Exception ex) { BugManager.LogApplicationBug(ex.StackTrace, ex.Source, ex.Message); return(false); } }