You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.1 KiB
42 lines
1.1 KiB
using System;
|
|
using ICSSoft.Frame.DataConnect;
|
|
using ICSSoft.Frame.Data.Entity;
|
|
|
|
namespace ICSSoft.Frame.DataConnect.Action
|
|
{
|
|
/// <summary>
|
|
/// Class1 µÄժҪ˵Ã÷¡£
|
|
/// </summary>
|
|
public class ActionFactory
|
|
{
|
|
private FramDataContext _domainDataProvider = null;
|
|
|
|
public ActionFactory(FramDataContext domainDataProvider)
|
|
{
|
|
this._domainDataProvider = domainDataProvider;
|
|
}
|
|
|
|
public FramDataContext DataProvider
|
|
{
|
|
get
|
|
{
|
|
return _domainDataProvider;
|
|
}
|
|
}
|
|
|
|
public IAction CreateAction(string actionType)
|
|
{
|
|
switch (actionType)
|
|
{
|
|
case ActionType.DataCollectAction_GoMO:
|
|
return new ActionGoToMO(this.DataProvider);
|
|
case ActionType.DataCollectAction_GOOD:
|
|
return new ActionGood(this.DataProvider);
|
|
case ActionType.DataCollectAction_NG:
|
|
return new ActionTS(this.DataProvider);
|
|
|
|
}
|
|
throw new Exception("$CS_Error_CreateAction_Failed");
|
|
}
|
|
}
|
|
}
|