public void SaveLoginHistory(List<LoginHistory> data) { try { objDal = new WarringtonDal(); objDal.SaveLoginHistory(data); } catch (Exception ex) { throw ex; } finally { objDal = null; } }
public bool SaveUserMaster(List<UserMaster> userData) { long userId = 0; try { objDal = new WarringtonDal(); userId = objDal.SaveUserMaster(userData); if (userId > 0) { List<LoginHistory> lstLoginHistory = new List<LoginHistory>(); lstLoginHistory.Add(new LoginHistory() { UserId = userId, ClientIp = Utility.GetLanIPAddress(), Activity = "User Registration Process done", EntryDate = DateTime.UtcNow }); return objDal.SaveLoginHistory(lstLoginHistory) > 0; } } catch (Exception ex) { throw ex; } finally { objDal = null; } return false; }
public bool UserIsAuthenticated(string userName, string password, out string phoneNo) { phoneNo = string.Empty; long userId = 0; bool isSaved = false; try { objDal = new WarringtonDal(); isSaved = objDal.UserIsAuthenticated(userName, password,out userId); if (isSaved) { List<LoginHistory> lstLoginHistory = new List<LoginHistory>(); lstLoginHistory.Add(new LoginHistory() { UserId = userId, ClientIp = Utility.GetLanIPAddress(), Activity = "User logged in", EntryDate = DateTime.UtcNow }); phoneNo = userName; return objDal.SaveLoginHistory(lstLoginHistory) > 0; } } catch (Exception ex) { throw ex; } finally { objDal = null; } return false; }
public bool SaveUserRequest(UserRequest requestData, RequestStatus statusData, List<DocRepository> documentData) { long userId = 0; bool isSaved = false; try { objDal = new WarringtonDal(); isSaved = objDal.SaveUserRequest(requestData, statusData, documentData); if (isSaved) { List<LoginHistory> lstLoginHistory = new List<LoginHistory>(); lstLoginHistory.Add(new LoginHistory() { UserId = userId, ClientIp = Utility.GetLanIPAddress(), Activity = "Request submission Process done", EntryDate = DateTime.UtcNow }); return objDal.SaveLoginHistory(lstLoginHistory) > 0; } } catch (Exception ex) { throw ex; } finally { objDal = null; } return false; }