Esempio n. 1
0
 /// <summary>
 ///     Set userid
 ///     save virtual fields
 ///     Last modified set
 ///     fix iframe
 ///     URL
 /// </summary>
 /// <param name="app"></param>
 private void AddNecessaryBothOnPostingNEditing(App app)
 {
     app.Url = _logics.GenerateHyphenUrlStringValid(app.PlatformVersion, app.CategoryID, app.AppName,
                                                    app.PlatformID, db,
                                                    app.AppID);
     app.UrlWithoutEscapseSequence = _logics.GetUrlStringExceptEscapeSequence(app.Url);
     app.PostedByUserID            = UserManager.GetLoggedUserId();
     SaveVirtualFields(app);
     app.LastModifiedDate = DateTime.Now;
     app.AbsUrl           = null;
 }
        public ActionResult GetAppUrl(App app)
        {
            if (SessionNames.IsValidationExceed("GetAppUrl", 500) || app == null)
            {
                return(Json(null, JsonRequestBehavior.AllowGet));
            }
            using (var db = new ReviewAppsEntities()) {
                var algorithms = new Logics();

                app.Url = algorithms.GenerateHyphenUrlStringValid(app, db);

                var sender = new {
                    url = app.GetAbsoluteUrl()
                };
                return(Json(sender, JsonRequestBehavior.AllowGet));
            }
            ;
        }