Esempio n. 1
0
        private void bindata()
        {
            MyRoleBLL roleBLL = new MyRoleBLL();

            Repeater1.DataSource = roleBLL.list();
            Repeater1.DataBind();
        }
Esempio n. 2
0
 protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
 {
     if (e.CommandName.Equals("delete"))
     {
         HiddenField hi      = e.Item.FindControl("HiddenField1") as HiddenField;
         MyRoleBLL   roleBLL = new MyRoleBLL();
         if (roleBLL.Delete(int.Parse(hi.Value)) == 1)
         {
             ClientScript.RegisterStartupScript(GetType(), "", " <script>alert('删除成功!')</script>");
         }
         else
         {
             return;
         }
     }
     bindata();
 }