本文整理汇总了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;
}
示例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;
}