상속: BaseModel, IDataErrorInfo
예제 #1
0
        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);
        }
        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);
        }