Exemplo n.º 1
0
        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'
        }
Exemplo n.º 2
0
        public bool Delete(ActivityHistory aHisObj)
        {
            dbc.Users.DeleteOnSubmit(dbc.Users.Single(c => c.ID == aHisObj.ID));
            dbc.SubmitChanges();

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