コード例 #1
0
 public MessageRemindingModel Update(MessageRemindingModel messageReminding)
 {
     messageReminding.LastModifyTime     = DateTime.Now;
     messageReminding.LastModifyUserName = UserInfo.UserName;
     m_db.Update(m_defaultTableName, m_defaultPrimaryKey, messageReminding.GetTableObject());
     return(messageReminding);
 }
コード例 #2
0
 public int Remove(MessageRemindingModel messageReminding)
 {
     messageReminding.RecordStatus       = RecordStatus.Deleted;
     messageReminding.LastModifyTime     = DateTime.Now;
     messageReminding.LastModifyUserName = UserInfo.UserName;
     return(m_db.Update(m_defaultTableName, m_defaultPrimaryKey, messageReminding.GetTableObject()));
 }
コード例 #3
0
        public MessageRemindingModel New(string uid, string userid,
                                         string remark, DateTime remindTime, MessageUidType msgType)
        {
            var now = DateTime.Now;

            var messageReminding = new MessageRemindingModel();

            messageReminding.Guid = Guid.NewGuid().ToString();

            messageReminding.Uid                = uid;
            messageReminding.UserName           = userid;
            messageReminding.Type               = msgType;
            messageReminding.Remark             = remark;
            messageReminding.RemindTime         = remindTime;
            messageReminding.MessageStatus      = MessageStatusEnum.UnSend;
            messageReminding.CreateTime         = now;
            messageReminding.CreateUserName     = UserInfo.UserName;
            messageReminding.LastModifyTime     = now;
            messageReminding.LastModifyUserName = UserInfo.UserName;
            messageReminding.RecordStatus       = RecordStatus.Valid;
            messageReminding.Id = Insert(messageReminding.GetTableObject());

            return(messageReminding);
        }