public ActionResult Edit(int id, string errorMessage = "")
        {
            var package   = db.lnkmemberposts.Single(a => a.ID == id);
            var viewModel = new PackageEditViewModel
            {
                ID                 = package.ID,
                Title              = package.Title,
                Description        = package.Description,
                Price              = package.Price,
                CategoryID         = package.CategoryID,
                Categories         = GetList(ListType.Category),
                ThumbnailImagePath = package.ThumbnailImagePath,
                Days               = package.Days,
                Nights             = package.Nights,
                StartDT            = package.StartDT,
                EndDT              = package.EndDT,
                Active             = package.Active,
                ErrorMessage       = errorMessage
            };

            var selectedActivities =
                db.lnkmemberpostpackageactivities.Where(a => a.MemberPostID == id && a.Active).Select(a => a.PackageActivityID).ToArray();

            viewModel.Activities = GetPackageActivities(selectedActivities);

            var selectedCountryIDs =
                db.lnkmemberpostcountries.Where(a => a.MemberPostID == id && a.Active).Select(a => a.CountryID).ToArray();
            var countries = GetList(ListType.Country, defaultItem: false);

            countries.ForEach(a => a.Selected = selectedCountryIDs.Any(b => b == int.Parse(a.Value)));

            viewModel.Countries = countries;

            var detailImageNames =
                db.lnkmemberpostimages.Where(a => a.Active && a.MemberPostID == id).Select(a => a.ImagePath).ToArray();

            viewModel.DetailImageNames = string.Join(",", detailImageNames);
            viewModel.MockFiles        = new List <PackageEditMockFile>();

            foreach (var imageName in detailImageNames)
            {
                var mockFile = new PackageEditMockFile
                {
                    name = imageName,
                    size = FileUploadManager.GetFileSize(imageName)
                };
                viewModel.MockFiles.Add(mockFile);
            }

            return(View(viewModel));
        }