本文整理汇总了C#中Contact.Run方法的典型用法代码示例。如果您正苦于以下问题:C# Contact.Run方法的具体用法?C# Contact.Run怎么用?C# Contact.Run使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Contact
的用法示例。
在下文中一共展示了Contact.Run方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnPlaceOpenContact
protected virtual void OnPlaceOpenContact(object o, EventArgs args)
{
int result, itemid;
TreeIter iter;
treeviewPlaces.Selection.GetSelected(out iter);
itemid = Convert.ToInt32(PlaceSort.GetValue(iter, (int)PlaceCol.contact_id));
Contact winContact = new Contact();
winContact.ContactFill(itemid);
winContact.Show();
result = winContact.Run();
winContact.Destroy();
if((ResponseType)result == ResponseType.Ok)
{
UpdatePlaces();
}
}
示例2: 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;
}