public DtoEmployee Login(string account, string pwd) { DtoEmployee result = null; var model = BllEmployeeRepository.GetByAccount(account, (int)StatusEnum.效); if (model != null) { if (model.Bem_Password._EqualsByOrdinalIgnoreCase(Encrypt.GetMD5Pwd(pwd))) { result = model; try { string ip = ""; string cityName = ""; ip = clsCommon.GetIP(); if (ip.HasValue()) { cityName = clsCommon.CityName_ByBaidu(ip); } if (ip.HasValue() || cityName.HasValue()) { var old = BllEmployeeRepository.GetEntity(model.Bem_Id); old.Bem_LastLoginArea = cityName; old.Bem_LastLoginIp = ip; old.Bem_LastLoginTime = DateTime.Now; BllEmployeeRepository.Update(old); } } catch (Exception) { } } } return(result); }
public Bas_Employee GetEmployeeEntity(int bem_id) { return(BllEmployeeRepository.GetEntity(bem_id)); }