/// <summary> /// 行点击事件 /// </summary> /// <param name="source"></param> /// <param name="e"></param> protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e) { string guid = e.CommandArgument.ToString(); switch (e.CommandName) { case "delete": WebBean bean = WebBean.GetInstance(); DataSet dataSet = bean.SaveUserGroupData(guid, string.Empty, "delete"); Repeater1.DataSource = dataSet; Repeater1.DataBind(); break; case "assign": Response.Redirect("AssignPermission.aspx?guid=" + guid); break; case "usermanager": Response.Redirect("ManagerUser.aspx?guid=" + guid); break; default: break; } }
/// <summary> /// 保存或修改权限组信息 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void ButtonSave_Click(object sender, EventArgs e) { if (String.IsNullOrEmpty(TextBoxUserGroupName.Text.Trim())) { //提示错误消息"权限组名称不能为空" return; } try { WebBean bean = WebBean.GetInstance(); DataSet dataSet = bean.SaveUserGroupData("add".Equals(AddOrUpdate) ? Guid.NewGuid().ToString() : UserGroupGuid, TextBoxUserGroupName.Text.Trim(), AddOrUpdate); //提示消息"权限组信息保存成功!" TextBoxUserGroupName.Text = String.Empty; return; } catch (Exception ex) { //提示错误消息"权限组保存失败!" //写错误日志 WriteLog.WriteExceptionLog(ex.ToString()); return; } }