Exemple #1
0
        public virtual ActionResult Edit(string id, GroupEditModel g)
        {
            var x = Groups.Get(id);

            if (!ModelState.IsValid)
            {
                return(View(g));
            }
            try
            {
                g.Apply(x);
                Groups.Save(x);
                return(this.RedirectToAction(c => c.Index()));
            }
            catch (Exception ex)
            {
                Notifier.Notify(ex);
                return(View(x));
            }
        }
        public virtual ActionResult Edit(string id, GroupEditModel g)
        {
			var x = Groups.Get(id);
			if (!ModelState.IsValid)
			{
				return View(g);
			}
            try
            {
  			    g.Apply(x);
			    Groups.Save(x);
                return this.RedirectToAction(c => c.Index());
            }
            catch (Exception ex)
            {
				Notifier.Notify(ex);
                return View(x);
            }
        }
Exemple #3
0
 public virtual ActionResult Edit(string id)
 {
     return(View(GroupEditModel.FromDomain(Groups.Get(id))));
 }