Пример #1
0
 public ActionResult EditStandard(string table, int id, string location, string name)
 {
     var m = new NewExtraValueModel(table, name);
     m.Id = id;
     m.ExtraValueLocation = location;
     return View(m);
 }
Пример #2
0
 public ActionResult SaveEditedStandard(NewExtraValueModel m)
 {
     var i = Views.GetViewsViewValue(DbUtil.Db, m.ExtraValueTable, m.ExtraValueName);
     i.value.VisibilityRoles = m.VisibilityRoles;
     i.value.Codes = m.ConvertToCodes();
     i.views.Save(DbUtil.Db);
     return View("EditStandard", m);
 }
Пример #3
0
 public ActionResult SaveEditedStandard(NewExtraValueModel m)
 {
     var i = Views.GetViewsViewValue(DbUtil.Db, m.ExtraValueTable, m.ExtraValueName);
     i.value.VisibilityRoles = m.VisibilityRoles;
     i.value.Codes = m.ConvertToCodes();
     i.value.Link = Server.HtmlEncode(m.ExtraValueLink);
     i.views.Save(DbUtil.Db);
     return View("ListStandard", new ExtraValueModel(m.Id, m.ExtraValueTable, m.ExtraValueLocation));
 }
Пример #4
0
 public ActionResult SaveNewAdhoc(NewExtraValueModel m)
 {
     try
     {
         m.AddAsNewAdhoc();
     }
     catch (Exception ex)
     {
         ViewBag.Error = ex.Message;
         return View("NewAdhoc", m);
     }
     return new EmptyResult();
 }
 public ActionResult AddExtraValue(NewExtraValueModel m)
 {
     try
     {
         m.AddAsNewAdhoc();
     }
     catch (Exception ex)
     {
         ViewBag.Error = ex.Message;
         return View("Tabs/ExtraValue/NewAdHoc", m);
     }
     var em = new ExtraValueModel(m.Id, m.Id2, "OrgMember", "Adhoc");
     return View("Tabs/ExtraValue/Adhoc", em);
 }
Пример #6
0
 public ActionResult SaveNewStandard(NewExtraValueModel m)
 {
     try
     {
         if(ModelState.IsValid)
             m.AddAsNewStandard();
         else
             ViewBag.Error = "not saved, errors in form";
     }
     catch (Exception ex)
     {
         ViewBag.Error = ex.Message;
     }
     return View("NewStandard", m);
 }
Пример #7
0
 public ActionResult NewAdhoc(string table, string location, int id)
 {
     var m = new NewExtraValueModel(id, table, location);
     return View(m);
 }
Пример #8
0
 public ActionResult ExecDeleteFromQuery(NewExtraValueModel m)
 {
     m.DeleteFromQuery();
     return new EmptyResult();
 }
Пример #9
0
 public ActionResult DeleteFromQuery(Guid id)
 {
     var m = new NewExtraValueModel(id);
     return View("DeleteFromQuery", m);
 }
Пример #10
0
 public ActionResult NewAdhocFromQuery(Guid id)
 {
     var m = new NewExtraValueModel(id);
     return View("NewAdhoc", m);
 }
Пример #11
0
 public ActionResult NewExtraValue(int oid, int pid)
 {
     var m = new NewExtraValueModel(oid, pid, "OrgMember", "Adhoc");
     return View("Tabs/ExtraValue/NewAdhoc", m);
 }
Пример #12
0
 public ActionResult EditStandard(string table, string name)
 {
     var m = new NewExtraValueModel(table, name);
     return View(m);
 }
Пример #13
0
 public ActionResult ConvertToStandard(string table, string name)
 {
     var m = new NewExtraValueModel(0, table, "Standard");
     m.ConvertToStandard(name);
     return Redirect("/ExtraValue/Summary");
 }