Exemple #1
0
        public ActionResult Index(int?id = null)
        {
            var model = CompanyModel.Load(MemberSession.GetMemberId());

            if (id != null)
            {
                if (MemberSession.GetRole() == Enumerations.Role.Administrator ||
                    MemberSession.GetRole() == Enumerations.Role.FR)
                {
                    model.Show = model.AllCompany.Find(x => x.CompanyId == id);
                }
                else
                {
                    model.Show = model.MyCompany.Find(x => x.CompanyId == id);
                }
            }
            return(View(model));
        }