示例#1
0
        public ActionResult EditExecuter(int id)
        {
            var executer = ExecuterManager.FindExecuter(id);

            if (executer != null)
            {
                var set = new EditExecuterBindingModel
                {
                    FirstName          = executer.FirstName,
                    LastName           = executer.LastName,
                    MasterId           = executer.MasterId,
                    CollegeId          = executer.CollegeId,
                    EducationalGroupId = executer.EducationalGroupId,
                    Email   = executer.Email,
                    Phone   = executer.Phone,
                    Explain = executer.Explain,
                };
                ViewBag.ExecuterResearchgroup = ExecuterManager.FindExecuterResearchGroups(id);
                var colleges = CollegeManager.List();
                ViewBag.College          = colleges;
                ViewBag.EducationalGroup = EducationalGroupManager.FindByCollegeId(executer.CollegeId);
                ViewBag.ResearchGroup    = ResearchGroupManager.List();
                return(View(set));
            }
            return(RedirectToAction("Index"));
        }
示例#2
0
        public ActionResult ProjectInfo(int id)
        {
            var project = ProjectManager.Find(id);

            if (project != null)
            {
                var set = new ProjectViewModel
                {
                    Title                = project.Title,
                    ProjectId            = project.ProjectId,
                    Price                = project.Price,
                    OverHeadPrice        = project.OverHeadPrice,
                    ReceivePrice         = project.ReceivePrice,
                    RemainPrice          = project.RemainPrice,
                    PaymentPrice         = project.PaymentPrice,
                    MainContractId       = project.MainContractId,
                    MainContractDate     = Utility.DateToString(project.MainContractDate),
                    InternalContractId   = project.MainContractId,
                    InternalContractDate = Utility.DateToString(project.InternalContractDate),
                    ProjectEndDate       = Utility.DateToString(project.ProjectEndDate),
                    PhasesNum            = project.PhasesNum,
                    ProjectStatus        = project.ProjectStatus,
                    ProjectType          = project.ProjectType,
                    Explain              = project.Explain,
                    Id = project.Id,
                };
                set.Employer = EmployerManager.Find(project.EmployerId).Name;
                var executer = ExecuterManager.FindExecuter(project.ExecuterId);
                set.Executer         = executer.FirstName + " " + executer.LastName;
                set.College          = CollegeManager.Find(project.CollegeId).Name;
                set.EducationalGroup = EducationalGroupManager.Find(project.EducationalGroupId).Name;
                set.ResearchGroup    = ResearchGroupManager.Find(project.ResearchGroupId).Name;
                ViewBag.ProjectInfo  = set;
                return(View());
            }
            return(RedirectToAction("Error"));
        }