コード例 #1
0
        public void SendMsgToUser(int meetCode)
        {
            ConferenceManageBFL   ebfl             = new ConferenceManageBFL();
            ConferenceManageModel conferenceManage = new ConferenceManageModel();

            conferenceManage = ebfl.GetConferenceManage(meetCode);
            string     strUser   = conferenceManage.ChaterMember;
            string     text2     = string.Format("{0} 会议", conferenceManage.Topic);
            string     text3     = string.Format("主办单位: <b>{0}</b>\r\n会议地点: <b>{1}</b>\r\n会议时间:<b>{2}</b>\r\n<a href='../RmsOA/XZ_Conference.aspx?Type=Read&Code={3}'>详细内容</a>\r\n<a href='../RmsOA/XZ_ConferenceWeek.aspx'>本周会议</a>", new object[] { conferenceManage.Dept, conferenceManage.Place, conferenceManage.StartTime, meetCode.ToString() });
            DateTime   now       = DateTime.Now;
            string     code      = SystemManageDAO.GetNewSysCode("Notice");
            EntityData entity    = new EntityData("Standard_Notice");
            DataRow    newRecord = entity.GetNewRecord();

            newRecord["NoticeCode"]   = code;
            newRecord["Title"]        = text2;
            newRecord["SubmitPerson"] = strUser;
            newRecord["SubmitDate"]   = DateTime.Now;
            newRecord["UpdateDate"]   = DateTime.Now;
            newRecord["UserCode"]     = strUser;
            newRecord["Content"]      = text3;
            newRecord["Type"]         = "1";
            newRecord["IsAll"]        = "0";
            newRecord["status"]       = "1";
            entity.AddNewRecord(newRecord);
            string    strTmp     = this.UserListString(meetCode);
            ArrayList arOperator = new ArrayList();

            this.SaveRS(arOperator, StringRule.CutRepeat(strTmp), "", "080104");
            this.SaveRS(arOperator, strUser, "", "080102,080103,080104");
            if (arOperator.Count > 0)
            {
                ResourceRule.SetResourceAccessRange(code, "0801", "", arOperator, false);
            }
            RemindDAO.InsertNotice(entity);
            entity.Dispose();
        }