Exemple #1
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);
 }
Exemple #2
0
        private string AddNewExtraValueToRecord()
        {
            var o = ExtraValueModel.TableObject(Id, ExtraValueTable, Id2);

            switch (AdhocExtraValueType.Value)
            {
            case "Code":
                o.AddEditExtraCode(ExtraValueName, ExtraValueTextBox);
                break;

            case "Text":
                o.AddEditExtraText(ExtraValueName, ExtraValueTextArea);
                break;

            case "Text2":
                o.AddEditExtraText(ExtraValueName, ExtraValueTextArea);
                break;

            case "Date":
                o.AddEditExtraDate(ExtraValueName, ExtraValueDate);
                break;

            case "Int":
                o.AddEditExtraInt(ExtraValueName, ExtraValueInteger);
                break;

            case "Bit":
                o.AddEditExtraBool(ExtraValueName, ExtraValueCheckbox);
                break;
            }
            DbUtil.Db.SubmitChanges();
            o.LogExtraValue("add", ExtraValueName);
            return(null);
        }
Exemple #3
0
 public ExtraValue(MeetingExtra v, ExtraValueModel model)
 {
     Type = v.Type;
     Field = v.Field;
     Data = v.Data;
     Id = v.MeetingId;
     Model = model;
 }
Exemple #4
0
 public ExtraValue(MeetingExtra v, ExtraValueModel model)
 {
     Type  = v.Type;
     Field = v.Field;
     Data  = v.Data;
     Id    = v.MeetingId;
     Model = model;
 }
Exemple #5
0
 public ExtraValue(OrganizationExtra v, ExtraValueModel model)
 {
     Type = v.Type;
     Field = v.Field;
     StrValue = v.StrValue;
     DateValue = v.DateValue;
     Data = v.Data;
     IntValue = v.IntValue;
     BitValue = v.BitValue;
     Id = v.OrganizationId;
     Model = model;
 }
Exemple #6
0
 public ExtraValue(FamilyExtra v, ExtraValueModel model)
 {
     Type = v.Type;
     Field = v.Field;
     StrValue = v.StrValue;
     DateValue = v.DateValue;
     Data = v.Data;
     IntValue = v.IntValue;
     BitValue = v.BitValue;
     Id = v.FamilyId;
     Model = model;
 }
Exemple #7
0
 public ExtraValue(OrganizationExtra v, ExtraValueModel model)
 {
     Type      = v.Type;
     Field     = v.Field;
     StrValue  = v.StrValue;
     DateValue = v.DateValue;
     Data      = v.Data;
     IntValue  = v.IntValue;
     BitValue  = v.BitValue;
     Id        = v.OrganizationId;
     Model     = model;
 }
Exemple #8
0
 public ExtraValue(FamilyExtra v, ExtraValueModel model)
 {
     Type      = v.Type;
     Field     = v.Field;
     StrValue  = v.StrValue;
     DateValue = v.DateValue;
     Data      = v.Data;
     IntValue  = v.IntValue;
     BitValue  = v.BitValue;
     Id        = v.FamilyId;
     Model     = model;
 }
Exemple #9
0
 public ExtraValue(ContactExtra v, ExtraValueModel model)
 {
     Type      = v.Type;
     Field     = v.Field.Trim();
     StrValue  = v.StrValue;
     DateValue = v.DateValue;
     Data      = v.Data;
     IntValue  = v.IntValue;
     BitValue  = v.BitValue;
     Id        = v.ContactId;
     Model     = model;
 }
Exemple #10
0
 public ExtraValue(MeetingExtra v, ExtraValueModel model)
 {
     Type = v.Type;
     Field = v.Field;
     StrValue = v.StrValue;
     DateValue = v.DateValue;
     Data = v.Data;
     IntValue = v.IntValue;
     BitValue = v.BitValue;
     Id = v.MeetingId;
     Model = model;
 }
Exemple #11
0
 public ExtraValue(MeetingExtra v, ExtraValueModel model)
 {
     Type      = v.Type;
     Field     = v.Field.Trim();
     StrValue  = v.StrValue;
     DateValue = v.DateValue;
     Data      = v.Data;
     IntValue  = v.IntValue;
     BitValue  = v.BitValue;
     Id        = v.MeetingId;
     Model     = model;
 }
Exemple #12
0
 public ExtraValue(OrgMemberExtra v, ExtraValueModel model)
 {
     Type      = v.Type;
     Field     = v.Field.Trim();
     StrValue  = v.StrValue;
     DateValue = v.DateValue;
     Data      = v.Data;
     IntValue  = v.IntValue;
     BitValue  = v.BitValue;
     Id        = v.OrganizationId;
     Id2       = v.PeopleId;
     Model     = model;
 }
 public ActionResult Edit(string table, 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);
     m.EditExtra(type, HttpUtility.UrlDecode(name), value);
     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);
 }
Exemple #15
0
        internal static Value AddField(Value f, ExtraValue ev, ExtraValueModel m = null)
        {
            if (f == null)
            {
                f = new Value
                {
                    Name = ev.Field,
                    Standard = false
                };
                f.Type = ev.Type;
            }
            else
                f.Standard = true;

            f.Id = ev?.Id ?? (m?.Id ?? 0);
            f.Extravalue = ev;
            f.Model = m;
            return f;
        }
Exemple #16
0
        internal static Value AddField(Value f, ExtraValue ev, ExtraValueModel m = null)
        {
            if (f == null)
            {
                f = new Value
                {
                    Name     = ev.Field,
                    Standard = false
                };
                f.Type = ev.Type;
            }
            else
            {
                f.Standard = true;
            }

            f.Id         = ev?.Id ?? (m?.Id ?? 0);
            f.Extravalue = ev;
            f.Model      = m;
            return(f);
        }
Exemple #17
0
 public ActionResult DeleteAdhoc(string table, int id, string name)
 {
     var m = new ExtraValueModel(id, table, "Adhoc");
     m.Delete(name);
     return View("AdHoc", m);
 }
 public ActionResult DeleteExtraValue(int oid, int pid, string name)
 {
     var m = new ExtraValueModel(oid, pid, "OrgMember", "Adhoc");
     m.Delete(name);
     return Content("deleted");
 }
 public ActionResult ExtraValues(int oid, int pid)
 {
     var em = new ExtraValueModel(oid, pid, "OrgMember", "Adhoc");
     return View("Tabs/ExtraValue/Adhoc", em);
 }
Exemple #20
0
 public ActionResult ListStandard(string table, string location, int id)
 {
     var m = new ExtraValueModel(id, table, location);
     return View(m);
 }
Exemple #21
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");
 }
 public ActionResult Delete(string table, int id, string name)
 {
     var m = new ExtraValueModel(id, table, "Standard");
     m.Delete(name);
     return View("Standard", m);
 }
 public ActionResult Location(string location, string table, int id, string label)
 {
     var m = new ExtraValueModel(id, table, location);
     ViewBag.EvLocationLabel = label;
     return View(m);
 }
Exemple #24
0
 public ActionResult Display(string table, string location, int id)
 {
     var m = new ExtraValueModel(id, table, location);
     return View(location, m);
 }
Exemple #25
0
 public ActionResult Bits(string table, int id, string name)
 {
     var m = new ExtraValueModel(id, table);
     return Content(m.DropdownBitsJson(HttpUtility.UrlDecode(name)));
 }
Exemple #26
0
 public ActionResult Codes(string table, string name)
 {
     var m = new ExtraValueModel(table);
     return Content(m.CodesJson(HttpUtility.UrlDecode(name)));
 }
 public ActionResult ExtraValues(int id)
 {
     var m = new ExtraValueModel(id, "People", "Volunteer");
     ViewBag.EvLocationLabel = DbUtil.Db.Setting("ExtraVolunteerDataLabel", "Extra Volunteer Data");
     return View("/Views/ExtraValue/Location.cshtml", m);
 }
Exemple #28
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();
 }
Exemple #29
0
 public ActionResult SwitchMultiline(string table, string location, string name)
 {
     var m = new ExtraValueModel(table, location);
     m.SwitchMultiline(name);
     return View("ListStandard", m);
 }