public ActiveDetailModel(Active active) { this.MyId = active.MyId; this.Name = active.Name; this.Steps = active.Steps; this.Property = active.Property; this.Plan_Id = active.Plan_Id; Phase = new PhaseService().GetById(active.Phase_Id); Subject = new SubjectService().GetById(active.Subject_Id); Content = new ContentService().GetById(active.Content_Id); Form = new FormService().GetById(active.Form_Id); UserInfo = new UserInfoService().GetById(active.UserInfo_Id); }
/// <summary> /// 所有目标层次 /// </summary> /// <returns></returns> public static IEnumerable <SelectListItem> getAllPhases() { var grades = new List <SelectListItem> (); var service = new PhaseService(); var g = service.GetAll().GetEnumerator(); while (g.MoveNext()) { var sli = new SelectListItem(); sli.Text = g.Current.Name; sli.Value = g.Current.MyId.ToString(); //if (select != null && select.Id == g.Current.Id) // sli.Selected = true; grades.Add(sli); } return(grades); }
public PartialViewResult Phases() { var service = new PhaseService(); return(PartialView("_Phases", service.GetAll())); }