예제 #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        AdminPopedom.IsHoldModel("12");
        //Left Listbox item was double click.
        if (Request.Params["listLeftHidden"] != null &&
            (string)Request.Params["listLeftHidden"] == "leftdoubleclicked")
        {
            if (listLeft.SelectedIndex > -1)
            {
                listRight.Items.Add(new ListItem(listLeft.SelectedItem.ToString(), listLeft.SelectedValue));
                if (listLeft.Items.Count > 0)
                {
                    listLeft.Items.Remove(listLeft.SelectedItem);
                }
            }
        }
        //Right Listbox item was double click.
        if (Request.Params["listRightHidden"] != null &&
            (string)Request.Params["listRightHidden"] == "rightdoubleclicked")
        {
            if (listRight.SelectedIndex > -1)
            {
                listLeft.Items.Add(new ListItem(listRight.SelectedItem.ToString(), listRight.SelectedValue));
                if (listRight.Items.Count > 0)
                {
                    listRight.Items.Remove(listRight.SelectedItem);
                }
            }
        }
        if (!IsPostBack)
        {
            //1.
            DataTable dt = member.GetGameNameForAward();
            if (dt.Rows.Count > 0)
            {
                foreach (DataRow dr in dt.Rows)
                {
                    lbaward.Text += " " + dr["ComName"].ToString();
                }
            }
            dt.Clear();
            //2.
            dt = member.GetFilterGameNameForAward();
            if (dt.Rows.Count > 0)
            {
                foreach (DataRow dr in dt.Rows)
                {
                    lbfiteraward.Text += " " + dr["ComName"].ToString();
                }
            }
            dt.Clear();
            //3.
            dt = member.GetGameNameForExtent();
            if (dt.Rows.Count > 0)
            {
                foreach (DataRow dr in dt.Rows)
                {
                    lbextent.Text += " " + dr["ComName"].ToString();
                }
            }
            dt.Clear();
            //4.
            dt = member.GetFilterGameNameForExtent();
            if (dt.Rows.Count > 0)
            {
                foreach (DataRow dr in dt.Rows)
                {
                    lbfiterextent.Text += " " + dr["ComName"].ToString();
                }
            }
            dt.Clear();

            BindData();
        }
    }