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


C# Service.Run方法代码示例

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


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

示例1: OnRunReferenceItemDialog

    protected void OnRunReferenceItemDialog(object sender, Reference.RunReferenceItemDlgEventArgs e)
    {
        ResponseType Result;
        switch (e.TableName) {
        case "meter_types":
            MeterType MeterTypeEdit = new MeterType (e.NewItem);
            if (!e.NewItem)
                MeterTypeEdit.Fill (e.ItemId);
            MeterTypeEdit.Show ();
            Result = (ResponseType)MeterTypeEdit.Run ();
            MeterTypeEdit.Destroy ();
            break;
        case "contact_persons":
            Contact ContactEdit = new Contact ();
            ContactEdit.NewContact = e.NewItem;
            if (!e.NewItem)
                ContactEdit.ContactFill (e.ItemId);
            ContactEdit.Show ();
            Result = (ResponseType)ContactEdit.Run ();
            ContactEdit.Destroy ();
            break;
        case "lessees":
            lessee LesseeEdit = new lessee ();
            LesseeEdit.NewLessee = e.NewItem;
            if (!e.NewItem)
                LesseeEdit.LesseeFill (e.ItemId);
            LesseeEdit.Show ();
            Result = (ResponseType)LesseeEdit.Run ();
            LesseeEdit.Destroy ();
            break;
        case "services":
            Service ServiceEdit = new Service ();
            ServiceEdit.NewService = e.NewItem;
            if (!e.NewItem)
                ServiceEdit.ServiceFill (e.ItemId);
            ServiceEdit.Show ();
            Result = (ResponseType)ServiceEdit.Run ();
            ServiceEdit.Destroy ();
            break;
        case "cash":
            Cash CashEdit = new Cash ();
            CashEdit.NewItem = e.NewItem;
            if (!e.NewItem)
                CashEdit.Fill (e.ItemId);
            CashEdit.Show ();
            Result = (ResponseType)CashEdit.Run ();
            CashEdit.Destroy ();
            break;

        default:
            Result = ResponseType.None;
            break;
        }
        e.Result = Result;
    }
开发者ID:QualitySolution,项目名称:Bazar,代码行数:55,代码来源:MainWindow.cs

示例2: OnRunReferenceItemDialog

    protected void OnRunReferenceItemDialog(object sender, Reference.RunReferenceItemDlgEventArgs e)
    {
        ResponseType Result;
        switch (e.TableName)
        {
            case "models":
                CarModel ItemModel = new CarModel();
                if(e.NewItem)
                    ItemModel.NewItem = true;
                else
                    ItemModel.Fill(e.ItemId);
                ItemModel.Show();
                Result = (ResponseType)ItemModel.Run();
                ItemModel.Destroy();
                break;
            case "status":
                Status StatusEdit = new Status();
                if(e.NewItem)
                    StatusEdit.NewItem = true;
                else
                    StatusEdit.Fill(e.ItemId);
                StatusEdit.Show();
                Result = (ResponseType)StatusEdit.Run();
                StatusEdit.Destroy();
                break;
            case "services":
                Service ServiceEdit = new Service();
                if(e.NewItem)
                    ServiceEdit.NewItem = true;
                else
                    ServiceEdit.Fill(e.ItemId);
                ServiceEdit.Show();
                Result = (ResponseType)ServiceEdit.Run();
                ServiceEdit.Destroy();
                break;
            case "stocks":
                OrderStock StocksEdit = new OrderStock();
                if(e.NewItem)
                    StocksEdit.NewItem = true;
                else
                    StocksEdit.Fill(e.ItemId);
                StocksEdit.Show();
                Result = (ResponseType)StocksEdit.Run();
                StocksEdit.Destroy();
                break;

            default:
                Result = ResponseType.None;
                break;
        }
        e.Result = Result;
    }
开发者ID:QualitySolution,项目名称:CarGlass,代码行数:52,代码来源:MainWindow.cs


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