示例#1
0
    /// <summary>
    /// 行点击事件
    /// </summary>
    /// <param name="source"></param>
    /// <param name="e"></param>
    protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
    {
        WebBean bean = WebBean.GetInstance();

        if (e.CommandName == "action")
        {
            List <String> args = e.CommandArgument.ToString().Split(',').ToList();
            if (args.Count <= 0)
            {
                return;
            }
            bean.ChangeUserState(args[0], Convert.ToBoolean(args[1]));
            DataBind();
        }
        if (e.CommandName == "delete")
        {
            string arg = e.CommandArgument.ToString().Trim();
            bean.AddUserToUserGroup(arg, string.Empty, false);
            bean.DeleteUserData(arg);
            DataBind();
        }
    }