Example #1
0
        private void SendMessage(List <string> userId, string msg)
        {
            XTXX xtxx = new XTXX();

            xtxx.XXBH  = Guid.NewGuid().ToString();
            xtxx.XXBT  = "系统消息";
            xtxx.XXNR  = msg;
            xtxx.FSR   = "0";
            xtxx.FSSJ  = DateTime.Now;
            xtxx.XXLX  = "1";
            xtxx.FSRSC = "1";

            List <XTXXJS> xtxxjss = new List <XTXXJS>();

            foreach (string sjr in userId)
            {
                xtxxjss.Add(new XTXXJS()
                {
                    JSXXBH  = xtxx.XXBH,
                    JSR     = sjr,
                    JSRXZDM = "",
                    YDZT    = "0",
                    JSRSC   = "0"
                });
            }
            MessageManage mess = new MessageManage();

            mess.AddMessage(xtxx, xtxxjss);
        }
Example #2
0
        /// <summary>
        /// 添加消息
        /// </summary>
        /// <param name="xtxx"></param>
        /// <returns></returns>
        public bool AddMessage(XTXX xtxx, List <XTXXJS> xtxxjs)
        {
            ArrayList sqls = new ArrayList();

            sqls.Add(SqlBuilder.BuildInsertSql(xtxx));
            foreach (var xtxxj in xtxxjs)
            {
                sqls.Add(SqlBuilder.BuildInsertSql(xtxxj));
            }
            return(OracleHelper.ExecuteCommand(sqls));
        }