Exemple #1
0
        void list_show()
        {
            string SQL = "select * from [ROYcms_TP_group] order by id DESC ";

            Repeater_group.DataSource = SqlHelper.ExecuteReader(SqlHelper.Conn, CommandType.Text, SQL, null);
            Repeater_group.DataBind();
        }
Exemple #2
0
        public void BIND()
        {
            //管理列表
            string SQL = "select * from [ROYcms_TP_date] order by id DESC ";

            if (Session["group"] != null)
            {
                SQL = "select * from [ROYcms_TP_date] where z_id='" + Session["group"] + "' and y='1' order by id DESC ";
            }
            string SQL2 = "select * from [ROYcms_TP_group] order by id DESC ";

            Repeater_xmlist.DataSource = SqlHelper.ExecuteReader(SqlHelper.Conn, CommandType.Text, SQL, null);
            Repeater_xmlist.DataBind();
            //示意图数据绑定
            Repeater_tu.DataSource = SqlHelper.ExecuteReader(SqlHelper.Conn, CommandType.Text, SQL, null);
            Repeater_tu.DataBind();

            //Repeater_tu_s.DataSource = SqlHelper.ExecuteReader(SqlHelper.Conn, CommandType.Text, SQL, null);
            //Repeater_tu_s.DataBind();

            Repeater_group.DataSource = SqlHelper.ExecuteReader(SqlHelper.Conn, CommandType.Text, SQL2, null);
            Repeater_group.DataBind();

            DropDownList_group.DataSource     = SqlHelper.ExecuteReader(SqlHelper.Conn, CommandType.Text, SQL2, null);
            DropDownList_group.DataTextField  = "group_name";
            DropDownList_group.DataValueField = "id";
            try
            {
                DropDownList_group.DataBind();
            }
            catch { }
            DropDownList_group.Items.Insert(0, new ListItem("◆请选择要管理初始化的投票组◆", ""));//插入空项,此举必须放到数据绑定之后
            if (Session["group"] != null)
            {
                try
                {
                    DropDownList_group.SelectedValue = Session["group"].ToString();
                }
                catch { }
            }
            else
            {
                DropDownList_group.SelectedValue = "";
            }

            XmlControl Config = new XmlControl(Server.MapPath(ConfigPath));

            config_time.Text    = Config.GetText("//TP_time");
            TP_upfile.Text      = Config.GetText("//TP_upfile");
            TP_upfile_w_h.Text  = Config.GetText("//TP_upfile_w_h");
            admin_password.Text = Config.GetText("//TP_password");
            TP_Redirect.Text    = Config.GetText("//TP_Redirect");
            if (Config.GetText("TP_IP_Y") == "true")
            {
                CheckBox_IP_Y.Checked = true;
            }

            //前台示意图绑定
            string SQL3 = "select * from [ROYcms_TP_date] where z_id='" + Request["group"] + "' order by id DESC ";

            if (Request["group"] != null)
            {
                Repeater_user_tu.DataSource = SqlHelper.ExecuteReader(SqlHelper.Conn, CommandType.Text, SQL3, null);
                Repeater_user_tu.DataBind();
            }

            //根据ID返回组数据
            string SQL4 = "select * from [ROYcms_TP_group] where id= '" + Request["group"] + "'";

            Repeater_user_z.DataSource = SqlHelper.ExecuteReader(SqlHelper.Conn, CommandType.Text, SQL4, null);
            Repeater_user_z.DataBind();

            if (Session["group_type"] != null && Convert.ToInt32(Session["group_type"]) == 1)
            {
                Panel_small.Visible = true;
                Panel_big.Visible   = false;
            }
        }