コード例 #1
0
ファイル: SessionHelper.cs プロジェクト: eagledu/wedding
 public static SessionObject GetTestSession()
 {
     string email, pwd;
     email = "*****@*****.**";
     pwd = "111111";
     SessionObject currentSession = new SessionObject();
     currentSession.Profile = new WeddingLibrary.Profiles.LoginProfile();
     currentSession.Profile.LoginUser = WeddingLibrary.Profiles.Imp.Login.GetLogin(email,pwd);
     DO_BigDateJoin.UOList_BigDateJoin bigDates = WeddingLibrary.Database.Imp.BigDate.GetListByEmail(email);
     if (bigDates.Count > 0)
     {
         WeddingLibrary.Profiles.Entities.UO_BigDate bigDate = new WeddingLibrary.Profiles.Entities.UO_BigDate();
         DataMapping.ObjectHelper.CopyAttributes<DO_BigDateJoin.UO_BigDateJoin, WeddingLibrary.Profiles.Entities.UO_BigDate>(bigDates[0], bigDate);
         currentSession.Profile.BigDate = bigDate;
     }
     return currentSession;
 }
コード例 #2
0
ファイル: SessionHelper.cs プロジェクト: eagledu/wedding
 public static void SetSession(SessionObject sess)
 {
     if (System.Web.HttpContext.Current != null)
         System.Web.HttpContext.Current.Session[Definition.Session.SESSION_KEY] = sess;
 }