Ejemplo n.º 1
0
 protected void btnDelete_Click(object sender, ImageClickEventArgs e)
 {
     try
     {
         int UserId = int.Parse((((ImageButton)sender).CommandArgument.ToString()));
         ulBus = new UserLoginBUS();
         ConnectionData.OpenMyConnection();
         ulBus.tblUserLogin_Delete(UserId);
         ConnectionData.CloseMyConnection();
         pnError.Visible = false;
         pnSuccess.Visible = true;
         lblSuccess.Text = "Xóa thành công !";
     }
     catch (Exception ex)
     {
         logs.Error(userLogin.Username + "-Client - btnDelete_Click", ex);
         pnError.Visible = true;
         lblError.Text = "Không thể xóa !</br>" + ex.Message;
     }
     LoadData();
 }