zoukankan      html  css  js  c++  java
  • Queue 输出数据

    坑人的引用类型。。。。输出看看结果是什么

    Queue<ParaInfo> strStranList = new Queue<ParaInfo>();
    
    StringBuilder strSql = new StringBuilder();
                    strSql.Append("Update Jia72_Members Set ");
                    strSql.Append("UserName=@UserName,");
                    strSql.Append("YTCardId=@YTCardId,");
                    strSql.Append("CardNum=@CardNum,");
                    strSql.Append("Bank=@Bank,");
                    strSql.Append("BankNumber=@BankNumber,");
                    strSql.Append("QQNumber=@QQNumber,");
                    strSql.Append("RealName=@RealName,");
                    strSql.Append("SavedOn=@SavedOn");
                    strSql.Append(" Where Id=@Id ");
                    string strSQLM = strSql.ToString();
    
                    SqlParameter[] parameters = {
    					new SqlParameter("@Id",SqlDbType.Int,4),					
    					new SqlParameter("@UserName",SqlDbType.NVarChar,20),
    					new SqlParameter("@YTCardId",SqlDbType.Int,4),
    					new SqlParameter("@CardNum",SqlDbType.NVarChar,20),
    					new SqlParameter("@Bank",SqlDbType.NVarChar,50),
    					new SqlParameter("@BankNumber",SqlDbType.NVarChar,32),					
    					new SqlParameter("@QQNumber",SqlDbType.NVarChar,50),
    					new SqlParameter("@RealName",SqlDbType.NVarChar,10),			
    					new SqlParameter("@SavedOn",SqlDbType.DateTime)
    					 };
                    parameters[0].Value = model.Id;
                    parameters[1].Value = model.UserName;
                    parameters[2].Value = model.YTCardId;
                    parameters[3].Value = model.CardNum;
                    parameters[4].Value = model.Bank;
                    parameters[5].Value = model.BankNumber;
                    parameters[6].Value = model.QQNumber;
                    parameters[7].Value = model.RealName;
                    parameters[8].Value = model.SavedOn;
    
                    DBUtility.ParaInfo dbcom = new DBUtility.ParaInfo(strSql.ToString(), parameters);
                    strStranList.Enqueue(dbcom);//绑定会员信息              
    
                    //更新卡表
                    strSql.Clear();
                    strSql.Append("update Jia72_YTCard set ");
                    strSql.Append("IsBind=1,");
                    strSql.Append("SavedOn=getdate()");
                    strSql.Append(" where Id=" + model.YTCardId);
    
                    DBUtility.ParaInfo dbcom1 = new DBUtility.ParaInfo(strSql.ToString(), null);
                    strStranList.Enqueue(dbcom1);//绑定会员信息   //更新卡表绑定
    
             
      while (strStranList.Count > 0)
                    {
                        ParaInfo myDE = strStranList.Peek();
                        string cmdText = myDE.strSql.ToString();
                        Response.Write(cmdText.ToString());
                        Response.Write("<br/>");
                        if (myDE.par != null)
                        {
                            SqlParameter[] cmdParms = (SqlParameter[])myDE.par;
                            foreach (SqlParameter parm in cmdParms)
                            {
                                Response.Write(parm.ParameterName.ToString() + " " + parm.Value.ToString() + " ");
                            }
                            Response.Write("<br/>");
                        }
                        strStranList.Dequeue();
                    }
    
  • 相关阅读:
    10个针对企业的免费大数据分析工具
    SaaS领域如何分析收入增长?
    SaaS领域如何分析收入增长?
    数据挖掘时功能和一个聚类分析应用案例
    数据挖掘时功能和一个聚类分析应用案例
    大数据的价值不在于大,而在于对潜在用户的挖掘
    大数据的价值不在于大,而在于对潜在用户的挖掘
    sedna进行xquery查询
    A guide to analyzing Python performance
    Atitit.软件仪表盘(4)--db数据库子系统-监測
  • 原文地址:https://www.cnblogs.com/chenmfly/p/4387339.html
Copyright © 2011-2022 走看看