public ActionResult Create(AppVersionModel model, bool continueEditing) {
            if (!_permissionService.Authorize(StandardPermissionProvider.ManageAppVersions))
                return AccessDeniedView();

            if (ModelState.IsValid) {
                var appVersion = model.ToEntity();
                appVersion.CreateON = DateTime.Now;

                _appVersionService.Insert(appVersion);

                //activity log
                _activityLogService.InsertActivity("AddNewAppVersion", _localizationService.GetResource("ActivityLog.AddNewAppVersion"), appVersion.VersionNum);

                SuccessNotification(_localizationService.GetResource("Admin.Catalog.Attributes.AppVersions.Added"));
                return continueEditing ? RedirectToAction("Edit", new { id = appVersion.Id }) : RedirectToAction("List");
            }

            //If we got this far, something failed, redisplay form
            return View(model);
        }
        public ActionResult Edit(AppVersionModel model, bool continueEditing) {
            if (!_permissionService.Authorize(StandardPermissionProvider.ManageAppVersions))
                return AccessDeniedView();

            var appVersion = _appVersionService.GetById(model.Id);
            if (appVersion == null)
                //No product attribute found with the specified id
                return RedirectToAction("List");

            if (ModelState.IsValid) {
                appVersion = model.ToEntity(appVersion);

                _appVersionService.Update(appVersion);


                //activity log
                _activityLogService.InsertActivity("EditAppVersion", _localizationService.GetResource("ActivityLog.EditAppVersion"), appVersion.VersionNum);

                SuccessNotification(_localizationService.GetResource("Admin.AppVersions.Updated"));
                return continueEditing ? RedirectToAction("Edit", appVersion.Id) : RedirectToAction("List");
            }

            //If we got this far, something failed, redisplay form
            return View(model);
        }