예제 #1
0
 public ContactSearchInfo()
 {
     ContactType = new CodeInfo("ContactType");
     ContactReason = new CodeInfo("ContactReason");
     Ministry = new CodeInfo("Ministry");
     ContactResult = new CodeInfo("ContactResult");
 }
예제 #2
0
 public NewExtraValueModel(Guid id)
 {
     AdhocExtraValueType = new CodeInfo("Text", "AdhocExtraValueType");
     QueryId = id;
     ExtraValueTable = "People";
     ExtraValueLocation = "Adhoc";
 }
예제 #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;
 }
예제 #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);
 }
예제 #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");
 }
예제 #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");
 }
예제 #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;
     }
 }
예제 #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());
 }
예제 #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");
 }
예제 #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;
     }
 }
예제 #11
0
 public OrgMembersUpdate()
 {
     MemberType = new CodeInfo(0, "MemberType");
 }
예제 #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);
 }
예제 #13
0
 public ValidateAddress()
 {
     Tag = new CodeInfo("0", "Tag");
 }
예제 #14
0
 public SettingsGeneralModel()
 {
     LimitToRole = new CodeInfo("0", new SelectList(Roles(), "Value", "Text"));
 }
예제 #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();
 }
예제 #16
0
 public ScheduleInfo(OrgSchedule sc)
 {
     this.sc = sc;
     SchedDay = new CodeInfo(sc.SchedDay, "SchedDay");
     AttendCredit = new CodeInfo(sc.AttendCreditId, "AttendCredit");
 }
예제 #17
0
 public VolunteerModel()
 {
     Status = new CodeInfo(0, Statuses());
     MVRStatus = new CodeInfo(0, Statuses());
 }