Ejemplo n.º 1
0
 public ContactSearchInfo()
 {
     ContactType = new CodeInfo("ContactType");
     ContactReason = new CodeInfo("ContactReason");
     Ministry = new CodeInfo("Ministry");
     ContactResult = new CodeInfo("ContactResult");
 }
Ejemplo n.º 2
0
 public NewExtraValueModel(Guid id)
 {
     AdhocExtraValueType = new CodeInfo("Text", "AdhocExtraValueType");
     QueryId = id;
     ExtraValueTable = "People";
     ExtraValueLocation = "Adhoc";
 }
Ejemplo n.º 3
0
 public NewExtraValueModel(int id, string table, string location)
 {
     ExtraValueType = new CodeInfo("Text", "ExtraValueType");
     AdhocExtraValueType = new CodeInfo("Text", "AdhocExtraValueType");
     Id = id;
     ExtraValueTable = table;
     ExtraValueLocation = location;
 }
Ejemplo n.º 4
0
 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);
 }
Ejemplo n.º 5
0
 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");
 }
Ejemplo n.º 6
0
 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");
 }
Ejemplo n.º 7
0
 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;
     }
 }
Ejemplo n.º 8
0
 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());
 }
Ejemplo n.º 9
0
 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");
 }
Ejemplo n.º 10
0
 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;
     }
 }
Ejemplo n.º 11
0
 public OrgMembersUpdate()
 {
     MemberType = new CodeInfo(0, "MemberType");
 }
Ejemplo n.º 12
0
 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);
 }
Ejemplo n.º 13
0
 public ValidateAddress()
 {
     Tag = new CodeInfo("0", "Tag");
 }
Ejemplo n.º 14
0
 public SettingsGeneralModel()
 {
     LimitToRole = new CodeInfo("0", new SelectList(Roles(), "Value", "Text"));
 }
Ejemplo n.º 15
0
 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();
 }
Ejemplo n.º 16
0
 public ScheduleInfo(OrgSchedule sc)
 {
     this.sc = sc;
     SchedDay = new CodeInfo(sc.SchedDay, "SchedDay");
     AttendCredit = new CodeInfo(sc.AttendCreditId, "AttendCredit");
 }
Ejemplo n.º 17
0
 public VolunteerModel()
 {
     Status = new CodeInfo(0, Statuses());
     MVRStatus = new CodeInfo(0, Statuses());
 }