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


C# CmsData.Person类代码示例

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


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

示例1: Email

 public void Email(MailAddress fromAddress, Person p, List<MailAddress> addmail, string subject, string body, bool redacted)
 {
     var emailqueue = new EmailQueue
     {
         Queued = DateTime.Now,
         FromAddr = fromAddress.Address,
         FromName = fromAddress.DisplayName,
         Subject = subject,
         Body = body,
         QueuedBy = Util.UserPeopleId,
         Redacted = redacted,
         Transactional = true
     };
     EmailQueues.InsertOnSubmit(emailqueue);
     string addmailstr = null;
     if (addmail != null)
         addmailstr = addmail.EmailAddressListToString();
     emailqueue.EmailQueueTos.Add(new EmailQueueTo
     {
         PeopleId = p.PeopleId,
         OrgId = CurrentOrgId,
         AddEmail = addmailstr,
         Guid = Guid.NewGuid(),
     });
     SubmitChanges();
     SendPersonEmail(emailqueue.Id, p.PeopleId);
 }
开发者ID:GSBCfamily,项目名称:bvcms,代码行数:27,代码来源:Emailer.cs

示例2: PersonFamilyModel

 public PersonFamilyModel(int id)
 {
     person = DbUtil.Db.LoadPersonById(id);
     Pager = new PagerModel2(Count);
     Pager.pagesize = 10;
     Pager.ShowPageSize = false;
 }
开发者ID:rossspoon,项目名称:bvcms,代码行数:7,代码来源:FamilyModel.cs

示例3: CreateTask

 public void CreateTask(int forPeopleId, Person p, string description)
 {
     var t = p.AddTaskAbout(db, forPeopleId, description);
     db.SubmitChanges();
     db.Email(db.Setting("AdminMail", "[email protected]"), db.LoadPersonById(forPeopleId),
         "TASK: " + description,
         Task.TaskLink(db, description, t.Id) + "<br/>" + p.Name);
 }
开发者ID:stevesloka,项目名称:bvcms,代码行数:8,代码来源:Person.cs

示例4: MemberInfo

 public MemberInfo(int id)
     : this()
 {
     person = Db.LoadPersonById(id);
     if (person == null)
         return;
     this.CopyPropertiesFrom(person);
 }
开发者ID:hkouns,项目名称:bvcms,代码行数:8,代码来源:MemberInfo.cs

示例5: UpdateMemberNotes

        public void UpdateMemberNotes()
        {
            person = DbUtil.Db.LoadPersonById(PeopleId);
            this.CopyPropertiesTo(person);

            DbUtil.Db.SubmitChanges();
            DbUtil.LogActivity($"Updated Growth: {person.Name}");
        }
开发者ID:stevesloka,项目名称:bvcms,代码行数:8,代码来源:MemberNotesModel.cs

示例6: CreateTask

 // List of api functions to call from Python
 public void CreateTask(int forPeopleId, Person p, string description)
 {
     DbUtil.LogActivity("Adding Task about: {0}".Fmt(p.Name));
     var t = p.AddTaskAbout(Db, forPeopleId, description);
     Db.SubmitChanges();
     Db.Email(DbUtil.SystemEmailAddress, DbUtil.Db.LoadPersonById(forPeopleId),
         "TASK: " + description,
         Task.TaskLink(Db, description, t.Id) + "<br/>" + p.Name);
 }
开发者ID:rossspoon,项目名称:bvcms,代码行数:10,代码来源:PythonEvents.cs

示例7: MessageReplacements

 public static string MessageReplacements(CMSDataContext db, Person p, string DivisionName, string OrganizationName, string Location, string message)
 {
     message = message.Replace("{first}", p.PreferredName, ignoreCase: true);
     message = message.Replace("{name}", p.Name, ignoreCase: true);
     message = message.Replace("{division}", DivisionName, ignoreCase: true);
     message = message.Replace("{org}", OrganizationName, ignoreCase: true);
     message = message.Replace("{location}", Location, ignoreCase: true);
     message = message.Replace("{cmshost}", db.CmsHost, ignoreCase: true);
     return message;
 }
开发者ID:rossspoon,项目名称:bvcms,代码行数:10,代码来源:APIOrganization.cs

示例8: Page_Load

 protected void Page_Load(object sender, EventArgs e)
 {
     var id = this.QueryString<int>("id");
     person = DbUtil.Db.People.Single(p => p.PeopleId == id);
     if (person.Picture == null)
         person.Picture = new Picture();
     if (!IsPostBack)
         HiddenField1.Value = "large";
     if (DbUtil.Db.UserPreference("newlook3", "false").ToBool() && DbUtil.Db.UserPreference("newpeoplepage", "false").ToBool())
         HyperLink2.NavigateUrl = "~/Person2/" + id.ToString();
     else
         HyperLink2.NavigateUrl = "~/Person2/" + id.ToString();
     HyperLink2.Text = "Return to: " + person.Name;
 }
开发者ID:vs06,项目名称:bvcms,代码行数:14,代码来源:UploadPicture.aspx.cs

示例9: FieldEqual

 public bool FieldEqual(Person p, string field, string value)
 {
     if (value is string)
         value = ((string)value).TrimEnd();
     if (!Util.HasProperty(p, field))
         return false;
     var o = Util.GetProperty(p, field);
     if (o is string)
         o = ((string)o).TrimEnd();
     var p2 = new Person();
     Util.SetPropertyFromText(p2, field, value);
     var o2 = Util.GetProperty(p2, field);
     if (o == o2)
         return true;
     if (o.IsNull() && o2.IsNotNull())
         return false;
     return o.Equals(o2);
 }
开发者ID:vs06,项目名称:bvcms,代码行数:18,代码来源:PersonModel.cs

示例10: AddPerson

        public void AddPerson(Person p, int entrypoint)
        {
            Family f;
            if (p == null)
                f = new Family
                {
                    AddressLineOne = AddressLineOne,
                    AddressLineTwo = AddressLineTwo,
                    CityName = City,
                    StateCode = State,
                    ZipCode = ZipCode,
                    CountryName = Country,
                    HomePhone = Phone.GetDigits().Truncate(20),
                };
            else
                f = p.Family;
            DbUtil.Db.SubmitChanges();

            var position = DbUtil.Db.ComputePositionInFamily(age, married == 20 , f.FamilyId) ?? 10;
            _person = Person.Add(f, position,
                null, FirstName.Trim(), null, LastName.Trim(), DateOfBirth, married == 20, gender ?? 0,
                    OriginCode.Enrollment, entrypoint);
            person.EmailAddress = EmailAddress.Trim();
            person.SendEmailAddress1 = true;
            person.CampusId = DbUtil.Db.Setting("DefaultCampusId", "").ToInt2();
            person.CellPhone = Phone.GetDigits().Truncate(20);

            if (count == 0)
                person.Comments = "Added during online registration because record was not found";
            else if(count > 1)
                person.Comments = "Added during online registration because there was more than 1 match";

            DbUtil.Db.SubmitChanges();
            DbUtil.Db.Refresh(RefreshMode.OverwriteCurrentValues, person);
            PeopleId = person.PeopleId;
            Log("AddPerson");
        }
开发者ID:vanutama,项目名称:bvcms,代码行数:37,代码来源:AddNew.cs

示例11: detach_People

		private void detach_People(Person entity)
		{
			this.SendPropertyChanging();
			entity.BaptismType = null;
		}
开发者ID:stevesloka,项目名称:bvcms,代码行数:5,代码来源:BaptismType.cs

示例12: AddPerson

        internal void AddPerson(int originid, int? entrypointid, int? campusid)
        {
            Family f;
            string na = "na";
            if (FamilyId > 0)
                f = family;
            else
                f = new Family
                        {
                            HomePhone = homephone.GetDigits(),
                            AddressLineOne = address.Disallow(na),
                            AddressLineTwo = address2,
                            CityName = city.Disallow(na),
                            StateCode = state.Disallow(na),
                            ZipCode = zip.Disallow(na),
                            CountryName = country,
                        };

            if (goesby != null)
                goesby = goesby.Trim();
            var position = PositionInFamily.Child;
            if (!birthday.HasValue)
                position = PositionInFamily.PrimaryAdult;
            if (age >= 18)
                if (f.People.Count(per =>
                                   per.PositionInFamilyId == PositionInFamily.PrimaryAdult)
                    < 2)
                    position = PositionInFamily.PrimaryAdult;
                else
                    position = PositionInFamily.SecondaryAdult;

            _Person = Person.Add(f, position,
                                 null, first.Trim(), goesby, last.Trim(), dob, false, gender,
                                 originid, entrypointid);
            if (title.HasValue())
                person.TitleCode = title;
            person.EmailAddress = email.Disallow(na);
            person.MaritalStatusId = marital;
            person.SuffixCode = suffix;
            person.MiddleName = middle;
            if (campusid == 0)
                campusid = null;
            person.CampusId = Util.PickFirst(campusid.ToString(), DbUtil.Db.Setting("DefaultCampusId", "")).ToInt2();
            if (person.CampusId == 0)
                person.CampusId = null;

            person.CellPhone = phone.GetDigits();
            DbUtil.Db.SubmitChanges();
            DbUtil.LogActivity("OldUI AddPerson {0}".Fmt(person.PeopleId));
            DbUtil.Db.Refresh(RefreshMode.OverwriteCurrentValues, person);
            PeopleId = person.PeopleId;
        }
开发者ID:hkouns,项目名称:bvcms,代码行数:52,代码来源:SearchPersonModel.cs

示例13: attach_People

 private void attach_People(Person entity)
 {
     this.SendPropertyChanging();
     entity.MemberLetterStatus = this;
 }
开发者ID:rossspoon,项目名称:bvcms,代码行数:5,代码来源:MemberLetterStatus.cs

示例14: attach_People

		private void attach_People(Person entity)
		{
			this.SendPropertyChanging();
			entity.Family = this;
		}
开发者ID:stevesloka,项目名称:bvcms,代码行数:5,代码来源:Family.cs

示例15: detach_People

		private void detach_People(Person entity)
		{
			this.SendPropertyChanging();
			entity.Family = null;
		}
开发者ID:stevesloka,项目名称:bvcms,代码行数:5,代码来源:Family.cs


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