public ActionResult CreateProjectProcess(ProjectProcess project) { project.Owner = UserService.GetUserByCookie(); ProjectProcessService.Create(project); var guid = WorkFlowContext.CreateAndRun_ProjectProcess(project.ID, project.Owner.ID); return RedirectFrom(); }
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)); }
public void Create(ProjectProcess project) { project.Adddate = DateTime.Now; db.ProjectProcesses.Add(project); db.SaveChanges(); }
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(); }