protected void chkLeido_CheckedChanged(object sender, EventArgs e) { CheckBox check = (CheckBox)sender; int valor = Convert.ToInt32(check.ToolTip.ToString()); int notificacion = valor; Notificaciones noti = new Notificaciones(); noti.Fecha = Convert.ToDateTime(txtFechaIni.Text); noti.Estatus = "V"; noti.Entrada = notificacion; noti.actualizaEstado(); GridView1.DataBind(); }
protected void lnkNotificacion_Click(object sender, EventArgs e) { LinkButton btnNot = (LinkButton)sender; int alerta = Convert.ToInt32(btnNot.CommandArgument.ToString()); Notificaciones noti = new Notificaciones(); noti.Fecha = Convert.ToDateTime(lblFechaActual.Text); noti.Estatus = "V"; noti.Entrada = alerta; noti.actualizaEstado(); DataList2.DataBind(); noti.Estatus = "P"; noti.obtieneNotificacionesPendientes(); object[] pendientes = noti.Retorno; if (Convert.ToBoolean(pendientes[0])) { lblNotifi.Text = Convert.ToString(pendientes[1]); } else { lblNotifi.Text = "0"; } }