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


C# model.DeleteBoat方法代码示例

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


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

示例1: RemoveBoatFromList

 public void RemoveBoatFromList(model.Member member, int i)
 {
     member.DeleteBoat(GetBoat(member, i - 1));
     c_dc.UpdateDataStorage();
 }
开发者ID:Holmewi,项目名称:1dv607-jh222qr-workshops,代码行数:5,代码来源:UserController.cs

示例2: DoDelegateBoatOperation

        /**
         * Checks boat menu option and delegates control to specialized functions
         */
        private void DoDelegateBoatOperation(model.Member member)
        {
            m_memberView.ShowMembersBoats();
            if (!member.HasNoBoatsRegistered())
            {
                model.Boat boatToHandle = m_memberView.GetMembersBoatToDisplay();
                m_boatView.ShowVerboseBoat(boatToHandle);
                view.BoatOperation operation = m_boatView.GetWhatToDoWithBoat();

                switch (operation)
                {
                    case view.BoatOperation.Edit:
                        m_boatController.DoEditBoat(boatToHandle);
                        break;
                    case view.BoatOperation.Delete:
                        member.DeleteBoat(boatToHandle);
                        m_baseView.PrintMessage("Boat deleted");
                        break;
                    case view.BoatOperation.Back:
                        break;
                    default:
                        break;
                }
            }
            else
            {
                m_baseView.GetKeyPress();
            }
            m_list.SaveMemberList();
        }
开发者ID:kk222hk,项目名称:1dv607-kk222hk-Portfolio,代码行数:33,代码来源:HandleMembers.cs

示例3: DeleteBoat

        // Display view to delete a boat (pick boat, confirmation window), delete the boat from the member
        private void DeleteBoat(model.Member member)
        {
            if (member.Boats.Count() == 0)
            {
                DoMemberView(member);
            }
            else
            {
                try
                {
                    model.Boat boatToDelete = _boatView.GetBoatToEditOrDelete(member, "delete");
                    if (_boatView.ConfirmDelete() == true)
                    {
                        member.DeleteBoat(boatToDelete);
                        _list.SaveMemberList();
                    }

                    DoMemberView(member);
                }
                catch (Exception ex)
                {
                    _boatView.DisplayErrorMessage(ex.Message);
                    _boatView.PressKeyToContinue();
                    DoMemberView(member);
                }
            }
        }
开发者ID:dt222cc,项目名称:1dv607-dt222cc,代码行数:28,代码来源:RegistryController.cs


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