zoukankan      html  css  js  c++  java
  • .Net 如何用一个随机数保存多个参数的值

    #region 返回List页面资料

    //将数据资料保存在一个随机数据里面       

    public void SetPreviewSession(string random, string PICNo, string areaNoStr, string fileNo, string readyonly, string Tilefg, string ShootingTime, string ApplyStatus, string ISPhotographers, string langid, string POINoStr)         {    

    //将资料保存在键值对里面    

    Dictionary<string, string> list = new Dictionary<string, string>();         

    list.Add("PICNo", PICNo);            

    list.Add("areaNoStr", areaNoStr);            

    list.Add("fileNo", fileNo);            

    list.Add("readyonly", readyonly);            

    list.Add("ShootingTime", ShootingTime);            

    list.Add("ISPhotographers", ISPhotographers);            

    list.Add("langid", langid);            

    list.Add("POINoStr", POINoStr);           

     list.Add("Tilefg", Tilefg);            

    list.Add("ApplyStatus", ApplyStatus);            

    Session[random] = list;

     }       

      #endregion

    //将随机数里面保存的资料解析出来

      Dictionary<string, string> list = Session[PICsessionName] as Dictionary<string, string>;
                if (list != null)
                {

          //获取键值对里面的值
                    PVM.PICNo = list["PICNo"];//键值对里面主键PICNo的值

          ............

        }

  • 相关阅读:
    <摘录>如何在64位linux强制编译32位应用程序
    Ubuntu安装Java
    Mybatis学习
    Java小工具Lombok
    jenkins忘记admin密码的处理方法
    list删除元素
    ConcurrentHashMap详解
    用户登录
    SpringDemo01
    SpringBoot Eclipse 热部署
  • 原文地址:https://www.cnblogs.com/qhy1277/p/6369835.html
Copyright © 2011-2022 走看看