//IBILLService实现,本类在web项目节配置加载///[Serializable]publicclassBillServer:IBILLService
{publicBillServer()
{
System.Diagnostics.Debug.WriteLine("CreateOrderService");
}//事件检索字典(不一定非要这么设计,不过个人感觉这么方便触发事件比较简单而且容易被配置化)///不过这么做事件子可以被映射一次如果需要映射多次自己改///Dictionary>_EventList=newDictionary>();//事件触发函数/publicvoidRaiseEvent(stringname,GuidinstanceId)
{if(_EventList[name]!=null)
{
EventHandlereventHand=_EventList[name];
ExternalDataEventArgsede=newExternalDataEventArgs(instanceId);//ede.WorkItem=parms;eventHand(this,ede);
}
}#regionIBILLService成员publiceventEventHandlerBillInitMoneyMin
{
add
{
_EventList.Add("BillInitMoneyMin",value);
}
remove
{
_EventList.Remove("BillInitMoneyMin");
}
}publiceventEventHandlerBillInitMoneyMax
{
add
{
_EventList.Add("BillInitMoneyMax",value);
}
remove
{
_EventList.Remove("BillInitMoneyMax");
}
}publiceventEventHandlerBillUpdated
{
add
{
_EventList.Add("BillUpdated",value);
}
remove
{
_EventList.Remove("BillUpdated");
}
}publiceventEventHandlerBillNext
{
add
{
_EventList.Add("BillNext",value);
}
remove
{
_EventList.Remove("BillNext");
}
}publiceventEventHandlerBillCanceled
{
add
{
_EventList.Add("BillCanceled",value);
}
remove
{
_EventList.Remove("BillCanceled");
}
}publiceventEventHandlerBillWait
{
add
{
_EventList.Add("BillWait",value);
}
remove
{
_EventList.Remove("BillWait");
}
}publiceventEventHandlerBillInsert
{
add
{
_EventList.Add("BillInsert",value);
}
remove
{
_EventList.Remove("BillInsert");
}
}#endregion}