Ejemplo n.º 1
0
        public string GetFuncDataTable(string FunctionName, string QueryCond)
        {
            try
            {
                DataTable dtRet = null;
                string    sRet;
                string[]  CondList;
                ArrayList FieldArray = new ArrayList();
                int       i;

                if (QueryCond != null)
                {
                    CondList = FwxCmnFunction.UnPackCondition(QueryCond);
                    for (i = 0; i < CondList.Length; i++)
                    {
                        FieldArray.Add(CondList[i]);
                    }
                }
                else
                {
                    CondList = null;
                }

                Object[] oPara = new Object[1];
                oPara[0] = FieldArray;

                Type       FunctionType = oStdFunc.GetType();
                MethodInfo mi           = FunctionType.GetMethod(FunctionName);
                if (mi != null)
                {
                    dtRet = (DataTable)mi.Invoke(oStdFunc, oPara);
                }
                else
                {
                    dtRet = oStdMain.GetFuncDataTable(FunctionName, QueryCond);
                }

                sRet = StandardFunction.GetErrorMessage() + FwxCmnFunction.DataTableToString(dtRet);

                return(sRet);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 2
0
        public string FillData(string TableName, string Step, string QueryCond)
        {
            try
            {
                DataTable dtRet = null;
                string    sRet  = "";
                string[]  CondList;
                if (QueryCond != null)
                {
                    CondList = FwxCmnFunction.UnPackCondition(QueryCond);
                }
                else
                {
                    CondList = null;
                }
                switch (TableName)
                {
                //case "RWEBFUNDEF":
                //    if (Step == "1")
                //    {
                //        dt = SvrGlobalVariable.DBQuery.GetFuncDataTable("SEL_0CFUNCNAME", null, new string[] { CondList[0] });
                //    }
                //    break;
                default:
                    dtRet = oStdMain.FillData(TableName, Step, QueryCond);
                    break;
                }
                sRet = StandardFunction.GetErrorMessage() + FwxCmnFunction.DataTableToString(dtRet);

                return(sRet);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }