// GET: Group/Edit/5 public ActionResult Edit(int id) { try { GroupModels Group = new GroupModels(); UserID = Session[CConfig.SESSION_USERID] == null ? 1 : Convert.ToInt32(Session[CConfig.SESSION_USERID]); Group = data.GetGroupByID(id); ViewData["ListRule"] = data.GetAccessRights(id); TempData["MenuList"] = new SelectList(data.GetListMenu(), "ID", "Name"); TempData.Keep("MenuList"); ViewData["ListGroupType"] = new SelectList(data.GetGroupTypeList(UserID), "ID", "NameVN", Group.GroupType); ViewData["Hotel"] = new SelectList(dataNam.getListHotels(), "Code", "Name", Group.SysHotelCode); TempData["ListGroupMenu"] = data.GetListGroupMenu(id); TempData.Keep("ListGroupMenu"); return(View(Group)); } catch (Exception ex) { CLog.LogError(CBase.GetDeepCaller(), CBase.GetDetailError(ex)); return(View()); } }