コード例 #1
0
 public ActionResult CreateProjectProcess(ProjectProcess project)
 {
     project.Owner = UserService.GetUserByCookie();
     ProjectProcessService.Create(project);
     var guid = WorkFlowContext.CreateAndRun_ProjectProcess(project.ID, project.Owner.ID);
     return RedirectFrom();
 }
コード例 #2
0
 public Tuple<int, int> GetAppraisalResult(ProjectProcess project)
 {
     db.Entry(project).Collection(p => p.AppraisalResult).Load();
     return new Tuple<int, int>(project.AppraisalResult.Count(p => p.IsAgree == true), project.AppraisalResult.Count(p => p.IsAgree == false));
 }
コード例 #3
0
 public void Create(ProjectProcess project)
 {
     project.Adddate = DateTime.Now;
     db.ProjectProcesses.Add(project);
     db.SaveChanges();
 }
コード例 #4
0
 public void UpLoadFile(ProjectProcess project, HttpPostedFileBase file)
 {
     var path = SaveFile(file);
     if (project.ProjectProcessActivity == (int)ProjectProcessActivity.运营组设计)
     {
         if (!string.IsNullOrEmpty(project.File1))
         {
             DeleteFile(project.File1);
         }
         project.File1 = path;
     }
     else
     {
         if (!string.IsNullOrEmpty(project.File2))
         {
             DeleteFile(project.File2);
         }
         project.File2 = path;
     }
     db.SaveChanges();
 }