示例#1
0
 public ActionResult Create(WorkNoticeModel model)
 {
     if (model != null)
     {
         string department = string.Empty;
         if (model.OrganizationList != null && model.OrganizationList.Count > 0)
         {
             for (int i = 0; i < model.OrganizationList.Count; i++)
             {
                 if (i > 0)
                 {
                     department += ",";
                 }
                 department += model.OrganizationList[i].ToString();
             }
         }
         WorkNotices WorkNotices = model.ToInfo();
         WorkNotices.Department = department;
         service.InsertGoogleProductRecord(WorkNotices);
         return(Json(new AjaxResult()
         {
             Result = Result.Success, Message = "操作成功"
         }));
     }
     return(View(PluginHelper.GetViewPath(this.GetType(), "Create"), model));
 }
示例#2
0
        public virtual void UpdateGoogleProductRecord(WorkNotices WorkNotices)
        {
            if (WorkNotices == null)
            {
                throw new ArgumentNullException("WorkNotices");
            }

            repository.Update(WorkNotices);
        }
示例#3
0
 public WorkNoticeModel ToModel(WorkNotices info)
 {
     this.Id            = info.Id;
     this.Title         = info.Title;
     this.Content       = info.Content;
     this.Publisher     = info.Publisher;
     this.PublishDate   = info.PublishDate;
     this.WorkAbortDate = info.WorkAbortDate;
     this.Department    = info.Department;
     this.Imgurl        = info.Imgurl;
     this.ImgName       = info.ImgName;
     this.ImgSLT        = info.ImgSLT;
     return(this);
 }
示例#4
0
 public WorkNotices FormData(WorkNotices info)
 {
     info.Id            = this.Id;
     info.Title         = this.Title;
     info.Content       = this.Content;
     info.Publisher     = this.Publisher;
     info.PublishDate   = this.PublishDate;
     info.WorkAbortDate = this.WorkAbortDate;
     info.Department    = this.Department;
     info.Imgurl        = this.Imgurl;
     info.ImgName       = this.ImgName;
     info.ImgSLT        = this.ImgSLT;
     return(info);
 }
示例#5
0
        public WorkNotices ToInfo()
        {
            WorkNotices info = new WorkNotices();

            info.Title         = this.Title;
            info.Content       = this.Content;
            info.Publisher     = this.Publisher;
            info.PublishDate   = this.PublishDate;
            info.WorkAbortDate = this.WorkAbortDate;
            info.Department    = this.Department;
            info.Imgurl        = this.Imgurl;
            info.ImgName       = this.ImgName;
            info.ImgSLT        = this.ImgSLT;
            return(info);
        }