public int Add(ActivityHistory aHisObj, bool doSubmit = true)
        {
            aHisObj.ActivityID = (int)Act;
            //Set lastmodified fields
            aHisObj.UserID = Usr.ID;
            aHisObj.UserText = Usr.Name;
            aHisObj.ActDateTime = DateTime.Now;

            dbc.ActivityHistories.InsertOnSubmit(aHisObj);
            if(doSubmit)   dbc.SubmitChanges();

            return aHisObj.ID; // Return the 'newly inserted id'
        }
        public bool Delete(ActivityHistory aHisObj)
        {
            dbc.Users.DeleteOnSubmit(dbc.Users.Single(c => c.ID == aHisObj.ID));
            dbc.SubmitChanges();

            return true;
        }
Exemple #3
0
 partial void DeleteActivityHistory(ActivityHistory instance);
Exemple #4
0
 partial void UpdateActivityHistory(ActivityHistory instance);
Exemple #5
0
 partial void InsertActivityHistory(ActivityHistory instance);
Exemple #6
0
		private void detach_ActivityHistories(ActivityHistory entity)
		{
			this.SendPropertyChanging();
			entity.Users = null;
		}
Exemple #7
0
		private void attach_ActivityHistories(ActivityHistory entity)
		{
			this.SendPropertyChanging();
			entity.MasterActivity = this;
		}