Example #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     RegisterOEMSkins("form.css");
     if (!IsPostBack)
     {
         string announceId = Request.QueryString["Id"];
         if (!string.IsNullOrWhiteSpace(announceId))
         {
             AnnounceView view = AnnounceService.Query(Guid.Parse(announceId));
             this.lblTitle.Text        = view.Title;
             this.lblPublishTime.Text  = view.PublishTime.Date.ToShortDateString();
             this.lblContent.InnerHtml = view.Content;
         }
     }
 }
Example #2
0
        /// <summary>
        /// OEM版本新增公告
        /// </summary>
        /// <param name="company">公司Id</param>
        /// <param name="view">公告信息</param>
        /// <param name="operatorAccount">操作员帐号</param>
        public static void InsertOEM(Guid company, AnnounceView view, string operatorAccount)
        {
            var model = new Domain.Announce();

            model.Company        = company;
            model.AduiteStatus   = AduiteStatus.UnAudit;
            model.PublishRole    = PublishRole.用户;
            model.PublishTime    = view.PublishTime;
            model.PublishAccount = operatorAccount;
            model.Title          = view.Title;
            model.Content        = view.Content;
            model.AnnounceType   = view.AnnounceType;
            model.AnnunceScope   = view.AnnounceScope;
            var repository = Factory.CreateAnnounceReposity();

            repository.Insert(model);
            // 记录日志
            string content = string.Format("公告Id:{0},标题:{1},公告类型:{2},内容:{3},发布时间:{4},公司Id:{5}", model.Id, view.Title, view.AnnounceType, view.Content, view.PublishTime.Date.ToString("yyyy-MM-dd HH:mm:ss"), company);

            saveAddLog("公告", content, OperatorRole.Provider, company.ToString() + "," + model.Id.ToString(), operatorAccount);
        }