Example #1
0
        public void Start()
        {
            FKTZS_ZF  fktzs_zf  = D_FKTZS_ZF();
            FKTZS_ZSK fktzs_zsk = D_FKTZS_ZSK();
            ZSK       zsk       = D_ZSK();
            //文件拼接
            string fileData = fktzs_zf.file_sb.ToString() + fktzs_zsk.file_sb.ToString() + zsk.file_sb.ToString();
            //脚本拼接
            string sql = fktzs_zf.upLinks_sql.ToString() + fktzs_zsk.upLinks_sql.ToString() + zsk.upLinks_sql.ToString();

            if (string.IsNullOrEmpty(sql))
            {
                MainFile.WriteFile(filePath, fileName, fileData);
                return;
            }
            SqlCommand cmd = SQLHelper.GetTransactionSqlCommand(connStr);

            SQLHelper.ExecuteNonQuery(ref cmd, sql);
            if (MainFile.WriteFile(filePath, fileName, fileData))
            {
                cmd.Transaction.Commit();
            }
            else
            {
                cmd.Transaction.Rollback();
            }
            cmd.Connection.Close();
        }
Example #2
0
        /// <summary>
        /// 暂收款
        /// </summary>
        private ZSK D_ZSK()
        {
            LogInfo.Log.Info("《暂收款》数据装载");
            ZSK entity = new ZSK();

            entity.GetData(this);
            return(entity);
        }