Esempio n. 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="command"></param>
        /// <param name="obj"></param>
        /// <returns></returns>
        internal PlatformCommandInfo DoAction(string command, PlatformCommandInfo obj)
        {
            Type t = this.GetType();
            //-->命令名称
            string commandName = string.Format("Process{0}", command);
            //-->获取方法
            MethodInfo method = t.GetMethod(commandName, BindingFlags.NonPublic | BindingFlags.Instance);

            if (null == method)
            {
                return(null);
            }
            object result = method.Invoke(this, new object[] { command, obj });

            return(result as PlatformCommandInfo);
        }
Esempio n. 2
0
        PlatformCommandInfo GetPlatfromCommandInfo(CtrlPlatformCommandInfo ctrlCmd)
        {
            var cmd = new PlatformCommandInfo();

            cmd.CommandName     = ctrlCmd.CommandName;
            cmd.CommandType     = ctrlCmd.CommandType.CloneEnum <CommandDirectionType>(); //.CompositeControl;
            cmd.FromModel       = ctrlCmd.FromModel.CloneEnum <CommandDirectionType>();   //.ClientUI;
            cmd.ToModel         = ctrlCmd.ToModel.CloneEnum <CommandDirectionType>();
            cmd.ParamCollection = ctrlCmd.ParamCollection;
            //cmd.MetaDataInfo = ctrlCmd.MetaDataInfo;
            //cmd.ControlInfo = ctrlCmd.ControlInfo
            cmd.PublicValue = ctrlCmd.PublicValue;
            cmd.TempValue   = ctrlCmd.TempValue;
            cmd.ExecSql     = ctrlCmd.ExecSql.CloneList <ExecSQLCmd>();
            cmd.TableName   = ctrlCmd.TableName;
            //cmd.DataTable = ctrlCmd.DataTable;
            cmd.ExecuteNonQueryResult = ctrlCmd.ExecuteNonQueryResult;
            cmd.ErrorMessage          = ctrlCmd.ErrorMessage;
            //cmd.CompositeControlName = ctrlCmd.CompositeControlName;
            return(cmd);
        }
Esempio n. 3
0
        /// <summary>
        /// 返回命令信息
        /// </summary>
        /// <param name="cmd"></param>
        /// <returns></returns>
        public static CtrlPlatformCommandInfo ToCtrlPlatformCommandInfo(PlatformCommandInfo cmd)
        {
            var ctrlCmd = new CtrlPlatformCommandInfo();

            ctrlCmd.CommandName     = cmd.CommandName;
            ctrlCmd.CommandType     = cmd.CommandType.CloneEnum <CtrlCommandDirectionType>(); //.CompositeControl;
            ctrlCmd.FromModel       = cmd.FromModel.CloneEnum <CtrlCommandDirectionType>();   //.ClientUI;
            ctrlCmd.ToModel         = cmd.ToModel.CloneEnum <CtrlCommandDirectionType>();
            ctrlCmd.ParamCollection = cmd.ParamCollection;
            //ctrlCmd.MetaDataInfo = cmd.MetaDataInfo;
            //ctrlCmd.ControlInfo = cmd.ControlInfo
            ctrlCmd.PublicValue = cmd.PublicValue;
            ctrlCmd.TempValue   = cmd.TempValue;
            ctrlCmd.ExecSql     = cmd.ExecSql.CloneList <CtrlExecSQLCmd>();
            ctrlCmd.TableName   = cmd.TableName;
            //ctrlCmd.DataTable = cmd.DataTable;
            ctrlCmd.ExecuteNonQueryResult = cmd.ExecuteNonQueryResult;
            ctrlCmd.ErrorMessage          = cmd.ErrorMessage;
            //ctrlCmd.CompositeControlName = cmd.CompositeControlName;

            PrintfLog(ctrlCmd, "返回命令信息");
            return(ctrlCmd);
        }