private void InitMembers() { mCurrentUser = (UserBase)Session["CurrentUser"]; if (mCurrentUser != null) { if (mCurrentUser.IsNull) { mCurrentUser = null; } } if (mEventBaseBO == null) { mEventBaseBO = new EventBaseBO(); } if (mUserBaseBO == null) { mUserBaseBO = new UserBaseBO(); } if (mEventsInvitationsBO == null) { mEventsInvitationsBO = new EventsInvitationsBO(); } if (mHoldingsInfoBO == null) { mHoldingsInfoBO = new HoldingsInfoBO(); } mIsInit = true; }
public EventBriefWebService() { mEventBaseBO = new EventBaseBO(); mUserBaseBO = new UserBaseBO(); mItemBaseBO = new ItemBaseBO(); mHoldingsInfoBO = new HoldingsInfoBO(); mEventsInvitationsBO = new EventsInvitationsBO(); }
public EventDetailsWebService() { mEventBaseBO = new EventBaseBO(); mUserBaseBO = new UserBaseBO(); mResourceDescriptionBO = new ResourceDescriptionBO(); mEventTimeInfoBO = new EventTimeInfoBO(); mObjectLocationBO = new ObjectLocationBO(); mUserNameImageListBO = new UserNameImageListBO(); mItemBaseBO = new ItemBaseBO(); mHoldingsInfoBO = new HoldingsInfoBO(); mEventsInvitationsBO = new EventsInvitationsBO(); mUsersConnectionBO = new UsersConnectionBO(); Session["HoldingsInfoBO"] = mHoldingsInfoBO; //Uncomment the following line if using designed components //InitializeComponent(); }
public string UpdateUser(string email, string password, string firstName, string lastName, string gender, string country) { mCurrentUser = (UserBase)Session["CurrentUser"]; if (mCurrentUser == null) { return("Please Reload Page"); } UserBaseBO userBaseBO = new UserBaseBO(); ECountry eCountry = (ECountry)Int32.Parse(country.Substring(("ECountry_").Length)); EGender eGender = (EGender)Int32.Parse(gender.Substring(("EGender_").Length)); mCurrentUser.Email = email; mCurrentUser.FirstName = firstName; mCurrentUser.LastName = lastName; mCurrentUser.Gender = eGender; if (!mCurrentUser.Location.IsLoaded()) { ObjectLocationBO objectLocationBO = new ObjectLocationBO(); objectLocationBO.Load(mCurrentUser.Location); } mCurrentUser.Location.Country = eCountry; userBaseBO.Save(mCurrentUser); LoginManagerBO loginManagerBO = new LoginManagerBO(); if (password.Length < 6) { loginManagerBO.UpdateUserLoginInfo(mCurrentUser.UniqueID, email); } else { loginManagerBO.UpdateUserLoginInfo(mCurrentUser.UniqueID, email, password); } Session["CurrentUser"] = mCurrentUser; return("Success"); }
protected void Page_Load(object sender, EventArgs e) { mLoginManagerBO = new LoginManagerBO(); mEventBaseBO = new EventBaseBO(); mUserBaseBO = new UserBaseBO(); mItemBaseBO = new ItemBaseBO(); mUserNameImageListBO = new UserNameImageListBO(); Session["NewItemsListLoaded"] = false; mCurrentUser = (UserBase)Session["CurrentUser"]; if (mCurrentUser == null) { Signout(); } else if (!mCurrentUser.IsNull) { mCurrentEvent = (EventBase)Session["CurrentEvent"]; if (mCurrentEvent == null) { GoToBrief(); } if (mCurrentEvent.IsNull) { GoToBrief(); } if (mCurrentUser.UniqueID != mCurrentEvent.Admin.UniqueID) { Response.Redirect("EventView.aspx"); } lblName.Text = "Hello " + mCurrentUser.FirstName + " " + mCurrentUser.LastName; PopulatePage(); } else { Signout(); } }
protected void Page_Load(object sender, EventArgs e) { mLoginManagerBO = new LoginManagerBO(); mEventBaseBO = new EventBaseBO(); mUserBaseBO = new UserBaseBO(); mItemBaseBO = new ItemBaseBO(); mUserNameImageListBO = new UserNameImageListBO(); mCurrentUser = (UserBase)Session["CurrentUser"]; if (mCurrentUser == null) { Signout(); } else if (!mCurrentUser.IsNull) { lblName.Text = "Hello " + mCurrentUser.FirstName + " " + mCurrentUser.LastName; mCurrentEvent = (EventBase)Session["CurrentEvent"]; if (mCurrentEvent == null) { GoToBrief(); } if (mCurrentEvent.IsNull) { GoToBrief(); } PopulatePage(); } else { Signout(); } }
protected void Page_Load(object sender, EventArgs e) { mLoginManagerBO = new LoginManagerBO(); mEventBaseBO = new EventBaseBO(); mUserBaseBO = new UserBaseBO(); mCurrentUser = (UserBase)Session["CurrentUser"]; Session["CurrentEvent"] = null; if (mCurrentUser == null) { Signout(); } else if (!mCurrentUser.IsNull) { lblName.Text = "Hello " + mCurrentUser.FirstName + " " + mCurrentUser.LastName; PopulatePage(IsPostBack); } else { Signout(); } }
public UserBaseViewModel(UserBaseBO UserBO) { _UserBaseBO = UserBO; }