public ActionResult Edit(TaskIssuedModel model)
 {
     if (ModelState.IsValid)
     {
         var info = _googleService.GetById(model.Id);
         if (info != null)
         {
             info = model.FormData(info);
             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();
                 }
             }
             info.Department = department;
             _googleService.Update(info);
             return(Json(new AjaxResult()
             {
                 Result = Result.Success, Message = "操作成功"
             }));
         }
     }
     ViewBag.OrganizationList = DataDictionaryHelper.GetOrganizationList();
     return(View(PluginHelper.GetViewPath(this.GetType(), "Edit"), model));
 }
 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));
 }
        public ActionResult Details(Guid id)
        {
            var info  = _googleService.GetById(id);
            var model = new TaskIssuedModel().ToModel(info);

            return(View(PluginHelper.GetViewPath(this.GetType(), "Details"), model));
        }
        public ActionResult Edit(Guid id)
        {
            var info  = _googleService.GetById(id);
            var model = new TaskIssuedModel().ToModel(info);

            ViewBag.OrganizationList = DataDictionaryHelper.GetOrganizationList();
            return(View(PluginHelper.GetViewPath(this.GetType(), "Edit"), model));
        }
        public ActionResult Create()
        {
            var model = new TaskIssuedModel();
            var user  = Session["User"] as User;

            model.Publisher          = user.UserName;
            ViewBag.OrganizationList = DataDictionaryHelper.GetOrganizationList();
            return(View(PluginHelper.GetViewPath(this.GetType(), "Create"), model));
        }
Exemple #6
0
        public ActionResult Disposal(Guid id)
        {
            var info  = _googleService.GetById(id);
            var model = new TaskIssuedModel().ToModel(info);

            model.taskDisposalModel = new TaskDisposalModel();
            var user = Session["User"] as User;

            model.taskDisposalModel.DisposalPerson = user.UserName;
            return(View(PluginHelper.GetViewPath(this.GetType(), "Disposal"), model));
        }
Exemple #7
0
        public ActionResult Details(Guid id)
        {
            var info  = _googleService.GetById(id);
            var model = new TaskIssuedModel().ToModel(info);
            TaskDisposalInfo taskDis = _googleService2.GetByTaskIssuedId(id);

            if (taskDis != null)
            {
                TaskDisposalModel taskDisModel = new TaskDisposalModel().ToModel(taskDis);
                model.taskDisposalModel = taskDisModel;
            }
            return(View(PluginHelper.GetViewPath(this.GetType(), "Details"), model));
        }
Exemple #8
0
 public ActionResult Disposal(TaskIssuedModel model)
 {
     if (ModelState.IsValid)
     {
         TaskDisposalInfo taskDisInfo = model.taskDisposalModel.ToInfo();
         taskDisInfo.TaskIssuedId = model.Id;
         _googleService2.Add(taskDisInfo);
         var info = _googleService.GetById(model.Id);
         info.TaskManagement = true;
         _googleService.Update(info);
         return(Json(new AjaxResult()
         {
             Result = Result.Success, Message = "操作成功"
         }));
     }
     return(View(PluginHelper.GetViewPath(this.GetType(), "Disposal"), model));
 }