public ContactSearchInfo() { ContactType = new CodeInfo("ContactType"); ContactReason = new CodeInfo("ContactReason"); Ministry = new CodeInfo("Ministry"); ContactResult = new CodeInfo("ContactResult"); }
public NewExtraValueModel(Guid id) { AdhocExtraValueType = new CodeInfo("Text", "AdhocExtraValueType"); QueryId = id; ExtraValueTable = "People"; ExtraValueLocation = "Adhoc"; }
public NewExtraValueModel(int id, string table, string location) { ExtraValueType = new CodeInfo("Text", "ExtraValueType"); AdhocExtraValueType = new CodeInfo("Text", "AdhocExtraValueType"); Id = id; ExtraValueTable = table; ExtraValueLocation = location; }
public RegistrationSearchInfo() { var yna = CodeValueModel.YesNoAll().ToSelect("Value"); Active = new CodeInfo("All", yna); Complete = new CodeInfo("All", yna); Abandoned = new CodeInfo("All", yna); Expired = new CodeInfo("All", yna); }
public EntryModel(int id) { var q = from p in DbUtil.Db.People where p.PeopleId == id select new { p.EntryPointId, p.OriginId, p.InterestPointId }; var i = q.Single(); Origin = new CodeInfo(i.OriginId, "Origin"); EntryPoint = new CodeInfo(i.EntryPointId, "EntryPoint"); InterestPoint = new CodeInfo(i.InterestPointId, "InterestPoint"); }
public AddToOrgFromTag(int id, string group) { Id = id; Group = group; UserId = Util.UserId; if (group == GroupSelectCode.Previous) { var org = DbUtil.Db.LoadOrganizationById(id); OrgName = org.OrganizationName; } Tag = new CodeInfo("0", "Tag"); }
public NewExtraValueModel(string table, string name) { var f = Views.GetStandardExtraValues(DbUtil.Db, table).Single(ee => ee.Name == name); ExtraValueType = new CodeInfo(f.Type, "ExtraValueType"); ExtraValueName = name; ExtraValueTable = table; var codes = string.Join("\n", f.Codes); switch (ExtraValueType.Value) { case "Bits": ExtraValueCheckboxes = codes; break; case "Code": ExtraValueCodes = codes; break; } }
private void Populate() { var i = (from mm in DbUtil.Db.OrganizationMembers where mm.OrganizationId == OrgId && mm.PeopleId == PeopleId select new { mm.Person.Name, mm.Organization.OrganizationName, }).Single(); Name = i.Name; OrgName = i.OrganizationName; if (Goer == null) Goer = new CodeInfo(0, GoerList()); }
public AddAttendeesFromTag(int id) { Id = id; UserId = Util.UserId; var i = (from m in DbUtil.Db.Meetings where m.MeetingId == id select new { m.Organization.OrganizationName, m.OrganizationId, m.MeetingDate }).Single(); OrgName = i.OrganizationName; OrgId = i.OrganizationId; JoinDate = i.MeetingDate.Value.Date; Tag = new CodeInfo("0", "Tag"); }
public NewExtraValueModel(string table, string name) { var f = Views.GetStandardExtraValues(DbUtil.Db, table).Single(ee => ee.Name == name); ExtraValueType = new CodeInfo(f.Type, "ExtraValueType"); ExtraValueName = name; ExtraValueTable = table; VisibilityRoles = f.VisibilityRoles; EditableRoles = f.EditableRoles; ExtraValueLink = HttpUtility.HtmlDecode(f.Link); var codes = string.Join("\n", f.Codes); switch (ExtraValueType.Value) { case "Bits": ExtraValueCheckboxes = codes; break; case "Code": ExtraValueCodes = codes; break; } }
public OrgMembersUpdate() { MemberType = new CodeInfo(0, "MemberType"); }
private void Populate() { var i = (from mm in DbUtil.Db.OrganizationMembers where mm.OrganizationId == _orgId && mm.PeopleId == _peopleId select new { mm, mm.Person.Name, mm.Organization.OrganizationName, mm.Organization.RegSetting, mm.Organization, mm.OrgMemMemTags }).SingleOrDefault(); if (i == null) throw new Exception("missing OrgMember at oid={0}, pid={0}".Fmt(_orgId, _peopleId)); om = i.mm; Name = i.Name; OrgName = i.OrganizationName; Organization = i.Organization; OrgMemMemTags = i.OrgMemMemTags.ToList(); MemberType = new CodeInfo(om.MemberTypeId, "MemberType"); AttendStr = om.AttendStr; Setting = new Settings(i.RegSetting, DbUtil.Db, _orgId.Value); }
public ValidateAddress() { Tag = new CodeInfo("0", "Tag"); }
public SettingsGeneralModel() { LimitToRole = new CodeInfo("0", new SelectList(Roles(), "Value", "Text")); }
public void Update() { if(LimitToRole == null) LimitToRole = new CodeInfo("0", new SelectList(Roles(), "Value", "Text")); if (LimitToRole.Value == "0") LimitToRole.Value = null; if (Gender.Value == "99") Gender.Value = null; this.CopyPropertiesTo(Org); DbUtil.Db.SubmitChanges(); }
public ScheduleInfo(OrgSchedule sc) { this.sc = sc; SchedDay = new CodeInfo(sc.SchedDay, "SchedDay"); AttendCredit = new CodeInfo(sc.AttendCreditId, "AttendCredit"); }
public VolunteerModel() { Status = new CodeInfo(0, Statuses()); MVRStatus = new CodeInfo(0, Statuses()); }