Пример #1
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        string[]  arr;
        ArrayList roleList = new ArrayList();

        foreach (ListItem item in chkList.Items)
        {
            if (item.Selected)
            {
                roleList.Add(item.Text);
            }
        }

        arr = (string[])roleList.ToArray(typeof(string));
        try
        {
            userBll.CreatUser(txtUserName.Text, txtEmail.Text, txtPassword.Text, arr);
            Response.Redirect("/SystemSettings/Users.aspx", false);
        }
        catch (Exception)
        {
            Response.Redirect("/SystemSettings/Users.aspx", false);
        }
    }