//保存 protected void Button_Save_Click(object sender, EventArgs e) { //先删除当前权限ID下边所有的用户 HyoaClass.Hyoa_groupuser Hyoa_groupuser = new HyoaClass.Hyoa_groupuser(); Hyoa_groupuser.DeleteAllbygroupid(this.txtgroupid.Value); //添加选中的用户 HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global(); string[] v_uids = this.txtuserids.Value.Split('+'); for (var i = 0; i < v_uids.Length; i++) { if (v_uids[i] != "") { Hyoa_groupuser.ID = Hyoa_global.GetRandom(); Hyoa_groupuser.hy_groupid = this.txtgroupid.Value; Hyoa_groupuser.hy_userid = v_uids[i]; Hyoa_groupuser.Insert(); } } Response.Write("<script>alert('保存成功!');self.close();</script>"); }