コード例 #1
0
    protected void lboCateNews_SelectedIndexChanged(object sender, EventArgs e)
    {
        //BindToCateNews(Convert.ToInt32(lboGroupCate.SelectedValue));
        NewsEventBSO newsEventBSO = new NewsEventBSO();
        DataTable    table        = new DataTable();

        table = newsEventBSO.GetNewsEventAll(Language.language, -1, Convert.ToInt32(lboCateNews.SelectedValue));
        lboEvent.DataTextField  = "Title";
        lboEvent.DataValueField = "NewsEventID";
        lboEvent.DataSource     = table;
        lboEvent.DataBind();
    }
コード例 #2
0
    private void ViewNewsEvent()
    {
        commonBSO    commonBSO    = new commonBSO();
        NewsEventBSO newsEventBSO = new NewsEventBSO();
        DataTable    table        = new DataTable();

        if (!Session["Admin_UserName"].Equals("administrator"))
        {
            string strCate = GetCateParentIDArrayByID();
            if (strCate != "")
            {
                table = newsEventBSO.GetNewsEventAll(Language.language, -1, strCate);
            }
        }
        else
        {
            table = newsEventBSO.GetNewsEventAll(Language.language);
        }

        lboEvent.DataTextField  = "Title";
        lboEvent.DataValueField = "NewsEventID";
        lboEvent.DataSource     = table;
        lboEvent.DataBind();
    }