转自:http://hi.baidu.com/hailibu/blog/index/1

     protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DateTime d1 = DateTime.Now;//取得当前时间
                CurrentExamsBind();//调用一个数据绑定方法
                string d2 = ((TimeSpan)(DateTime.Now - d1)).Milliseconds.ToString();//算出时间差
                System.Diagnostics.Debug.Fail(d2);
            }
        }
//数据绑定
private void CurrentExamsBind()
        {
            GvCurrentExams.DataSource =    ServiceFactory.GetService<IPublicExamService>().GetCurrentUserExams().Tables[0].DefaultView;
            GvCurrentExams.DataBind();
        }

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-18
  • 2022-12-23
  • 2022-12-23
  • 2021-07-25
  • 2021-12-18
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-28
  • 2022-01-05
  • 2021-07-26
相关资源
相似解决方案