private ServiciosCD40.Tablas[] DameDatos() { try { ServiciosCD40.GruposTelefonia t = new ServiciosCD40.GruposTelefonia(); Configuration config = WebConfigurationManager.OpenWebConfiguration("~"); KeyValueConfigurationElement s = config.AppSettings.Settings["Sistema"]; t.IdSistema = s.Value; Session["idsistema"] = s.Value; ServiciosCD40.Tablas[] d = ServicioCD40.ListSelectSQL(t); return(d); } catch (Exception e) { logDebugView.Error("(Grupos-DameDatos)", e); } return(null); }
private void GuardarCambios() { try { ServiciosCD40.GruposTelefonia n = new ServiciosCD40.GruposTelefonia(); n.IdSistema = (string)Session["idsistema"]; n.IdGrupo = TextBox1.Text; if (ServicioCD40.InsertSQL(n) < 0) { logDebugView.Warn("(Grupos-EliminarElemento): No se ha podido insertar el elemento."); } } catch (Exception e) { logDebugView.Error("(Grupos-EliminarElemento):", e); } try { // Llamada asíncrona para regenerar todas las sectorizaciones. Session.Add("Sectorizando", true); ServicioCD40.BeginRegeneraSectorizaciones((string)Session["idsistema"], true, true, true, CallbackCompletado, null); } catch (Exception ex) { logDebugView.Error("(Grupos.GuardadCambios): ", ex); } NewItem = TextBox1.Text; BtAceptar.Visible = false; BtCancelar.Visible = false; TextBox1.Visible = false; ListBox1.Enabled = true; BtNuevo.Visible = PermisoSegunPerfil; //BtEliminar.Visible = false; Label1.Visible = false; ListBox1.Items.Clear(); MuestraDatos(DameDatos()); RequiredFieldNucleo.Visible = false; Panel1.Enabled = false; }
private void EliminarElemento() { try { ServiciosCD40.GruposTelefonia n = new ServiciosCD40.GruposTelefonia(); n.IdSistema = (string)Session["idsistema"]; n.IdGrupo = (string)Session["elemento"]; if (ServicioCD40.DeleteSQL(n) < 0) { logDebugView.Warn("(Grupos-EliminarElemento): No se ha podido eliminar el elemento"); } cMsg.alert((string)GetGlobalResourceObject("Espaniol", "ElementoEliminado")); } catch (Exception e) { logDebugView.Error("(Grupos-EliminarElemento): ", e); } ListBox1.Items.Clear(); MuestraDatos(DameDatos()); }
/// <summary> /// /// </summary> private void CargaDDL() { try { ServiciosCD40.Redes r = new ServiciosCD40.Redes(); r.IdSistema = (string)Session["idsistema"]; DDLPrefijo.DataSource = ServiceServiciosCD40.DataSetSelectSQL(r); DDLPrefijo.DataTextField = "IdRed"; DDLPrefijo.DataValueField = "IdPrefijo"; DDLPrefijo.DataBind(); ServiciosCD40.GruposTelefonia gTelefonia = new ServiciosCD40.GruposTelefonia(); gTelefonia.IdSistema = (string)Session["idsistema"]; DDLGrupo.DataSource = ServiceServiciosCD40.DataSetSelectSQL(gTelefonia); DDLGrupo.DataTextField = "IdGrupo"; DDLGrupo.DataBind(); } catch (Exception e) { logDebugView.Error("(DestinosTelefonia-CargaDDL):", e); } }