コード例 #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
ファイル: WorkNoticeService.cs プロジェクト: lolegg/Cupcake
        public virtual void UpdateGoogleProductRecord(WorkNotices WorkNotices)
        {
            if (WorkNotices == null)
            {
                throw new ArgumentNullException("WorkNotices");
            }

            repository.Update(WorkNotices);
        }
コード例 #3
0
ファイル: WorkNoticeModel.cs プロジェクト: lolegg/Cupcake
 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
ファイル: WorkNoticeModel.cs プロジェクト: lolegg/Cupcake
 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
ファイル: WorkNoticeModel.cs プロジェクト: lolegg/Cupcake
        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);
        }