Beispiel #1
0
 //NOTE: GJ: Adding custom UserAction constructors was causing funny SubSonic behaviour.
 public static UserAction Create(int hostID, int userID, ActionType userActionType)
 {
     UserAction userAction = new UserAction();
     userAction.HostID = hostID;
     userAction.UserID = userID;
     userAction.UserActionTypeID = (int)userActionType;
     return userAction;
 }
Beispiel #2
0
 public static UserAction RecordStoryPromotion(int hostID, Story story)
 {
     UserAction userAction = new UserAction();
     userAction.HostID = hostID;
     userAction.StoryID = story.StoryID;
     userAction.UserActionTypeID = (int)ActionType.StoryPromotion;
     userAction.Message = String.Format("{0} was published to homepage", GetStoryLink(story));
     userAction.Save();
     return userAction;
 }
 public bool Destroy(object UserActionID)
 {
     return(UserAction.Destroy(UserActionID) == 1);
 }
        public void Insert(int? UserID,int HostID,int UserActionTypeID,string Message,int? ToUserID,int? StoryID,int? ChatID,DateTime CreatedOn)
        {
            UserAction item = new UserAction();

            item.UserID = UserID;

            item.HostID = HostID;

            item.UserActionTypeID = UserActionTypeID;

            item.Message = Message;

            item.ToUserID = ToUserID;

            item.StoryID = StoryID;

            item.ChatID = ChatID;

            item.CreatedOn = CreatedOn;

            item.Save(UserName);
        }
 public bool Delete(object UserActionID)
 {
     return(UserAction.Delete(UserActionID) == 1);
 }