Exemplo n.º 1
0
 public ActionResult Create(TaskIssuedModel model)
 {
     if (ModelState.IsValid)
     {
         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();
             }
         }
         TaskIssuedInfo taskInfo = model.ToInfo();
         taskInfo.Department = department;
         _googleService.Add(taskInfo);
         return(Json(new AjaxResult()
         {
             Result = Result.Success, Message = "操作成功"
         }));
     }
     ViewBag.OrganizationList = DataDictionaryHelper.GetOrganizationList();
     return(View(PluginHelper.GetViewPath(this.GetType(), "Create"), model));
 }
Exemplo n.º 2
0
 public TaskIssuedInfo FormData(TaskIssuedInfo info)
 {
     info.TaskOverview   = this.TaskOverview;
     info.Description    = this.Description;
     info.IssuedDate     = this.IssuedDate;
     info.TaskType       = this.TaskType;
     info.CompleteDate   = this.CompleteDate;
     info.EnclosureName  = this.EnclosureName;
     info.EnclosureUrl   = this.EnclosureUrl;
     info.Department     = this.Department;
     info.TaskManagement = this.TaskManagement;
     info.Publisher      = this.Publisher;
     info.Thumbnail      = this.Thumbnail;
     return(info);
 }
Exemplo n.º 3
0
 public TaskIssuedModel ToModel(TaskIssuedInfo info)
 {
     this.Id             = info.Id;
     this.TaskOverview   = info.TaskOverview;
     this.Description    = info.Description;
     this.IssuedDate     = info.IssuedDate;
     this.TaskType       = info.TaskType;
     this.CompleteDate   = info.CompleteDate;
     this.EnclosureName  = info.EnclosureName;
     this.EnclosureUrl   = info.EnclosureUrl;
     this.Department     = info.Department;
     this.TaskManagement = info.TaskManagement;
     this.Publisher      = info.Publisher;
     this.Thumbnail      = info.Thumbnail;
     return(this);
 }