Esempio n. 1
0
    /// <summary>
    /// 对窗体控件初始化
    /// </summary>
    protected void formInit()
    {
        sdate.MaxDate = DateTime.Today.AddDays(-1);
        edate.MaxDate = DateTime.Today.AddDays(-1);
        sdate.Value = Session["FromDate"];
        edate.Value = Session["ToDate"];

        #region 绑定要查询的单位
        dbConfig dbHost = new dbConfig();
        cblHost.DataSource = dbHost.getSites(User.Identity.Name);
        cblHost.DataBind();
        #endregion

        #region 绑定木马黑名单数据
        this.ddlHorselist.DataSource = dbHost.GetHorseList();
        this.ddlHorselist.DataTextField = "vName";
        this.ddlHorselist.DataValueField = "vName";
        this.ddlHorselist.DataBind();
        this.ddlHorselist.Items.Insert(0, new ListItem("选择所有", "0"));
        #endregion
    }