Exemple #1
0
 /// <summary>
 /// 通过活动名称选择一个动作
 /// 动作名为空,返回所有动作
 /// </summary>
 /// <param name="actionName">动作名</param>
 /// <returns></returns>
 public List<Actions> GetActionByActionName(string actionName)
 {
     ActionDao ad = new ActionDao();
     Actions action = new Actions();
     action.Where = string.IsNullOrEmpty(actionName) ? "" : "LoweredActionName = " + actionName.ToLower();
     return ad.Select(action);
 }
Exemple #2
0
 public static ActionBusiness Map(ActionDao action)
 {
     return(new ActionBusiness
     {
         Id = action.Id,
         Name = action.Name,
         Value = action.Value,
         Person = action.Person != null?PersonMapper.Map(action.Person) : null
     });
 }
Exemple #3
0
 /// <summary>
 /// 启用动作
 /// </summary>
 /// <param name="action"></param>
 /// <returns></returns>
 public int EnableAction(Actions action)
 {
     ActionDao ad = new ActionDao();
     action.Status = (int)DataStatusEnum.Enabled;
     return ad.Update(action);
 }
Exemple #4
0
 /// <summary>
 /// 创建一个动作
 /// </summary>
 /// <param name="action"></param>
 /// <returns></returns>
 public int CreateAction(Actions action)
 {
     ActionDao ad = new ActionDao();
     return ad.Insert(action);
 }