码迷,mamicode.com
首页 > 其他好文 > 详细

线上学习平台知识总结

时间:2017-06-17 19:39:59      阅读:487      评论:0      收藏:0      [点我收藏+]

标签:input   sql   private   tap   history   typeof   val   cti   后台   

1.对象转换

对象一

   var PList1 = from ph in db.Pa_Point_History
                             join cou in db.Pa_Online_Course
                             on ph.source_id equals cou.id
                             where ph.point_source == 4 && ph.user_id == uId && cou.status == 0
                             select new Pa_Online_CourseModel
                             {
                                 point = ph.point,
                                 id = ph.id
                             };
                var ol = (List<Pa_Online_CourseModel>)PList1;

对象二

 var banks = this.DataProvider.ExecuteObject(typeof(BankInfo), sql, null);

 bankInfo = (BankInfo)banks;

2.后台对象赋值,前台读取

例子一

  public ExamInfo examInfo { get; set; }

   ExamInfo eInfo = new ExamInfo();

 eInfo.NewStatus = "未开始"; eInfo.NewResult = "?";

 <p>是否完成:<span><%=examInfo.NewStatus%></span></p>

例子二

private string id;

public string Id       

 {   get { return Request.QueryString["id"]; }           

  set { id = value; }         }

     <input type="hidden" id="_id" name="_id" value=‘<%=Id%>‘>

3.input 按钮点击事件
    $("input:radio").click(function () {
        var domName = $(this).attr(‘name‘);
        $("input:radio[name=‘" + domName + "‘]").attr(‘checked‘, false);//1.
        $(this).attr(‘checked‘, true);//2.
    });
</script>

 

线上学习平台知识总结

标签:input   sql   private   tap   history   typeof   val   cti   后台   

原文地址:http://www.cnblogs.com/hanxingli/p/7041048.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!