Ejemplo n.º 1
0
    public void MyBind()
    {
        B_DownServer bdownserver = new B_DownServer();

        GridView1.DataSource = bdownserver.GetDownServerAll();// GetAuthorPage(0, 0, 10);
        GridView1.DataBind();
    }
Ejemplo n.º 2
0
 private void Serverlist()
 {
     if (this.SetDownFiled.SelectedValue == "1")
     {
         this.downserver.Visible = true;
         B_DownServer downdll  = new B_DownServer();
         DataTable    downlist = downdll.GetDownServerAll();
         downlist.DefaultView.Sort      = "ServerID";
         this.serverlist.DataSource     = downlist;
         this.serverlist.DataTextField  = "ServerName";
         this.serverlist.DataValueField = "ServerID";
         this.serverlist.DataBind();
         this.serverlist.Items.Insert(0, new ListItem("请选择服务器", ""));
         for (int i = 0; i < this.Type.Items.Count; i++)
         {
             if (this.Type.Items[i].Value != "SmallFileType")
             {
                 this.Type.Items[i].Enabled = false;
             }
             else
             {
                 int          FieldID = DataConverter.CLng(base.Request.QueryString["FieldID"]);
                 int          ModelID = DataConverter.CLng(base.Request.QueryString["ModelID"]);
                 M_ModelField field   = this.bll.GetModelByID(ModelID.ToString(), FieldID);
                 string       content = field.Content;
                 this.ChkFileSize.Enabled               = false;
                 this.TxtFileSizeField.Enabled          = false;
                 this.TxtMaxFileSizes.Text              = this.bll.GetFieldContent(content, 0, 1);
                 this.TxtUploadFileTypes.Text           = this.bll.GetFieldContent(content, 1, 1);
                 this.DivSmallFileType.Style["display"] = "";
                 this.tbSearch.Style["display"]         = "none";
                 this.DivTextType.Style["display"]      = "none";
                 this.Type.Items[i].Selected            = true;
             }
         }
     }
 }