示例#1
0
        public ActionResult DeleteAdhoc(string table, int id, string name)
        {
            var m = new ExtraValueModel(id, table, "Adhoc");

            m.Delete(name);
            return(View("AdHoc", m));
        }
示例#2
0
        public ActionResult DeleteStandard(string table, string location, string name, bool removedata)
        {
            var m = new ExtraValueModel(table, location);

            m.DeleteStandard(name, removedata);
            return(Content("ok"));
        }
示例#3
0
        public ActionResult SwitchMultiline(string table, string location, string name)
        {
            var m = new ExtraValueModel(table, location);

            m.SwitchMultiline(name);
            return(View("ListStandard", m));
        }
示例#4
0
        public ActionResult DeleteExtraValue(int oid, int pid, string name)
        {
            var m = new ExtraValueModel(oid, pid, "OrgMember", "Adhoc");

            m.Delete(name);
            return(Content("deleted"));
        }
示例#5
0
        public ActionResult Location(string location, string table, int id, string label)
        {
            var m = new ExtraValueModel(id, table, location);

            ViewBag.EvLocationLabel = label;
            return(View(m));
        }
示例#6
0
        public ActionResult Delete(string table, string location, int id, string name)
        {
            var m = new ExtraValueModel(id, table, location);

            m.Delete(name);
            return(View("Standard", m));
        }
示例#7
0
        public ActionResult Edit(string table, string type, string pk, string name, string value)
        {
            var m = new ExtraValueModel(pk.ToInt(), table);

            m.EditExtra(type, HttpUtility.UrlDecode(name), value);
            return(new EmptyResult());
        }
示例#8
0
        public ActionResult ExtraValues(int id)
        {
            var m = new ExtraValueModel(id, "People", "Volunteer");

            ViewBag.EvLocationLabel = CurrentDatabase.Setting("ExtraVolunteerDataLabel", "Extra Volunteer Data");
            return(View("/Views/ExtraValue/Location.cshtml", m));
        }
示例#9
0
        public ActionResult ApplyOrder(string table, string location, Dictionary <string, int> orders)
        {
            var m = new ExtraValueModel(table, location);

            m.ApplyOrder(orders);
            m = new ExtraValueModel(table, location);
            return(View("ListStandard", m));
        }
示例#10
0
        public ActionResult ExtraValues(int cid, string ministry, string contactType, string contactReason)
        {
            var m = new ContactModel(CurrentDatabase, cid);

            m.SetLocationOnContact(ministry, contactType, contactReason);
            var evmodel = new ExtraValueModel(cid, "Contact", m.Location);

            return(View("/Views/ExtraValue/Location.cshtml", evmodel));
        }
示例#11
0
        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));
        }
示例#12
0
        public ActionResult Edit(string table, string location, string type, string pk, string name, string[] value)
        {
            ExtraValueModel m;

            if (table == "OrgMember")
            {
                var a = pk.Split('.');
                m = new ExtraValueModel(a[0].ToInt(), a[1].ToInt(), table, "Adhoc");
            }
            else
            {
                m = new ExtraValueModel(pk.ToInt(), table, location);
            }
            m.EditExtra(type, HttpUtility.UrlDecode(name), value);
            return(new EmptyResult());
        }
示例#13
0
        public ActionResult Codes(string table, string name)
        {
            var m = new ExtraValueModel(table);

            return(Content(m.CodesJson(HttpUtility.UrlDecode(name))));
        }
示例#14
0
        public ActionResult ListStandard(string table, string location, int id)
        {
            var m = new ExtraValueModel(id, table, location);

            return(View(m));
        }
示例#15
0
        public ActionResult ExtraValues(int oid, int pid)
        {
            var em = new ExtraValueModel(oid, pid, "OrgMember", "Adhoc");

            return(View("Tabs/ExtraValue/Adhoc", em));
        }
示例#16
0
        public ActionResult Bits(string table, int id, string name, string location)
        {
            var m = new ExtraValueModel(CurrentDatabase, id, table, location);

            return(Content(m.DropdownBitsJson(HttpUtility.UrlDecode(name))));
        }
示例#17
0
        public ActionResult Display(string table, string location, int id)
        {
            var m = new ExtraValueModel(id, table, location);

            return(View(location, m));
        }
示例#18
0
        public ActionResult Bits(string table, int id, string name)
        {
            var m = new ExtraValueModel(id, table);

            return(Content(m.DropdownBitsJson(HttpUtility.UrlDecode(name))));
        }
示例#19
0
        public ActionResult Codes(string table, string name, string location)
        {
            var m = new ExtraValueModel(CurrentDatabase, table, location);

            return(Content(m.CodesJson(HttpUtility.UrlDecode(name))));
        }