首页 > 代码库 > .Net 如何用一个随机数保存多个参数的值

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

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

    }

.Net 如何用一个随机数保存多个参数的值