Singleton class to handle login information and state for the application.
예제 #1
0
        public static SessionModel GetInstance()
        {
            if (_instance == null)
                _instance = new SessionModel();

            return _instance;
        }
        public EventModel()
        {
            this._dbObj = new DBLayer.Event();

            this.Id          = -1;
            this.Name        = "";
            this.Description = "";
            this.Capacity    = 50;

            this.DBObj.Start       = DateTime.Now;
            this.DBObj.End         = DateTime.Now;
            this.DBObj.TimeCreated = DateTime.Now;

            if (SessionModel.GetInstance().LoggedIn)
            {
                this.StudentMatricID = SessionModel.GetInstance().LoggedInUser.MatricId;
            }

            this.DBObj.Budget = new DBLayer.Budget();
            this._budget      = new BudgetModel(this.DBObj.Budget);
        }
예제 #3
0
 public void Clear()
 {
     _instance = new SessionModel();
 }
 public void Clear()
 {
     _instance = new SessionModel();
 }