コード例 #1
0
    protected void btApply_Click(object sender, EventArgs e)
    {
        int userID               = AppUtils.Request("id");
        var _UserFunction        = new UserFunction();
        List <UserFunction> list = _UserFunction.GetList(userID);

        for (int i = 0; i < rptFunctionList.Items.Count; i++)
        {
            CheckBox cbx        = (CheckBox)rptFunctionList.Items[i].FindControl("cbxRole");
            Label    lbl        = (Label)rptFunctionList.Items[i].FindControl("lblFunctionID");
            int      functionID = Convert.ToInt32(lbl.Text);

            _UserFunction.Update(userID, functionID, Convert.ToInt32(cbx.Checked));
        }
    }