public ActionResult Index() { AssignUserInfo(); var demo = currentUser; dmNguoiDungBusiness = Get <DM_NGUOIDUNGBusiness>(); LichCongTacViewModel viewModel = new LichCongTacViewModel(); viewModel.calendarType = LICH_CONSTANT.NGAY; viewModel.groupOfLanhDaos = dmNguoiDungBusiness.GetDropDownByDeptParentId(currentUser.DeptParentID.GetValueOrDefault(), 0); viewModel.isLeader = dmNguoiDungBusiness.CheckIsLeader(currentUser.ID); //kiểm tra là lãnh đạo if (viewModel.isLeader) { viewModel.groupOfLanhDaos = new List <SelectListItem>() { new SelectListItem() { Value = currentUser.ID.ToString(), Text = currentUser.HOTEN } }; } DM_THAOTAC userFunction = currentUser.ListThaoTac.Where(o => o.MA_THAOTAC.ToUpper() == "TAO_LICHCONGTAC").FirstOrDefault(); viewModel.canCreate = (userFunction != null && userFunction.DM_THAOTAC_ID > 0); return(View(viewModel)); }