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


C# model.GetMemberID方法代码示例

本文整理汇总了C#中model.GetMemberID方法的典型用法代码示例。如果您正苦于以下问题:C# model.GetMemberID方法的具体用法?C# model.GetMemberID怎么用?C# model.GetMemberID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在model的用法示例。


在下文中一共展示了model.GetMemberID方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DisplayMember

        /// <summary>
        /// Display a member to the user
        /// </summary>
        /// <param name="a_member">model.Member. The member to be displayed</param>
        /// <param name="showPNumber">bool. True if the Personal Number should be displayed, false otherwise</param>
        /// <param name="showBoats">bool. True if the boats the user owns should be displayed, false if only the number of boats owned should be displayed</param>
        public void DisplayMember(model.Member a_member, bool showPNumber, bool showBoats)
        {
            System.Console.WriteLine("---");
            System.Console.WriteLine("MemberID: {0}", a_member.GetMemberID());
            System.Console.WriteLine("Name: {0}", a_member.GetName());

            if (showPNumber)
            {
                System.Console.WriteLine("Personal Number: {0}", a_member.GetPNumber());
            }

            List<model.Boat> boats = a_member.GetBoatList().GetBoats();

            if (boats.Count > 0)
            {
                if (showBoats)
                {
                    System.Console.WriteLine("Boats:");

                    foreach (model.Boat boat in boats)
                    {
                        DisplayBoat(boat);
                    }
                }
                else
                {
                    System.Console.WriteLine("Boats: {0}", boats.Count);
                }
            }
        }
开发者ID:dv222bk,项目名称:1DV607_Portfolio,代码行数:36,代码来源:Console.cs

示例2: EditMember

 /// <summary>
 /// Edit a specific member menu
 /// </summary>
 /// <param name="a_member">model.Member, the member to be edited</param>
 private void EditMember(model.Member a_member)
 {
     m_console.EditMember(a_member);
     m_console.WriteMessage("New Name: ");
     string name = m_console.ReadResponse();
     string pNumber;
     while (true)
     {
         m_console.WriteMessage("New Personal Number: ");
         pNumber = m_console.ReadResponse();
         if (pNumber.All(char.IsNumber) && pNumber.Length == 12 && long.Parse(pNumber) >= 100000000000)
         {
             break;
         }
         m_console.WriteMessage("Wrong format, format should be YYYYMMDDXXXX");
     }
     m_memberList.ChangeMemberInfo(a_member.GetMemberID(), name, long.Parse(pNumber));
     m_console.SetCurrentMenu(view.Console.CurrentMenu.Member);
     GoToCurrentMenu(a_member);
 }
开发者ID:dv222bk,项目名称:1DV607_Portfolio,代码行数:24,代码来源:User.cs


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