Beispiel #1
0
        public ActionResult Create(LookupScript lookupscript)
        {
            if (ModelState.IsValid)
            {
                db.LookupScripts.AddObject(lookupscript);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(lookupscript));
        }
Beispiel #2
0
        public ActionResult SaveChangesTracks24()
        {
            string type;
            var    trackId = 0;

            try
            {
                trackId = int.Parse(Request.Form["gr_id"]);
                var context = new IncomingCallsQAEntities();
                var track   = context.StatisticTracks.Single(item => item.TrackId == trackId);
                track.OptionId = int.Parse(Request.Form["optionId"]);
                context.SaveChanges();
                type = "updated";
            }
            catch (Exception)
            {
                type = "fail";
            }
            return(new XmlResult(String.Format("<data><action type=\"{0}\" sid=\"{1}\" tid=\"{2}\"/></data>", type, trackId, trackId)));
        }