常用代码


130925199203217215

 public List<UserInfoViewModel> QueryAllUser()
        {
            
            List<T_UserInfo> userList = this.CurrentDal.LoadItems().ToList();
            //创建一个转换关系规则  
            Mapper.CreateMap<T_UserInfo, UserInfoViewModel>();
            //进行转换  
            List<UserInfoViewModel> userInfoList = Mapper.Map<List<T_UserInfo>, List<UserInfoViewModel>>(userList);
            return userInfoList;

        }

  //创建映射规则  
            Mapper.CreateMap<BidTRecorderViewModel, T_BidTRecord>();

            //进行转换  
            T_BidTRecord enBidTRecord = Mapper.Map<T_BidTRecord>(enBidTRecordVM);

<#@ CleanupBehavior Processor="T4VSHost" CleanupAfterProcessingTemplate="true" #>

<#@ CleanupBehavior Processor="T4VSHost" CleanupAfterProcessingTemplate="true" #>


   //通过切割的方式来获得ID
    string[] specialistID = tempSpecialistID.Split(',');

 //将试卷值存放到cookie中

            HttpCookie cookie = new HttpCookie("PaperInfo");

            cookie.Values.Add("PaperName", strName);
            cookie.Values.Add("PaperQuestion",QuestionIds);
            cookie.Values.Add("CourseID", strCourseID);
            cookie.Values.Add("PaperId", PaperID.ToString());
            Session.Add("PaperName", strPaperName);
            Response.AppendCookie(cookie);

//取出cookie中的值

 HttpCookie newCookie = Request.Cookies["PaperInfo"];

            string strName = newCookie.Values["PaperName"];



评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值