当前位置: 首页>>代码示例>>C#>>正文


C# CmsData.Organization类代码示例

本文整理汇总了C#中CmsData.Organization的典型用法代码示例。如果您正苦于以下问题:C# Organization类的具体用法?C# Organization怎么用?C# Organization使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Organization类属于CmsData命名空间,在下文中一共展示了Organization类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: populateFromOrg

        public void populateFromOrg(Organization org)
        {
            values["SGF:OrgID"] = org.OrganizationId.ToString();
            values["SGF:Name"] = org.OrganizationName;
            values["SGF:Description"] = org.Description;
            values["SGF:Room"] = org.Location;
            values["SGF:Leader"] = org.LeaderName;
            values["SGF:DateStamp"] = DateTime.Now.ToString("yyyy-MM-dd");
            values["SGF:Schedule"] = "";

            if (org.OrgSchedules.Count > 0)
            {
                int count = 0;
                foreach (var schedule in org.OrgSchedules)
                {
                    if (count > 0) values["SGF:Schedule"] += "; ";
                    values["SGF:Schedule"] += DAY_LAST[schedule.SchedDay ?? 0] + ", " + schedule.SchedTime.ToString2("t"); ;
                    count++;
                }
            }

            foreach (var extra in org.OrganizationExtras)
            {
                if (extra.Field.StartsWith("SGF:"))
                    values[extra.Field] = extra.Data;
            }
        }
开发者ID:hkouns,项目名称:bvcms,代码行数:27,代码来源:SmallGroupFinderModel.cs

示例2: ManageSubsModel

 public ManageSubsModel(int pid, int id)
 {
     this.pid = pid;
     var org = DbUtil.Db.LoadOrganizationById(id);
     if (org.RegistrationTypeId != RegistrationTypeCode.ManageSubscriptions2)
         throw new Exception("must be a ManageSubscriptions RegistrationType");
     masterorgid = id;
     _masterorg = org;
 }
开发者ID:vs06,项目名称:bvcms,代码行数:9,代码来源:ManageSubsModel.cs

示例3: SearchAddModel

        public SearchAddModel(string context, string contextid, bool displaySkipSearch = true)
            : this()
        {
            DisplaySkipSearch = displaySkipSearch;
            AddContext = context;
            PrimaryKeyForContextType = contextid;
            CampusId = null;
            switch (AddContext.ToLower())
            {
                case "addpeople":
                case "menu":
                    EntryPointId = 0;
                    break;
                case "addtotag":
                    EntryPointId = null;
                    break;
                case "mergeto":
                    EntryPointId = null;
                    break;
                case "family":
                case "relatedfamily":
                    EntryPointId = 0;
                    break;
                case "org":
                case "pending":
                case "prospect":
                case "inactive":
                    org = DbUtil.Db.LoadOrganizationById(contextid.ToInt());
                    CampusId = org.CampusId;
                    EntryPointId = org.EntryPointId ?? 0;
                    break;
                case "visitor":
                case "registered":
                    org = (from meeting in DbUtil.Db.Meetings
                           where meeting.MeetingId == contextid.ToInt()
                           select meeting.Organization).Single();
                    EntryPointId = org.EntryPointId ?? 0;
                    CampusId = org.CampusId;
                    break;
                case "contactee":
                    EntryPointId = 0;
                    break;
                case "contactor":
                    EntryPointId = 0;
                    break;
                case "contributor":
                    EntryPointId = 0;
                    break;
                case "addtoemail":
                    EntryPointId = 0;
                    break;

                    
            }
        }
开发者ID:GSBCfamily,项目名称:bvcms,代码行数:55,代码来源:SearchAddModel.cs

示例4: UserSelectClasses

        public static IQueryable<Organization> UserSelectClasses(Organization masterorg)
        {
            if (!masterorg.OrgPickList.HasValue())
                return DbUtil.Db.Organizations.Where(oo => false);
            var cklist = masterorg.OrgPickList.Split(',').Select(oo => oo.ToInt()).ToList();

            var q = from o in DbUtil.Db.Organizations
                    where cklist.Contains(o.OrganizationId)
                    select o;
            return q;
        }
开发者ID:rossspoon,项目名称:bvcms,代码行数:11,代码来源:SelectLists.cs

示例5: MeetingModel

 public MeetingModel(int id)
 {
     var i = (from m in DbUtil.Db.Meetings
              where m.MeetingId == id
              select new
                         {
                             org = m.Organization,
                             m,
                         }).Single();
     meeting = i.m;
     org = i.org;
 }
开发者ID:vs06,项目名称:bvcms,代码行数:12,代码来源:MeetingModel.cs

示例6: CopySettings2

 public static void CopySettings2(Organization frorg, Organization toorg)
 {
     toorg.AllowNonCampusCheckIn = frorg.AllowNonCampusCheckIn;
     toorg.AllowAttendOverlap = frorg.AllowAttendOverlap;
     toorg.CanSelfCheckin = frorg.CanSelfCheckin;
     toorg.NumWorkerCheckInLabels = frorg.NumWorkerCheckInLabels;
     toorg.NoSecurityLabel = frorg.NoSecurityLabel;
     toorg.NumCheckInLabels = frorg.NumCheckInLabels;
     toorg.PhoneNumber = frorg.PhoneNumber;
     toorg.EntryPointId = frorg.EntryPointId;
     toorg.RollSheetVisitorWks = frorg.RollSheetVisitorWks;
     toorg.GradeAgeStart = frorg.GradeAgeStart;
     toorg.DivisionId = frorg.DivisionId;
 }
开发者ID:alexserdyuk,项目名称:bvcms,代码行数:14,代码来源:Organization.cs

示例7: MeetingModel

 public MeetingModel(int id)
 {
     var i = (from m in DbUtil.Db.Meetings
              where m.MeetingId == id
              select new
                         {
                             org = m.Organization,
                             m,
                         }).SingleOrDefault();
     if (i == null)
         return;
     meeting = i.m;
     org = i.org;
 }
开发者ID:stevesloka,项目名称:bvcms,代码行数:14,代码来源:MeetingModel.cs

示例8: populateFromOrg

        public void populateFromOrg(Organization org)
        {
            values["SGF:OrgID"] = org.OrganizationId.ToString();
            values["SGF:Name"] = org.OrganizationName;
            values["SGF:Description"] = org.Description;
            values["SGF:Room"] = org.Location;
            values["SGF:Leader"] = org.LeaderName;
            values["SGF:DateStamp"] = DateTime.Now.ToString("yyyy-MM-dd");

            foreach (var extra in org.OrganizationExtras)
            {
                if (extra.Field.StartsWith("SGF:"))
                    values[extra.Field] = extra.Data;
            }
        }
开发者ID:rossspoon,项目名称:bvcms,代码行数:15,代码来源:SmallGroupFinderModel.cs

示例9: Classes

 public static List<ClassInfo> Classes(Organization masterorg, int id)
 {
     var q = from o in OrderedClasses(masterorg)
             let hasroom = (o.ClassFilled ?? false) == false && ((o.Limit ?? 0) == 0 || o.Limit > o.RegLimitCount(DbUtil.Db))
             where o.RegistrationTypeId > 0
             select new ClassInfo
             {
                 Id = o.OrganizationId,
                 Text = ClassName(o),
                 selected = o.OrganizationId == id,
                 filled = !hasroom
             };
     var list = q.ToList();
     return list;
 }
开发者ID:stevesloka,项目名称:bvcms,代码行数:15,代码来源:SelectLists.cs

示例10: CreateOrganization

 public static Organization CreateOrganization(CMSDataContext Db, Division division, string organization)
 {
     var o = new Organization
     {
         OrganizationName = organization,
         SecurityTypeId = 0,
         CreatedDate = Util.Now,
         CreatedBy = Util.UserId1,
         OrganizationStatusId = 30,
     };
     division.Organizations.Add(o);
     Db.DivOrgs.InsertOnSubmit(new DivOrg { Division = division, Organization = o });
     Db.SubmitChanges();
     return o;
 }
开发者ID:rossspoon,项目名称:bvcms,代码行数:15,代码来源:Organization.cs

示例11: GetValuesDictionary

        public Dictionary<string, string> GetValuesDictionary(Organization org, bool loadAllValues)
        {
            var values = new Dictionary<string, string>();

            var leader = (from e in DbUtil.Db.People
                          where e.PeopleId == org.LeaderId
                          select e).SingleOrDefault();

            values["SGF:OrgID"] = org.OrganizationId.ToString();
            values["SGF:Name"] = org.OrganizationName;
            values["SGF:Description"] = org.Description;
            values["SGF:Room"] = org.Location;
            values["SGF:Leader"] = org.LeaderName;
            values["SGF:DateStamp"] = DateTime.Now.ToString("yyyy-MM-dd");
            values["SGF:Schedule"] = "";

            if (leader != null && leader.PictureId != null)
                values["SGF:LeaderPicSrc"] = "/Portrait/" + leader.Picture.SmallId.Value + "?v=" + DateTime.Now.ToString("yyyyMMddHHmmssffff");
            else
                values["SGF:LeaderPicSrc"] = "/Portrait/-3";

            if (org.OrgSchedules.Count > 0)
            {
                var count = 0;
                foreach (var schedule in org.OrgSchedules)
                {
                    if (count > 0) values["SGF:Schedule"] += "; ";
                    values["SGF:Schedule"] += GroupLookup.DAY_LAST[schedule.SchedDay ?? 0] + ", " + schedule.SchedTime.ToString2("t"); ;
                    count++;
                }
            }

            foreach (var extra in org.OrganizationExtras)
            {
                var val = extra.Data ??
                          extra.StrValue ??
                          extra.DateValue?.ToString() ??
                          extra.IntValue?.ToString() ??
                          extra.BitValue?.ToString();

                if (extra.Field.StartsWith("SGF:"))
                    values[extra.Field] = val;
                else if (loadAllValues)
                    values[$"SGF:{extra.Field}"] = val;
            }

            return values;
        }
开发者ID:clearfunction,项目名称:bvcms,代码行数:48,代码来源:SGMapModel.cs

示例12: FetchEntities

 private void FetchEntities(int aid, int? pid)
 {
     var q = from attend in Db.Attends
             where attend.AttendId == aid
             let p = Db.People.SingleOrDefault(pp => pp.PeopleId == pid)
             select new
             {
                 attend,
                 org = attend.Organization,
                 person = p,
             };
     var i = q.SingleOrDefault();
     org = i.org;
     this.attend = i.attend;
     person = i.person;
 }
开发者ID:stevesloka,项目名称:bvcms,代码行数:16,代码来源:VolSubModel.cs

示例13: OrderedClasses

 public static List<Organization> OrderedClasses(Organization masterorg)
 {
     if (masterorg == null)
         throw new Exception("masterorg is null in OrderedClasses");
     var cklist = masterorg.OrgPickList.Split(',').Select(oo => oo.ToInt()).ToList();
     var list = UserSelectClasses(masterorg).ToList();
     var d = new Dictionary<int, int>();
     var n = 0;
     foreach (var i in cklist)
         d.Add(n++, i);
     list = (from o in list
             join i in d on o.OrganizationId equals i.Value into j
             from i in j
             orderby i.Key
             select o).ToList();
     return list;
 }
开发者ID:rossspoon,项目名称:bvcms,代码行数:17,代码来源:SelectLists.cs

示例14: ClassName

        private static string ClassName(Organization o)
        {
            var lead = o.LeaderName;
            if (lead.HasValue())
                lead = ": " + lead;
            var loc = o.Location;
            if (loc.HasValue())
                loc = $" ({loc})";
            var dt1 = o.FirstMeetingDate;
            var dt2 = o.LastMeetingDate;
            var dt = "";
            if (dt1.HasValue && dt2.HasValue)
                dt = $", {dt1:MMM d}-{dt2:MMM d}";
            else if (dt1.HasValue)
                dt = $", {dt1:MMM d}";

            return o.OrganizationName + lead + dt + loc;
        }
开发者ID:stevesloka,项目名称:bvcms,代码行数:18,代码来源:SelectLists.cs

示例15: Classes

 public static List<ClassInfo> Classes(Organization masterorg, int id)
 {
     var q = from o in OrderedClasses(masterorg)
             let hasroom = (o.ClassFilled ?? false) == false && ((o.Limit ?? 0) == 0 || o.Limit > (o.MemberCount ?? 0))
             where o.RegistrationTypeId > 0
             select new ClassInfo
             {
                 Id = o.OrganizationId,
                 Text = ClassName(o),
                 selected = o.OrganizationId == id,
                 filled = !hasroom
             };
     var list = q.ToList();
     if (list.Count == 1)
         return list;
     list.Insert(0, new ClassInfo { Text = "Registration Options", Id = 0});
     return list;
 }
开发者ID:rossspoon,项目名称:bvcms,代码行数:18,代码来源:SelectLists.cs


注:本文中的CmsData.Organization类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。