Exemplo n.º 1
0
        protected void BtnSubmit_OnClick(object sender, EventArgs e)
        {
            var name = this.txtName.Text.Trim();

            var roles = new Model917.Roles()
            {
                Roles_Title = name
            };

            var res = rolesSvc.AddRoles(roles);

            if (res > 0)
            {
                Response.Write("<script>alert('添加成功');location.href='Roles_List.aspx'</script>");
            }
            else
            {
                Response.Write("<script>alert('添加失败');location.href='Roles_List.aspx'</script>");
            }
        }