Пример #1
0
    protected void btnUpdateUserCodes_Click(object sender, System.EventArgs e)
    {
        string value = this.hfldUserCodes.Value;

        System.Collections.Generic.List <string> list = new System.Collections.Generic.List <string>();
        list = new System.Collections.Generic.List <string>(value.Split(new char[]
        {
            ','
        }));
        list.RemoveAll((string a) => a == string.Empty);
        if (this.hfldChecked.Value.Contains(","))
        {
            this.hfldChecked.Value = this.hfldChecked.Value.Replace("\"", "").Substring(1).TrimEnd(new char[]
            {
                ']'
            });
        }
        string[] array = this.hfldChecked.Value.Split(new char[]
        {
            ','
        });
        if (array.Length > 1)
        {
            for (int i = 0; i < array.Length; i++)
            {
                Privilege.AddPrivilegenew(array[i], list);
            }
        }
        else
        {
            Privilege.AddPrivilege(array[0], list);
        }
        this.BindPlans();
    }