public ActResult RunAction(DbManagerProxy manager, IObject c, List <object> pars = null) { var ret = new ActResult { obj = c, result = true }; for (int i = 0; i < m_actionFuncs.Count; i++) { ret = m_actionFuncs[i](manager, ret.obj, pars ?? m_actionPars); if (!ret.result) { break; } } return(ret); }
public ActResult RunAction(DbManagerProxy manager, List <IObject> cc, List <object> pars = null) { var actual_pars = new List <object>(pars ?? m_actionPars); actual_pars.Insert(0, cc); /*long actionIdent; * if (long.TryParse(Name, out actionIdent)) * { * actual_pars.Insert(0, actionIdent); * }*/ for (int j = 0; j < cc.Count; j++) { var ret = new ActResult { obj = cc[j], result = true }; for (int i = 0; i < m_actionFuncs.Count; i++) { if (m_bFirstUI && i == 0 && j > 0) { continue; } if (m_bLastUI && i == m_actionFuncs.Count - 1 && j < cc.Count - 1) { continue; } ret = m_actionFuncs[i](manager, ret.obj, actual_pars); if (!ret.result) { return(ret); } } } return(true); }