public int ExecuteNonQuery(string nfCmdXmlString)
        {
            int rows = -1;

            List <XmlToList> list = XmlToSqlCmd_v2.ConvertXmlToSqlCommand(nfCmdXmlString);
            DataSet          ds   = new DataSet("data");

            foreach (XmlToList xtl in list)
            {
                rows = DBHelper.ExecuteNonQuery(xtl.SQL, xtl.PARS);
            }

            return(rows);
        }
        public DataSet getDataSet(string nfCmdXmlString)
        {
            List <XmlToList> list = XmlToSqlCmd_v2.ConvertXmlToSqlCommand(nfCmdXmlString);
            DataSet          ds   = new DataSet("data");

            foreach (XmlToList xtl in list)
            {
                DataTable table = DBHelper.DataTableDBExecuteSqlCommand(xtl.SQL, xtl.PARS);
                if (!String.IsNullOrEmpty(xtl.TABLENAME))
                {
                    table.TableName = xtl.TABLENAME;
                }
                ds.Tables.Add(table);
            }

            return(ds);
        }
        public bool DoTrain(string nfCmdXmlString)
        {
            List <XmlToList> list = XmlToSqlCmd_v2.ConvertXmlToSqlCommand(nfCmdXmlString);
            DataSet          ds   = new DataSet("data");

            List <string>         cmdList  = new List <string>();
            List <SqlParameter[]> parsList = new List <SqlParameter[]>();

            foreach (XmlToList xtl in list)
            {
                cmdList.Add(xtl.SQL);
                parsList.Add(xtl.PARS);
            }

            //执行事务;
            return(DBHelper.DoTran(cmdList, parsList));
        }
        public object ExecuteScalar(string nfCmdXmlString)
        {
            object obj = null;

            List <XmlToList> list = XmlToSqlCmd_v2.ConvertXmlToSqlCommand(nfCmdXmlString);
            DataSet          ds   = new DataSet("data");

            foreach (XmlToList xtl in list)
            {
                try
                {
                    obj = DBHelper.DBExecuteScalar(xtl.SQL, xtl.PARS);
                }
                catch (SqlException exp)
                {
                    obj = exp.Message;
                }
            }

            return(obj);
        }