//其他部门人员回复问题 // GET: /RecordS/Create public ActionResult Create(Guid id) { Pts_Records modelRecords = new Pts_Records(); modelRecords.ProblemID = id; Department clsDepartment = new Department(); UserProfileModel userprofile = GetMyProfile(); ViewBag.AssignTo = new SelectList(clsDepartment.GetDepartmentList(userprofile.Department), "DeptID", "DeptName"); return View(modelRecords); }
/// <summary> /// 新增文章 /// </summary> public ActionResult AdminAddProblems() { string tid = "1"; string cid = "1"; UserProfileModel userprofile = GetMyProfile(); ViewBag.showAssignTo = userprofile.Department; Department clsDepartment = new Department(); Category clsCategory = new Category(); ViewData["CategoryID"] = new SelectList(clsCategory.getFCategoryList(tid, "", " -- "), "CateId", "CateName", cid); ViewBag.AssignedTo = new SelectList(clsDepartment.GetDepartmentList(userprofile.Department), "DeptID", "DeptName"); ViewBag.CurrentItem = "t" + tid; if (tid == "4") return View("AdminAlbumAdd"); return View(); }
public ViewResult Details(Guid id) { Category clsCategory = new Category(); List<CategoryModel> catelist = clsCategory.getFCategoryList("1", "", " -- "); Pts_Problems clsPts_Problems = db.Pts_Problems.Find(id); ViewBag.CategoryID = catelist.Find(c => c.CateId.ToString() == clsPts_Problems.CategoryID.ToString()).CateName.ToString(); Department clsDepartment = new Department(); ViewBag.AssignTo = new SelectList(clsDepartment.GetDepartmentList(), "DeptID", "DeptName"); return View(clsPts_Problems); }
/// <summary> /// 问题修改 /// </summary> /// <param name="id"></param> /// <returns></returns> public ActionResult AdminEdit(Guid id) { Category clsCategory = new Category(); Department clsDepartment = new Department(); Pts_Problems clsPts_Problems = db.Pts_Problems.Find(id); ViewBag.AssignedTo = new SelectList(clsDepartment.GetDepartmentList(), "DeptID", "DeptName", clsPts_Problems.AssignedTo); ViewData["CategoryID"] = new SelectList(clsCategory.getFCategoryList("1", "", " -- "), "CateId", "CateName", clsPts_Problems.CategoryID); return View(clsPts_Problems); }
public ActionResult MyProfile() { Department clsDepartment = new Department(); ViewBag.CI = configinfo; ViewData["Gender"] = new SelectList(WebUtils.GetGenderList(), "Value", "Key", GetProfileItem("gender", "1")); UserProfileModel userprofile = GetMyProfile(); userprofile.Intro = Utils.RemoveHtml(WebUtils.HtmlToUBB(userprofile.Intro)); userprofile.Signature = Utils.RemoveHtml(WebUtils.HtmlToUBB(userprofile.Signature)); ViewBag.Department = new SelectList(clsDepartment.GetDepartmentList(), "DeptID", "DeptName"); return PartialView("_UserProfile", userprofile); }
// // GET: /Problems/Details/5 public ViewResult Details(Guid id) { var NewRecords = (from d in db.Pts_Records where d.ProblemID == id orderby d.CreateTime descending select d).First(); Category clsCategory = new Category(); UserProfileModel userprofile = GetMyProfile(); List<CategoryModel> catelist = clsCategory.getFCategoryList("1", "", " -- "); Pts_Problems clsPts_Problems = db.Pts_Problems.Find(id); ViewBag.CategoryID = catelist.Find(c => c.CateId.ToString() == clsPts_Problems.CategoryID.ToString()).CateName.ToString(); Department clsDepartment = new Department(); ViewBag.AssignTo = new SelectList(clsDepartment.GetDepartmentList(), "DeptID", "DeptName"); ViewBag.Department = userprofile.Department; //显示修改按钮相关 Problems clsProblems = new Problems(); ViewBag.Edit = NewRecords.ProblemStateID.ToString() == "9c3f96c9-1869-41c4-92f5-f81c5f3e6e5c" ? "1" : "0"; return View(clsPts_Problems); }
// // GET: /UserProblems/Details/5 public ViewResult Details(Guid id) { var NewRecords = (from d in db.Pts_Records where d.ProblemID == id orderby d.CreateTime descending select d).First(); Category clsCategory = new Category(); UserProfileModel userprofile = GetMyProfile(); List<CategoryModel> catelist = clsCategory.getFCategoryList("1", "", " -- "); Pts_Problems clsPts_Problems = db.Pts_Problems.Find(id); ViewBag.CategoryID = catelist.Find(c => c.CateId.ToString() == clsPts_Problems.CategoryID.ToString()).CateName.ToString(); Department clsDepartment = new Department(); ViewBag.AssignTo = new SelectList(clsDepartment.GetDepartmentList(), "DeptID", "DeptName"); ViewBag.Department = userprofile.Department; //显示修改按钮相关 Problems clsProblems = new Problems(); ViewBag.UserNewQuestion = clsProblems.UserNewQuestion(User.Identity.Name); ViewBag.UserSolveQuestion = clsProblems.UserSolveQuestion(User.Identity.Name); return View(clsPts_Problems); }