| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183 |
- using Muchinfo.MTPClient.Data.Enums;
- using Muchinfo.MTPClient.Data.Helper;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Windows;
- using System.Windows.Media;
- //----------------------------------------------------------------
- //Module Name: $safeprojectname$
- //Purpose:
- //CopyRight: Muchinfo
- //History:
- //----------------------------------------------------------------
- //DateTime 2016/6/27 16:42:21
- //Author DK.Huang
- //Description Create
- //----------------------------------------------------------------
- namespace Muchinfo.MTPClient.Data.Model.Message
- {
- /// <summary>
- /// 通知消息
- /// </summary>
- public class NotifyMsg
- {
- private long _MSG_ID;
- /// <summary>
- /// 消息ID NUMBER(20) not null
- /// </summary>
- [PropertyDisc("MSG_ID")]
- public long MSG_ID
- {
- get { return _MSG_ID; }
- set { _MSG_ID = value; }
- }
- private NotifyMsgEnum _NOTIFY_MSG_PARAMETERS;
- /// <summary>
- ///消息参数 VARCHAR2(1000) null,
- /// </summary>
- [PropertyDisc("NOTIFY_MSG_PARAMETERS")]
- public NotifyMsgEnum NOTIFY_MSG_PARAMETERS
- {
- get { return _NOTIFY_MSG_PARAMETERS; }
- set { _NOTIFY_MSG_PARAMETERS = value; }
- }
- private string _CONTENT;
- /// <summary>
- /// 内容VARCHAR2(4000) null,
- /// </summary>
- [PropertyDisc("CONTENT")]
- public string CONTENT
- {
- get { return _CONTENT; }
- set { _CONTENT = value; }
- }
- private int _SEND_STATUS;
- /// <summary>
- /// 发送状态NUMBER(1) null,
- /// </summary>
- [PropertyDisc("SEND_STATUS")]
- public int SEND_STATUS
- {
- get { return _SEND_STATUS; }
- set { _SEND_STATUS = value; }
- }
- private long _FUNC_NO;
- /// <summary>
- /// 功能码 NUMBER(20) null,
- /// </summary>
- [PropertyDisc("FUNC_NO")]
- public long FUNC_NO
- {
- get { return _FUNC_NO; }
- set { _FUNC_NO = value; }
- }
- private long _SUB_FUNC_NO;
- /// <summary>
- /// 子功能码NUMBER(20) null,
- /// </summary>
- [PropertyDisc("SUB_FUNC_NO")]
- public long SUB_FUNC_NO
- {
- get { return _SUB_FUNC_NO; }
- set { _SUB_FUNC_NO = value; }
- }
- private DateTime _RecordTime;
- /// <summary>
- ///记录时间Date null,
- /// </summary>
- [PropertyDisc("RecordTime")]
- public DateTime RecordTime
- {
- get { return _RecordTime; }
- set { _RecordTime = value; }
- }
- private int _notify_action;
- /// <summary>
- /// 消息行为 NUMBER null,
- /// </summary>
- [PropertyDisc("Notify_action")]
- public int Notify_action
- {
- get { return _notify_action; }
- set { _notify_action = value; }
- }
- private int _receiver_type;
- /// <summary>
- /// 接收类型NUMBER null
- /// </summary>
- [PropertyDisc("Receiver_type")]
- public int Receiver_type
- {
- get { return _receiver_type; }
- set { _receiver_type = value; }
- }
- private int _ACCOUNTID;
- /// <summary>
- /// 用户ID
- /// </summary>
- [PropertyDisc("ACCOUNTID")]
- public int ACCOUNTID
- {
- get { return _ACCOUNTID; }
- set { _ACCOUNTID = value; }
- }
- public string NOTIFY_MSG_PARAMETERSDisplay
- {
- get
- {
- return NOTIFY_MSG_PARAMETERS.Discription();
- }
- }
- public Brush STATUSBrush
- {
- get
- {
- if (SEND_STATUS > 0)
- {
- return GetFromeResource<Brush>("List_Item_NotRead");
- }
- else
- {
- return GetFromeResource<Brush>("List_Item_IsRead");
- }
- }
- }
- internal T GetFromeResource<T>(string resourceName) where T : class
- {
- try
- {
- var brush = (T)Application.Current.TryFindResource(resourceName);
- if (brush == null)
- {
- return default(T);
- }
- return brush;
- }
- catch
- {
- return null;
- }
- }
- }
- }
|