protected void RadGrid1_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e) { try { RadAjaxManager manager = RadAjaxManager.GetCurrent(Page); GruposBus oGrupoBus = new GruposBus(); GridDataItem item = (GridDataItem)e.Item; ViewState["sIdAlumno"] = item.GetDataKeyValue("sIdAlumno").ToString(); if (e.CommandName == "VerPagos") { Response.Redirect("../Pagos/PagosAlumno.aspx?Token=" + CreaTokenPost()); } if (e.CommandName == "EliminaGrupo") { if (oGrupoBus.EliminaGrupo(ViewState["sIdGrupo"].ToString()) == "1") { RadWindowManager1.RadAlert("El Grupo se ha eliminado", 270, 150, "Mensaje", "refreshGrid", "../IMAGES/accept.png"); } else { RadWindowManager1.RadAlert("No se pudo Eliminar el Grupo", 270, 150, "Mensaje", "refreshGrid", "../IMAGES/block.png"); } } } catch (Exception ex) { } }
protected void RadGrid1_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e) { try { GruposBus oGrupoBus = new GruposBus(); GridDataItem item = (GridDataItem)e.Item; if (e.CommandName == "VerAlumnos") { ViewState["sIdGrado"] = item.GetDataKeyValue("psIDGrado").ToString(); ViewState["sGrado"] = item.GetDataKeyValue("psGrado").ToString(); ViewState["sGrupo"] = item.GetDataKeyValue("psNombreGrupo").ToString(); ViewState["sIdGrupo"] = item.GetDataKeyValue("psIdGrupo").ToString(); ViewState["sIDCiclo"] = item.GetDataKeyValue("psIDCiclo").ToString(); // RadAjaxManager.GetCurrent(Page.Master.).ResponseScripts.Add(@"openWin('AlumnosGrupo.aspx','" + CreaTokenPost() + "','IMPRIME COTIZACION','RadWindow1');"); Response.Redirect("AlumnosGrupo.aspx?Token=" + CreaTokenPost()); } if (e.CommandName == "EditaGrupo") { Response.Redirect("Grupo.aspx?Token=" + CreaTokenPost()); //ScriptManager.RegisterStartupScript(this, this.GetType(), "callJSFunction", // "setTabStrip('COTIZADOR','../COTIZADOR/Cotizador.aspx','" + CreaTokenPost() + "');", true); } if (e.CommandName == "EliminaGrupo") { if (oGrupoBus.EliminaGrupo(ViewState["sIdGrupo"].ToString()) == "1") { RadWindowManager1.RadAlert("El Grupo se ha eliminado", 270, 150, "Mensaje", "refreshGrid", "../IMAGES/accept.png"); } else { RadWindowManager1.RadAlert("No se pudo Eliminar el Grupo", 270, 150, "Mensaje", "refreshGrid", "../IMAGES/block.png"); } // RadAjaxManager1.ResponseScripts.Add(@"openWin('../REPORTES/CotizacionRpt.aspx','" + CreaTokenPost() + "','IMPRIME COTIZACION','RadWindow1');"); // RadAjaxManager1.ResponseScripts.Add(@"openWin('../Reportes/AlumnoRpt.aspx','" + CreaTokenPost() + "','IMPRIME FICHA ALUMNO','RadWindow1');"); // RadAjaxManager1.ResponseScripts.Add(@"openPrint('../Reportes/AlumnoRpt.aspx','" + CreaTokenPost() + "','IMPRIME FICHA ALUMNO','RadWindow1');"); } } catch (Exception ex) { } }