protected bool Login() { bool loggedin = false; try { _userAccount = new WebAccount(); loggedin = _userAccount.Login(txtUser.Text, txtPwd.Text); if (loggedin && !string.IsNullOrEmpty(_userAccount.Website)) { try { string localPath = Server.MapPath(_userAccount.Website); if (System.IO.File.Exists(localPath)) { _redirectURL = _userAccount.Website; } else { _redirectURL = (_userAccount.IsAdmin) ? DEFAULT_ADMIN_PAGE : DEFAULT_MEMBER_PAGE; } } catch { _redirectURL = (_userAccount.IsAdmin) ? DEFAULT_ADMIN_PAGE : DEFAULT_MEMBER_PAGE; } } } catch (Exception ex) { _ErrorMessage = ex.Message; } return loggedin; }
internal void CopyRowDataToObject(Shiloh.memberRow Row) { if (Row != null) { _Id = Row.ID; _Sex = Row.sex[0]; _WebAccount = null; _WebAccountId = (!Row.IswebAccountIdNull()) ? Row.webAccountId : -1; LastName = Row.lastName; FirstName = Row.firstName; IsActive = Row.isActive; Status = Row.statusId; AnniversaryDate = Row.anniverisaryDate; BirthDate = Row.birthDate; _DateCreated = Row.dateCreated; Occupation = Row.occupation; _Address = null; _AddressId = (!Row.IsaddressIdNull()) ? Row.addressId : -1; _EmergencyAddress = null; _EmergencyAddressId = (!Row.IsemergencyAddressIdNull()) ? Row.emergencyAddressId : -1; PhoneMobile = Row.phoneMobile; PhoneWork = Row.phoneWork; Email = Row.email; EmailWork = Row.emailWork; Notes = Row.notes; } }
protected void InitObject() { _Id = 0; _Sex = ' '; _WebAccount = null; _WebAccountId = 0; LastName = string.Empty; FirstName = string.Empty; IsActive = false; Status = 0; AnniversaryDate = DateTime.MinValue; BirthDate = DateTime.MinValue; _DateCreated = DateTime.MinValue; Occupation = string.Empty; _Address = null; _AddressId = -1; _EmergencyAddress = null; _EmergencyAddressId = -1; PhoneMobile = string.Empty; PhoneWork = string.Empty; Email = string.Empty; EmailWork = string.Empty; Notes = string.Empty; }