• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# People类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: PopulatePeopleList

	private void PopulatePeopleList(People peoples)
	{
		if (cellPrefab == null || tableView == null)
		{	
			return;
		}
		
		foreach (var item in peoples.data)
		{
			var go = (GameObject)Instantiate(cellPrefab);
			go.transform.parent = tableView.transform;
			go.transform.localScale = Vector3.one;
			go.transform.localRotation = Quaternion.identity;
			go.transform.localPosition = Vector3.zero;
			
			var info = go.GetComponent<UserInfo>();
			
			if (info != null)
			{
				info.SetLabel(item.fullname);
				info.FetchPicture(item.picture);
				info.SetUserObject(item);
				info.OnClicked = OnClicked;
				cells.Add(info);
			}
		}
		
		if (tableView != null)
		{
			tableView.repositionNow = true;
		}
	}
开发者ID:azanium,项目名称:Klumbi-Unity,代码行数:32,代码来源:SearchViewController.cs


示例2: BtAddPeople

 protected void BtAddPeople(object sender, EventArgs e)
 {
     hfPeoplesViewState.Value = "";
     UpdateGrid();
     if (!string.IsNullOrEmpty(tbltype.Text) && !string.IsNullOrEmpty(tblsubtype.Text) && !string.IsNullOrEmpty(tbllastname.Text) && !string.IsNullOrEmpty(tblfirstname.Text) && !string.IsNullOrEmpty(tblmiddlename.Text) && !string.IsNullOrEmpty(tblpost.Text) && !string.IsNullOrEmpty(tblemail1.Text) && !string.IsNullOrEmpty(tblemail2.Text) && !string.IsNullOrEmpty(tblroom.Text) && !string.IsNullOrEmpty(tblphone1.Text) && !string.IsNullOrEmpty(tblphone2.Text) && !string.IsNullOrEmpty(tblphone3.Text))
     {
         var id = Peoples.Count > 0 ? Peoples.Max(x => x.p_Id) + 1 : 1;
         var p = new People
         {
             p_Id = id,
             p_type = tbltype.Text,
             p_subtype = tblsubtype.Text,
             p_lastname = tbllastname.Text,
             p_firstname = tblfirstname.Text,
             p_middlename = tblmiddlename.Text,
             p_post = tblpost.Text,
             p_email1 = tblemail1.Text,
             p_email2 = tblemail2.Text,
             p_room = tblroom.Text,
             p_phone1 = tblphone1.Text,
             p_phone2 = tblphone2.Text,
             p_phone3 = tblphone3.Text
         };
         Peoples.Add(p);
         comm_sqlDataContext mylinq = new comm_sqlDataContext();
         int bb = mylinq.addrow(tbltype.Text, tblsubtype.Text, tbllastname.Text, tblfirstname.Text, tblmiddlename.Text, tblpost.Text, tblemail1.Text, tblemail2.Text, tblroom.Text, tblphone1.Text, tblphone2.Text, tblphone3.Text);
         UpdateGrid();
         Button3.Style.Add("display", "none");
     }
 }
开发者ID:kreeeeg,项目名称:site,代码行数:30,代码来源:test.aspx.cs


示例3: WritePerson

    public void WritePerson(People p)
    {
        this.p = p;

        SqlTransaction tran = null;

        SqlCommand pCmd = WritePerson();
        SqlCommand aCmd = WriteAddress();

        connect.Open();
        try
        {
            tran = connect.BeginTransaction();
            pCmd.Transaction = tran;
            aCmd.Transaction = tran;
            pCmd.ExecuteNonQuery();
            aCmd.ExecuteNonQuery();

            tran.Commit();
        }
        catch (Exception ex)
        {
            tran.Rollback();
            throw ex;
        }
        finally
        {
            connect.Close();
        }
    }
开发者ID:Jaimer7880,项目名称:AssignmentFour,代码行数:30,代码来源:ManagePeople.cs


示例4: SelectSortedStatic

        public static Person[] SelectSortedStatic (People people, string sort)
        {
            if (people == null)
            {
                return new Person[0];
            }


            List<Person> pList = new List<Person>();
            Person[] foundPersons = SelectStatic((People)people);
            foreach (Person pers in foundPersons)
            {
                pList.Add(pers);
            }

            switch (sort)
            {
                case "PersonId": pList.Sort(PersonIdComparison); break;
                case "Name": pList.Sort(NameComparison); break;
                case "PostalCode": pList.Sort(PostalCodeComparison); break;
                case "CityName": pList.Sort(CityComparison); break;
                case "Birthdate": pList.Sort(BirthdateComparison); break;

                // New sortexpressions
                case "Email": pList.Sort(EmailComparison); break;
                case "Phone": pList.Sort(PhoneComparison); break;
            }

            return pList.ToArray();
        }
开发者ID:SwarmCorp,项目名称:Swarmops,代码行数:30,代码来源:PeopleDataObject.cs


示例5: MakeDonation

    public void MakeDonation(People p)
    {
        this.p = p;
        SqlTransaction tran = null;

        SqlCommand mCmd = MakeDonations();

        connect.Open();

        try
        {
            tran = connect.BeginTransaction();
            mCmd.Transaction = tran;
            mCmd.ExecuteNonQuery();

            tran.Commit();
        }
        catch (Exception ex)
        {
            tran.Rollback();
            throw ex;
        }
        finally
        {
            connect.Close();
        }
    }
开发者ID:Jaimer7880,项目名称:AssignmentFour,代码行数:27,代码来源:ManagePeople.cs


示例6: NewsletterTransmitter2

 public NewsletterTransmitter2 (string title, string htmlTemplateFile, string textTemplateFile, People sendList)
 {
     this.title = title;
     this.htmlTemplateFile = htmlTemplateFile;
     this.textTemplateFile = textTemplateFile;
     this.sendList = sendList;
 }
开发者ID:SwarmCorp,项目名称:Swarmops,代码行数:7,代码来源:NewsletterTransmitter.cs


示例7: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            Response.ContentType = "application/json";

            string pattern = Request.QueryString["namePattern"];

            People matches = People.FromNamePattern(pattern);

            matches = Authorization.FilterPeopleToMatchAuthority(matches, CurrentUser.GetAuthority());

            if (matches == null)
            {
                matches = new People();
            }

            if (matches.Count > 10)
            {
                matches.RemoveRange(10, matches.Count - 10);
            }

            List<string> jsonPeople = new List<string>();

            foreach (Person person in matches)
            {
                string onePerson = '{' + String.Format("\"id\":\"{0}\",\"name\":\"{1}\",\"avatar16Url\":\"{2}\"", person.Identity, JsonSanitize(person.Canonical), person.GetSecureAvatarLink(16)) + '}';
                jsonPeople.Add(onePerson);
            }

            string result = '[' + String.Join(",", jsonPeople.ToArray()) + ']';

            Response.Output.WriteLine(result);

            Response.End();
        }
开发者ID:SwarmCorp,项目名称:Swarmops,代码行数:34,代码来源:Json-SearchPeoplePattern.aspx.cs


示例8: Get

 public PeopleResponse Get(People request)
 {
     return new PeopleResponse
     {
         People = _peopleRepository.GetPeople()
     };
 }
开发者ID:rossipedia,项目名称:ServiceStack.OnionSample,代码行数:7,代码来源:PeopleService.cs


示例9: PostMessage

        private void PostMessage(string Message, People person)
        {
            Log.Debug (TAG, Message);
            ChatMessages.Add ( new ChatMessage( Message, person) );

            listAdapter = new ChatAdapter(this, ChatMessages.ToArray());
            listView.Adapter = listAdapter;
        }
开发者ID:leonsbuddydave,项目名称:Backtalk,代码行数:8,代码来源:Chat.cs


示例10: SelectStatic

        public static Person[] SelectStatic (People people)
        {
            if (people == null)
            {
                return new Person[0];
            }

            return people.ToArray();
        }
开发者ID:SwarmCorp,项目名称:Swarmops,代码行数:9,代码来源:PeopleDataObject.cs


示例11: btnAddPerson_Click

    protected void btnAddPerson_Click(object sender, EventArgs e)
    {
        string strForename = txtForename.Text;
        string strSurname = txtSurname.Text;
        if (string.IsNullOrEmpty(strSurname))
        {
            MessageLabel.Text = "The Surname must be provided";
        }
        else
        {
            MembershipUser userInfo = Membership.GetUser();
            Guid user_ID = (Guid)userInfo.ProviderUserKey;

            Person_Address_ID = Common.Person_Address_ID;
            if (!string.IsNullOrEmpty(Person_Address_ID))
            {
                Guid address_ID = new Guid(Person_Address_ID);

                People person = new People();
                person.Person_Title = txtTitle.Text;
                person.Person_Forename = txtForename.Text;
                person.Person_Surname = txtSurname.Text;
                person.Address_ID = address_ID;
                person.Person_Mobile = txtMobile.Text;
                person.Person_Landline = txtLandline.Text;
                person.Person_Email = txtEmail.Text;

                Guid? person_ID = person.Insert_Person(user_ID);

                if (person_ID != null)
                {
                    Person_ID = person_ID.ToString();
                    MessageLabel.Text = string.Format("{0} {1} {2} was added successfully", person.Person_Title, person.Person_Forename, person.Person_Surname);
                    //ClearEntryFields();
                    if (!string.IsNullOrEmpty(btnReturn.PostBackUrl))
                        DivReturn.Visible = true;

                    DivAddPerson.Visible = false;
                    divNewPerson.Visible = true;
                    divUpdatePerson.Visible = true;
                    PopulatePersonGridView(null, 1);
                    StoreCommon();
                }
                else
                {
                    DivAddPerson.Visible = true;
                    divNewPerson.Visible = false;
                    divUpdatePerson.Visible = false;
                }
            }
            else
            {
                MessageLabel.Text = "You must provide an Address for this person";
            }
        }
    }
开发者ID:BadgerTadger,项目名称:DSMWeb,代码行数:56,代码来源:PersonSetup.aspx.cs


示例12: MailTransmitter

 public MailTransmitter (string fromName, string fromAddress, string subject, string bodyPlain, People recipients,
                         bool toOfficers)
 {
     this.fromName = fromName;
     this.fromAddress = fromAddress;
     this.subject = subject;
     this.bodyPlain = bodyPlain;
     this.recipients = recipients;
     this.toOfficers = toOfficers;
 }
开发者ID:SwarmCorp,项目名称:Swarmops,代码行数:10,代码来源:MailTransmitter.cs


示例13: Newsletter

 public Newsletter (int templateId, string senderName, string senderAddress, string title, string body,
                    People recipients)
 {
     this.TemplateId = templateId;
     this.SenderName = senderName;
     this.SenderAddress = senderAddress;
     this.Title = title;
     this.Body = body;
     this.Recipients = recipients;
 }
开发者ID:SwarmCorp,项目名称:Swarmops,代码行数:10,代码来源:Newsletter.cs


示例14: CheckPeople

 private void CheckPeople(People p)
 {
     var amountPersons = p.Person.Length;
       Assert.AreEqual(amountPersons, people.Person.Length);
       for (var i = 0; i < amountPersons; i++)
       {
     Assert.AreEqual(p.Person[i].FIO, people.Person[i].FIO);
     Assert.AreEqual(p.Person[i].Salary, people.Person[i].Salary);
     Assert.AreEqual(p.Person[i].SalaryDate, people.Person[i].SalaryDate);
       }
 }
开发者ID:DiscoDancer,项目名称:Study,代码行数:11,代码来源:XmlSerializationTest.cs


示例15: execute

 public void execute()
 {
     PopulateList(10);
     People peopleList = new People(personList);
     var enumerator = peopleList.GetEnumerator();
     Console.WriteLine("NAME\tID\tLOCATION\n");
     while (enumerator.MoveNext())
     {
         Person per = (Person)enumerator.Current;
         Console.WriteLine(String.Format("{0}\t{1}\t{2}", per.name,per.id,per.location));
     }
 }
开发者ID:ctsxamarintraining,项目名称:cts451785,代码行数:12,代码来源:PersonLinkedList.cs


示例16: OnTriggerEnter2D

	void OnTriggerEnter2D(Collider2D coll) {
		if (people == null) {
			people = gameObject.GetComponentInParent<People> ();
		}
		if (people.tag == "Player" && coll.gameObject.tag == "Gold") {
			goldCollector.collectGold();
			Destroy(coll.gameObject);
		} else if (people.tag == "Chaser" && coll.gameObject.tag == "Gold" && !coll.gameObject.GetComponent<Gold>().disableForChaser) {
			(people as Chaser).collectGold();
			Destroy(coll.gameObject);
		}
	}
开发者ID:bobo1993324,项目名称:lodeRunnerRemakeFor494Class,代码行数:12,代码来源:RunnerGoldCollider.cs


示例17: InsertPeople

        public string InsertPeople(string FullName, int Age)
        {
            var objPeople = new People();
            objPeople.FullName = FullName;
            objPeople.Age = Age;
            objPeople.CreatedDate = DateTime.Now;
            objPeople.ModifiedDate = DateTime.Now;

            PeopleProvider.InsertPeople(objPeople);

            return JsonConvert.SerializeObject(objPeople);
        }
开发者ID:alfaruq,项目名称:WebSvc,代码行数:12,代码来源:PeopleServices.asmx.cs


示例18: BetegMainController

        public BetegMainController(MungoSystem db, People people)
        {
            dbController = new DBController(db);

            betegAdatok = dbController.getBetegAdatok(people.PeopleID);
            betegAdatok.Kortortenet = dbController.getKortortenetekByBetegId(betegAdatok.betegekElem.BetegID);
            betegAdatok.idopontok = dbController.getAllIdopont();
            var p = dbController.getPossibleIdopont(betegAdatok.BetegID);
            betegAdatok.changed();
            idopontCreator = new IdopontCreator(betegAdatok.BetegID);
            SetView(ViewTypes.Idopont);
        }
开发者ID:piadba,项目名称:SZT2-MaganKorhaz,代码行数:12,代码来源:BetegMainController.cs


示例19: OnTriggerExit

 void OnTriggerExit(Collider stuff)
 {
     if(stuff.tag=="People")
     {
         close=false;
         person=null;
     }
     if(stuff.tag=="Holder")
     {
         CanPut=false;
         hold=null;
     }
 }
开发者ID:RyotaRaven,项目名称:LD29,代码行数:13,代码来源:SeeHeart.cs


示例20: OnTriggerEnter

 void OnTriggerEnter(Collider stuff)
 {
     if(stuff.tag=="People")
     {
         close=true;
         person=stuff.GetComponent<People>();
     }
     if(stuff.tag=="Holder")
     {
         CanPut=true;
         hold=stuff.GetComponent<Sparkles>();
     }
 }
开发者ID:RyotaRaven,项目名称:LD29,代码行数:13,代码来源:SeeHeart.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Peptide类代码示例发布时间:2022-05-24
下一篇:
C# Pen类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap