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的值

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

        }

  • 相关阅读:
    c++ namespace简单用法
    python2编码问题
    python dict()函数 /// logging模块///yield//生成器和迭代器
    python 对于一个字典,根据其value值获取其对应的keys值
    python 包/库/模块
    python __init()__
    python continue 和 break的区别
    python list去重
    linux命令,将一个文件夹中的内容copy到另外一个文件夹
    python 正则(re.compile()/re.findall())
  • 原文地址:https://www.cnblogs.com/qhy1277/p/6369835.html
Copyright © 2011-2022 走看看