예제 #1
0
        public static bool AddPrivateMessage(int fromId, int toId, string subject, string message)
        {
            PrivateMessageInfo pm = new PrivateMessageInfo()
            {
                FromID = fromId,
                ToID = toId,
                Subject = subject,
                TimeSent = DateTime.UtcNow,
                Message = message,
                TimeRead = DateTime.FromOADate(0)
            };

            DatabaseDataContext db = new DatabaseDataContext(ConnectionString);

            db.PrivateMessageInfos.InsertOnSubmit(pm);
            db.SubmitChanges();

            return db.PrivateMessageInfos.Contains(pm);
        }
예제 #2
0
        public static bool AddPrivateMessage(int fromId, int toId, string subject, string message)
        {
            PrivateMessageInfo pm = new PrivateMessageInfo()
            {
                FromID   = fromId,
                ToID     = toId,
                Subject  = subject,
                TimeSent = DateTime.UtcNow,
                Message  = message,
                TimeRead = DateTime.FromOADate(0)
            };

            DatabaseDataContext db = new DatabaseDataContext(ConnectionString);

            db.PrivateMessageInfos.InsertOnSubmit(pm);
            db.SubmitChanges();

            return(db.PrivateMessageInfos.Contains(pm));
        }
예제 #3
0
 partial void DeletePrivateMessageInfo(PrivateMessageInfo instance);
예제 #4
0
 partial void UpdatePrivateMessageInfo(PrivateMessageInfo instance);
예제 #5
0
 partial void InsertPrivateMessageInfo(PrivateMessageInfo instance);
예제 #6
0
 partial void DeletePrivateMessageInfo(PrivateMessageInfo instance);
예제 #7
0
 partial void UpdatePrivateMessageInfo(PrivateMessageInfo instance);
예제 #8
0
 partial void InsertPrivateMessageInfo(PrivateMessageInfo instance);