Exemplo n.º 1
0
        public ActionResult GetUrl(int id)
        {
            var model = new GetUrlModel();

            model.DymbnailId = id;
            model.Variables  = Facade.Variables.GetList(id);
            if (model.Variables.Count == 0)
            {
                return(Preview(DymbnailsHelper.GetUrl(id)));
            }
            return(View(model));
        }
Exemplo n.º 2
0
        public ActionResult GetUrl(int dymbnailId, FormCollection collection)
        {
            const string dymbnailIdKey = "dymbnailId";
            //try {
            var variables      = new object[(collection.Keys.Count - 1) * 2];
            var variablesIndex = 0;

            foreach (string key in collection)
            {
                if (key == dymbnailIdKey)
                {
                    continue;
                }
                variables[variablesIndex]     = key;
                variables[variablesIndex + 1] = collection[key];
                variablesIndex += 2;
            }
            return(Preview(DymbnailsHelper.GetUrl(dymbnailId, variables)));

            /*} catch {
             *  return View();
             * }*/
        }