// GET: Conferences
        public ActionResult Index()
        {
            Cmn cmn = new Cmn();

            cmn.UserName = "******";
            if (User.Identity.IsAuthenticated)
            {
                cmn.UserName = User.Identity.Name;
            }

            //  Get user information
            ViewModel_ConferenceProfileSearch viewModel_ConferenceProfileSearch = new ViewModel_ConferenceProfileSearch();

            viewModel_ConferenceProfileSearch.UserInformation = db.UserInformations.Where(p => p.UserAccount == cmn.UserName).FirstOrDefault();
            viewModel_ConferenceProfileSearch.ViewModel_ConferenceProfiles = (db.Conferences
                                                                              .OrderByDescending(p => p.ID)
                                                                              .Select(p => new ViewModel_ConferenceProfile()
            {
                Confernece = p
                , ControlDates = (db.ControlDates.Where(c => c.ConferenceID == p.ID)
                                  .Where(c => c.PeriodFrom <= cmn.CurrentDatetime && c.PeriodTo <= cmn.CurrentDatetime)
                                  .ToList())
            })
                                                                              ).ToList();
            return(View(viewModel_ConferenceProfileSearch));
            //  View Menu:
            //  1. Enabled Manage Paper when selected conference:                       Papers/Index
            //  2. Enabled Manage conference as TPC selected conference:                Conferences/Manage/5
            //  3. Enabled Create new conference as system administrator:               Conferences/Create
            //  4. Enabled Manage conferences as system administator:                   Conferences/IndexAdmin
            //  List Confernece
            //  5. Selected conference as Not null of controlDate and user information: Conferences/Select/5
            //  6. Linked to Details                                                    Conferences/Details/5
        }
        public ActionResult IndexAdmin()
        {
            Cmn cmn = new Cmn();

            cmn.UserName = "******";
            if (User.Identity.IsAuthenticated)
            {
                cmn.UserName = User.Identity.Name;
            }
            UserInformation userInformation = db.UserInformations.Where(p => p.UserAccount == cmn.UserName)
                                              .Where(p => p.PermissionEnabled == "Enabled")
                                              .Where(p => p.PermissionGroup == "Administrator")
                                              .FirstOrDefault();

            if (userInformation == null)
            {
                return(RedirectToAction("", "Home", null));
            }

            //  Get user information
            ViewModel_ConferenceProfileSearch viewModel_ConferenceProfileSearch = new ViewModel_ConferenceProfileSearch();

            viewModel_ConferenceProfileSearch.UserInformation = userInformation;
            viewModel_ConferenceProfileSearch.ViewModel_ConferenceProfiles = (db.Conferences
                                                                              .OrderByDescending(p => p.ID)
                                                                              .Select(p => new ViewModel_ConferenceProfile()
            {
                Confernece = p
                , ControlDates = (db.ControlDates.Where(c => c.ConferenceID == p.ID)
                                  .Where(c => c.PeriodFrom <= cmn.CurrentDatetime && c.PeriodTo <= cmn.CurrentDatetime
                                         ).ToList())
            })
                                                                              ).ToList();
            return(View(viewModel_ConferenceProfileSearch));
            //  View Menu:
            //  1. Enabled Return:                                          Conferences/Index
            //  2. Enabled Create new conference:                           Conferences/Create
            //  List Confernece
            //  3. Selected conference as Not null of controlDate:          Conferences/Manage/5
        }