Esempio n. 1
0
    /// <summary>
    /// 显示信息绑定
    /// </summary>
    protected void Bind()
    {
        string LoginName = Page.User.Identity.Name;
        int    id        = Convert.ToInt32(Request.QueryString["Id"]);

        MyHomeLink home = manger.GetAllMyHomeById(id);

        ddlType.DataSourceID   = null;
        ddlType.DataSource     = type.GetHomeTypeList(LoginName);
        ddlType.DataTextField  = "TypeName";
        ddlType.DataValueField = "TID";
        ddlType.DataBind();
        ddlType.SelectedValue = home.Typeid.TID.ToString();
        txtDOC.Text           = home.WDoc.ToString();
        txtName.Text          = home.LName.ToString();
        txtNumber.Text        = home.UserName.ToString();
        txtPass.Text          = home.PassWord.ToString();
        txtsorct.Text         = home.WSort.ToString();
        txtWan.Text           = home.Linkwww.ToString();
        if (home.States == 1)
        {
            rdostar.Checked = true;
        }
        else if (home.States == 0)
        {
            rdostop.Checked = true;
        }
    }
Esempio n. 2
0
    /// <summary>
    /// 显示信息绑定
    /// </summary>
    protected void Bind()
    {
        string     LoginName = Page.User.Identity.Name;
        int        id        = Convert.ToInt32(Request.QueryString["Id"]);
        MyHomeType homeType  = type.GetAllTypeById(id);

        ddlType.DataSourceID   = null;
        ddlType.DataSource     = type.GetHomeTypeList(LoginName);
        ddlType.DataTextField  = "TypeName";
        ddlType.DataValueField = "TID";
        ddlType.DataBind();
        ddlType.Items.FindByText(homeType.TypeName).Selected = true;
        txtScort.Text = homeType.sort.ToString();
    }