Beispiel #1
0
 private void ShowSigin()
 {
     if (Request.Cookies[LearnSite.Common.CookieHelp.teaCookieNname] != null)
     {
         string   Hid      = tcook.Hid.ToString();
         int      Rgrade   = Int32.Parse(DDLgrade.SelectedValue);
         int      Rclass   = Int32.Parse(DDLclass.SelectedValue);
         DateTime dt       = DateTime.Now;
         int      Qyear    = dt.Year;
         int      Qmonth   = dt.Month;
         int      Qday     = dt.Day;
         string   SignSort = RBsort.SelectedValue;//获取上课页面签到排序方法
         LabelToday.Text = " 服务器日期校准:" + Qyear.ToString() + "年" + Qmonth.ToString() + "月" + Qday.ToString() + "日";
         LearnSite.BLL.Signin sg = new LearnSite.BLL.Signin();
         string pcroom           = DDLhouse.SelectedValue;
         if (SignSort.Equals("3"))
         {
             LearnSite.Model.SeatCollect sctm = sg.StartSignTable(Rgrade, Rclass, Qyear, Qmonth, Qday, pcroom);
             DLonline.DataSource = sctm.Dt;
             DLonline.DataBind();
             DLonline.RepeatColumns = sctm.Column;
             Labelsigin.Text        = sctm.Online.ToString();
         }
         else
         {
             DLonline.DataSource = sg.StartSignClass(Rgrade, Rclass, Qyear, Qmonth, Qday, SignSort);
             DLonline.DataBind();
             DLonline.RepeatColumns = 8;
             Labelsigin.Text        = DLonline.Items.Count.ToString();
         }
     }
 }
Beispiel #2
0
    private void showSeat()
    {
        string croom = DDLhouse.SelectedValue;

        if (!string.IsNullOrEmpty(croom))
        {
            LearnSite.BLL.Computers     cbll  = new LearnSite.BLL.Computers();
            LearnSite.Model.SeatCollect seact = new LearnSite.Model.SeatCollect();
            seact = cbll.GetSeat(croom);//select Pip,Pmachine,Px,Py from Computers
            DataList1.DataSource = seact.Dt;
            DataList1.DataBind();
            DataList1.RepeatColumns = seact.Column;
            Labelnum.Text           = "当前机房电脑数量:" + seact.Online.ToString() + "台  列数为" + seact.Column.ToString();
        }
    }