Example #1
0
    private void showhouse()
    {
        string pcroom = tcook.Hroom;

        if (!LearnSite.Common.XmlHelp.GetHouseMode())
        {
            LearnSite.BLL.Computers cbll = new LearnSite.BLL.Computers();
            DDLhouse.DataSource     = cbll.CmpRoom();
            DDLhouse.DataTextField  = "Pm";
            DDLhouse.DataValueField = "Pm";
            DDLhouse.DataBind();
            HyperLinkSeat.Visible = false;
        }
        else
        {
            HyperLinkSeat.Visible = true;
            LearnSite.BLL.House hbll = new LearnSite.BLL.House();
            DDLhouse.DataSource     = hbll.GetListHouse();
            DDLhouse.DataTextField  = "Hname";
            DDLhouse.DataValueField = "Hid";
            DDLhouse.DataBind();
        }
        if (DDLhouse.Items.FindByValue(pcroom) != null)
        {
            DDLhouse.SelectedValue = pcroom;
        }
    }
Example #2
0
 private void showhouse()
 {
     LearnSite.BLL.House hbll = new LearnSite.BLL.House();
     GVHouse.DataSource = hbll.GetListHouse();
     GVHouse.DataBind();
     CkBox.Checked = LearnSite.Common.XmlHelp.GetHouseMode();
 }
Example #3
0
 protected void GVHouse_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "Del")
     {
         string hid = e.CommandArgument.ToString();
         LearnSite.BLL.House hbll = new LearnSite.BLL.House();
         hbll.Delete(Int32.Parse(hid));
         System.Threading.Thread.Sleep(200);
         showhouse();
     }
 }
Example #4
0
 private string getHseat()
 {
     if (Request.QueryString["Hid"] != null)
     {
         string hid = Request.QueryString["Hid"].ToString();
         LearnSite.BLL.House bll = new LearnSite.BLL.House();
         return(bll.GetHseat(Int32.Parse(hid)));
     }
     else
     {
         return("");
     }
 }
Example #5
0
    protected void Buttonadd_Click(object sender, EventArgs e)
    {
        string hname = TextBoxHname.Text.Trim();
        int    hln   = hname.Length;

        if (hln > 0 && hln < 50)
        {
            LearnSite.Model.House model = new LearnSite.Model.House();
            model.Hname = hname;
            model.Hseat = "";
            LearnSite.BLL.House bll = new LearnSite.BLL.House();
            bll.Add(model);//增加一个机房

            System.Threading.Thread.Sleep(200);
            showhouse();
            TextBoxHname.Text = "";
        }
    }
Example #6
0
 private void showOld()
 {
     if (Request.QueryString["Hid"] != null && Request.QueryString["Sgrade"] != null && Request.QueryString["Sclass"] != null)
     {
         string hid = Request.QueryString["Hid"].ToString();
         if (LearnSite.Common.WordProcess.IsNum(hid))
         {
             string sgrade               = Request.QueryString["Sgrade"].ToString();
             string sclass               = Request.QueryString["Sclass"].ToString();
             LearnSite.BLL.House   bll   = new LearnSite.BLL.House();
             LearnSite.Model.House model = new LearnSite.Model.House();
             model = bll.GetModel(Int32.Parse(hid));
             bool hostnameshow = false;
             if (model != null)
             {
                 LabelTitle.Text = model.Hname;
                 firstshows      = model.Hseat;
                 LearnSite.BLL.Ip pbll = new LearnSite.BLL.Ip();
                 StoreMsg.InnerText = pbll.GetSiginStudentStr(Int32.Parse(sgrade), Int32.Parse(sclass), Int32.Parse(hid), hostnameshow);
                 if (firstshows.IndexOf('-') > -1)
                 {
                     string[] old_collects = firstshows.Split('-');
                     if (old_collects.Length > 3)
                     {
                         string slnum    = old_collects[0];
                         string sallnum  = old_collects[1];
                         string ssortway = old_collects[2];
                         myhouse.Text = viewseats(Int32.Parse(slnum), Int32.Parse(sallnum), ssortway);
                     }
                 }
             }
         }
         else
         {
             LearnSite.Common.WordProcess.Alert("参数格式错误", this.Page);
         }
     }
 }