Beispiel #1
0
 protected void gv_bloqueo_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "QUITAR")
     {
         SolicitudAndenesBC s = new SolicitudAndenesBC();
         string             resultado;
         s.SOLI_ID = Convert.ToInt32(hf_idSolicitud.Value);
         s.LUGA_ID = Convert.ToInt32(e.CommandArgument.ToString());
         if (s.Liberar(usuario.ID, out resultado))
         {
             gv_bloqueo.DataSource = s.ObtenerBloqueados();
             gv_bloqueo.DataBind();
             ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "msj", "showAlert('" + resultado + "');", true);
         }
         else
         {
             ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "msj", "alert('" + resultado + "');", true);
         }
     }
 }
Beispiel #2
0
 protected void gv_bloqueo_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "QUITAR")
     {
         SolicitudAndenesBC s = new SolicitudAndenesBC();
         string             resultado;
         s.SOLI_ID = int.Parse(this.hf_idSolicitud.Value);
         s.LUGA_ID = int.Parse(e.CommandArgument.ToString());
         if (s.Liberar(this.u.ID, out resultado))
         {
             this.gv_bloqueo.DataSource = s.ObtenerBloqueados();
             this.gv_bloqueo.DataBind();
             ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "msj", string.Format("showAlert('{0}');", resultado), true);
         }
         else
         {
             ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "msj", string.Format("alert('{0}');", resultado), true);
         }
     }
 }