public WorkerLoginResult Login(string stationName, string loginName, string password, WorkerFunction workerFunction, string connectionString) { LoadFromDbByLoginName(loginName); WorkerAuthenticator wa = new WorkerAuthenticator(AuthenticationMode.UserPassword, connectionString); WorkerLoginResult ret = wa.Login(loginName, password, string.Empty, stationName, workerFunction); if (ret == WorkerLoginResult.Ok) { UpdateLoginDateOnStation(Id, stationName, DateTime.Now); } return(ret); }
public WorkerLoginResult Login(string stationName, string badgeCode, WorkerFunction workerFunction, string connectionString) { LoadFromDbByBadgeCode(badgeCode); WorkerAuthenticator wa = new WorkerAuthenticator(AuthenticationMode.BadgeCode, connectionString); WorkerLoginResult ret = wa.Login(string.Empty, string.Empty, badgeCode, stationName, workerFunction); if (ret == WorkerLoginResult.Ok) { LoadFromDbByBadgeCode(badgeCode); UpdateLoginDateOnStation(Id, stationName, DateTime.Now); } return(ret); }