Ejemplo n.º 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);
 }
Ejemplo n.º 2
0
        private List<Actions> ToListActions(DataSet ds)
        {
            List<Actions> listActions = new List<Actions>();
            DataTable dt = ds.Tables[0];
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                Actions ac = new Actions();
                ac.ActionId = dt.Rows[i]["ActionId"].ToString().ToInteger();
                ac.ActionName = dt.Rows[i]["ActionName"].ToString();

                listActions.Add(ac);
            }
            return listActions;
        }
Ejemplo n.º 3
0
 public bool EnbaleAction(Actions action)
 {
     return true;
 }
Ejemplo n.º 4
0
 public bool DeleteAction(Actions action)
 {
     return false;
 }
Ejemplo n.º 5
0
 public bool CreateAction(Actions action)
 {
     return true;
 }
Ejemplo n.º 6
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);
 }
Ejemplo n.º 7
0
 /// <summary>
 /// 创建一个动作
 /// </summary>
 /// <param name="action"></param>
 /// <returns></returns>
 public int CreateAction(Actions action)
 {
     ActionDao ad = new ActionDao();
     return ad.Insert(action);
 }