protected void btnProcesar_Click(object sender, EventArgs e)
        {
            if (Page.IsValid)
            {
                BLSoftware objGrupoSoftware = new BLSoftware();
                int        AppSB_Id         = 0;
                int        Srv_Id           = 0;
                int        BD_Id            = 0;

                int.TryParse(ddlInstancia.SelectedValue, out AppSB_Id);
                int.TryParse(ddlServidor.SelectedValue, out Srv_Id);
                int.TryParse(ddlBD.SelectedValue, out BD_Id);

                if (Srv_Id > 0 && BD_Id > 0 && AppSB_Id > 0)
                {
                    objGrupoSoftware.ActualizarInstanciaBD(AppSB_Id, Srv_Id, BD_Id, txtNombre.Text.Trim());
                }
                else
                {
                    MsgBoxU.AddMessage("Se debe seleccionar un servidor y un tipo de base de datos", YaBu.MessageBox.uscMsgBox.enmMessageType.Attention);
                }

                objGrupoSoftware.HistoricoApp(this.Page.ToString().Substring(4, this.Page.ToString().Substring(4).Length - 5) + ".aspx", Session["UserNameLogin"].ToString(), "U", AppSB_Id);

                DatosGenerales.EnviaMensaje("Proceso finalizado", "Modificación de instancia BD", DatosGenerales.TiposMensaje.Informacion);
            }
        }
Esempio n. 2
0
        protected void btnProcesar_Click(object sender, EventArgs e)
        {
            if (Page.IsValid)
            {
                BLSoftware objGrupoSoftware = new BLSoftware();
                string     Resp             = "";
                int        App_Id           = 0;
                int        BD_Id            = 0;

                int.TryParse(ddlAplicacion.SelectedValue, out App_Id);
                int.TryParse(ddlBD.SelectedValue, out BD_Id);

                if (App_Id > 0 && BD_Id > 0)
                {
                    Resp = objGrupoSoftware.InsertarAppRelBD(App_Id, BD_Id, chkPropietaria.Checked);
                }
                else
                {
                    MsgBoxU.AddMessage("Se debe seleccionar una aplicación y una base de datos", YaBu.MessageBox.uscMsgBox.enmMessageType.Attention);
                }

                objGrupoSoftware.HistoricoApp(this.Page.ToString().Substring(4, this.Page.ToString().Substring(4).Length - 5) + ".aspx", Session["UserNameLogin"].ToString(), "I", App_Id, BD_Id);

                if (Resp == "")
                {
                    DatosGenerales.EnviaMensaje("Proceso finalizado", "Alta de Relacion Aplicación-BD", DatosGenerales.TiposMensaje.Informacion);
                }
                else
                {
                    DatosGenerales.EnviaMensaje(Resp, "Alta de Relacion Aplicación-BD", DatosGenerales.TiposMensaje.Error);
                }
            }
        }
Esempio n. 3
0
        protected void btnProcesar_Click(object sender, EventArgs e)
        {
            if (Page.IsValid)
            {
                BLSoftware objGrupoSoftware = new BLSoftware();
                int        AppSt_Id         = 0;
                int        AppT_Id          = 0;
                int        App_Id           = 0;

                int.TryParse(ddlEstado.SelectedValue, out AppSt_Id);
                int.TryParse(ddlTipo.SelectedValue, out AppT_Id);
                int.TryParse(ddlApp.SelectedValue, out App_Id);

                if (AppSt_Id > 0 && AppT_Id > 0 && App_Id > 0)
                {
                    objGrupoSoftware.ActualizarApp(App_Id, AppSt_Id, AppT_Id, txtNombre.Text.Trim(), txtDescripcion.Text.Trim(), chkEnTFS.Checked, chkProductiva.Checked, txtObservaciones.Text.Trim(), txtUbicacion.Text.Trim());
                }
                else
                {
                    MsgBoxU.AddMessage("Faltan campos por seleccionar", YaBu.MessageBox.uscMsgBox.enmMessageType.Attention);
                }

                objGrupoSoftware.HistoricoApp(this.Page.ToString().Substring(4, this.Page.ToString().Substring(4).Length - 5) + ".aspx", Session["UserNameLogin"].ToString(), "U", App_Id);

                DatosGenerales.EnviaMensaje("Proceso finalizado", "Modificación de aplicación", DatosGenerales.TiposMensaje.Informacion);
            }
        }
        protected void btnProcesarD_Click(object sender, EventArgs e)
        {
            int CapHDD = 0;

            System.Data.DataRow row;

            int.TryParse(txtCapacidad.Text, out CapHDD);

            if (CapHDD > 0)
            {
                row    = USel.NewRow();
                row[0] = ddlUnidad.SelectedValue;
                row[1] = CapHDD.ToString();
                USel.Rows.Add(row);
                USel.AcceptChanges();

                ddlUnidad.DataSource = MinusDT(LetrasUnidad(), "Unidad", USel, "Unidad");
                ddlUnidad.DataBind();

                grdDiscos.DataSource = USel;
                grdDiscos.DataBind();
                txtCapacidad.Text = "";
            }
            else
            {
                MsgBoxU.AddMessage("La capacidad del disco debe ser mayor a cero", YaBu.MessageBox.uscMsgBox.enmMessageType.Attention);
            }
        }
Esempio n. 5
0
        protected void btnProcesar_Click(object sender, EventArgs e)
        {
            BLSoftware objGrupoSoftware = new BLSoftware();
            int        App_Id           = 0;
            string     Res = "";

            int.TryParse(ddlApp.SelectedValue, out App_Id);

            if (App_Id > 0)
            {
                Res = objGrupoSoftware.BorrarAppRelBD(App_Id);

                if (Res == "OK")
                {
                    ProcesarGrid(App_Id);
                    DatosGenerales.EnviaMensaje("Proceso finalizado", "Modificación de relación App-BD", DatosGenerales.TiposMensaje.Informacion);
                }
                else
                {
                    MsgBoxU.AddMessage("Error: " + Res, YaBu.MessageBox.uscMsgBox.enmMessageType.Attention);
                }
            }
            else
            {
                MsgBoxU.AddMessage("Debe seleccionar una aplicación", YaBu.MessageBox.uscMsgBox.enmMessageType.Attention);
            }
        }
Esempio n. 6
0
        protected void btnProcesarD_Click(object sender, EventArgs e)
        {
            int Srv_Id = 0;

            System.Data.DataRow row;

            int.TryParse(ddlBD.SelectedValue, out Srv_Id);

            if (Srv_Id > 0)
            {
                BLCatalogos objCatalogo = new BLCatalogos();

                ProcesarUSel();
                row    = USel.NewRow();
                row[0] = Srv_Id.ToString();
                row[1] = ddlBD.SelectedItem.Text;
                row[2] = chkEsPropietaria.Checked ? "S" : "N";
                USel.Rows.Add(row);
                USel.AcceptChanges();

                ddlBD.DataSource = MinusDT(objCatalogo.ListaBDConServerInstanciaRel(), "AppBD_Id", USel, "AppBD_Id");
                ddlBD.DataBind();

                grdDatos.DataSource = USel;
                grdDatos.DataBind();
            }
            else
            {
                MsgBoxU.AddMessage("Debe seleccionar una BD", YaBu.MessageBox.uscMsgBox.enmMessageType.Attention);
            }

            if (ddlBD.Items.Count > 0)
            {
                ddlBD.SelectedIndex  = 0;
                btnProcesarD.Enabled = true;
            }
            else
            {
                btnProcesarD.Enabled = false;
            }

            chkEsPropietaria.Checked = false;
        }
Esempio n. 7
0
        protected void btnProcesar_Click(object sender, EventArgs e)
        {
            if (Page.IsValid)
            {
                BLSoftware   objGrupoSoftware   = new BLSoftware();
                BLServidores objGrupoServidores = new BLServidores();
                int          AppBD_Id           = 0;
                int          AppSB_Id           = 0;
                DateTime?    AppBD_FechaBaja;

                int.TryParse(ddlBD.SelectedValue, out AppBD_Id);
                int.TryParse(ddlInstanciaBD.SelectedValue, out AppSB_Id);
                txtNombre.Text             = txtNombre.Text.Trim();
                txtCinta.Text              = txtCinta.Text.Trim();
                txtObservacionesCinta.Text = txtObservacionesCinta.Text.Trim();

                AppBD_FechaBaja = DatosGenerales.ConvierteFecha(txtFechaBaja.Text);

                if (txtFechaBaja.Text != "" && AppBD_FechaBaja == null)
                {
                    MsgBoxU.AddMessage("Formato de fecha incorrecto", YaBu.MessageBox.uscMsgBox.enmMessageType.Attention);
                    return;
                }

                if (txtNombre.Text != "" && AppBD_Id > 0 && AppSB_Id > 0)
                {
                    objGrupoSoftware.ActualizarBD(AppBD_Id, AppSB_Id, txtNombre.Text, chkActiva.Checked, chkProductiva.Checked, AppBD_FechaBaja);
                }
                else
                {
                    MsgBoxU.AddMessage("Se debe seleccionar un servidor, una instancia y un nombre", YaBu.MessageBox.uscMsgBox.enmMessageType.Attention);
                }

                if (txtCinta.Text != "" && pnlCinta.Visible == true)
                {
                    objGrupoServidores.RegistrarCinta(DatosGenerales.TiposRespaldoCintas.Base_Datos, AppBD_Id, txtCinta.Text, txtObservacionesCinta.Text, DateTime.Now);
                }

                objGrupoSoftware.HistoricoApp(this.Page.ToString().Substring(4, this.Page.ToString().Substring(4).Length - 5) + ".aspx", Session["UserNameLogin"].ToString(), "U", AppSB_Id);

                DatosGenerales.EnviaMensaje("Proceso finalizado", "Modificación de BD", DatosGenerales.TiposMensaje.Informacion);
            }
        }
        protected void btnProcesar_Click(object sender, EventArgs e)
        {
            if (Page.IsValid)
            {
                BLSoftware objGrupoSoftware = new BLSoftware();
                string     Resp             = "";
                int        AppSt_Id         = 0;
                int        AppT_Id          = 0;
                int        Srv_Id           = 0;
                int        AppBD_Id         = 0;

                int.TryParse(ddlEstado.SelectedValue, out AppSt_Id);
                int.TryParse(ddlTipo.SelectedValue, out AppT_Id);
                int.TryParse(ddlServidorP.SelectedValue, out Srv_Id);
                int.TryParse(ddlBD.SelectedValue, out AppBD_Id);

                if (AppSt_Id > 0 && AppT_Id > 0 && AppBD_Id > 0)
                {
                    Resp = objGrupoSoftware.InsertarAplicacion(AppSt_Id, AppT_Id, txtNombre.Text.Trim(), txtDescripcion.Text.Trim(), chkEnTFS.Checked, chkProductiva.Checked, txtObservaciones.Text.Trim(), txtUbicacion.Text.Trim(), Srv_Id, true, AppBD_Id, true);
                }
                else
                {
                    MsgBoxU.AddMessage("Faltan campos por seleccionar", YaBu.MessageBox.uscMsgBox.enmMessageType.Attention);
                }

                int IdMod = 0;

                int.TryParse(Resp, out IdMod);
                objGrupoSoftware.HistoricoApp(this.Page.ToString().Substring(4, this.Page.ToString().Substring(4).Length - 5) + ".aspx", Session["UserNameLogin"].ToString(), "I", IdMod);

                if (IdMod > 0)
                {
                    DatosGenerales.EnviaMensaje("Proceso finalizado", "Alta de aplicación", DatosGenerales.TiposMensaje.Informacion);
                }
                else
                {
                    DatosGenerales.EnviaMensaje(Resp, "Alta de aplicación", DatosGenerales.TiposMensaje.Error);
                }
            }
        }
Esempio n. 9
0
        protected void btnProcesar_Click(object sender, EventArgs e)
        {
            if (Page.IsValid)
            {
                BLSoftware objGrupoSoftware = new BLSoftware();
                string     Resp             = "";
                int        Srv_Id           = 0;
                int        BD_Id            = 0;

                int.TryParse(ddlServidor.SelectedValue, out Srv_Id);
                int.TryParse(ddlInstanciaBD.SelectedValue, out BD_Id);

                if (Srv_Id > 0 && BD_Id > 0)
                {
                    Resp = objGrupoSoftware.InsertarBDServidor(BD_Id, txtNombre.Text.Trim(), chkActiva.Checked, chkProductiva.Checked);
                }
                else
                {
                    MsgBoxU.AddMessage("Se debe seleccionar un servidor y una instancia de base de datos", YaBu.MessageBox.uscMsgBox.enmMessageType.Attention);
                }

                int IdMod = 0;

                int.TryParse(Resp, out IdMod);
                objGrupoSoftware.HistoricoApp(this.Page.ToString().Substring(4, this.Page.ToString().Substring(4).Length - 5) + ".aspx", Session["UserNameLogin"].ToString(), "I", IdMod);

                if (IdMod > 0)
                {
                    DatosGenerales.EnviaMensaje("Proceso finalizado", "Alta de BD", DatosGenerales.TiposMensaje.Informacion);
                }
                else
                {
                    DatosGenerales.EnviaMensaje(Resp, "Alta de BD", DatosGenerales.TiposMensaje.Error);
                }
            }
        }
Esempio n. 10
0
        protected void btnProcesar_Click(object sender, EventArgs e)
        {
            if (Page.IsValid)
            {
                int NumeroPrestamo = 0;

                int.TryParse(txtNumeroPrestamo.Text, out NumeroPrestamo);

                if (!DatosGenerales.EsFecha(txtFechaDocumento.Text))
                {
                    MsgBoxU.AddMessage("Fecha de documento errónea", YaBu.MessageBox.uscMsgBox.enmMessageType.Attention);
                    return;
                }

                if (!DatosGenerales.EsFecha(txtFechaFirmaEscritura.Text))
                {
                    MsgBoxU.AddMessage("Fecha de firma errónea", YaBu.MessageBox.uscMsgBox.enmMessageType.Attention);
                    return;
                }

                if (!DatosGenerales.EsFecha(txtFechaVigencia.Text))
                {
                    MsgBoxU.AddMessage("Fecha de vigencia errónea", YaBu.MessageBox.uscMsgBox.enmMessageType.Attention);
                    return;
                }

                if (NumeroPrestamo <= 0)
                {
                    MsgBoxU.AddMessage("Número de préstamo incorrecto", YaBu.MessageBox.uscMsgBox.enmMessageType.Attention);
                    return;
                }

                string Archivo = DatosGenerales.GeneraNombreArchivoRnd("Carta_", "pdf");

                Archivo = Path.Combine(Server.MapPath("../Reportes/" + DatosGenerales.RutaLocalReportesDinamicos), Archivo);
                Archivo = Convertir_HTMLaPDF(Archivo, ArmarCadena());

                if (!Archivo.Contains("Error"))
                {
                    BLOperaciones obj        = new BLOperaciones();
                    string        Referencia = "";

                    hddArchivoSencillo.Value = Path.GetFileName(Archivo);
                    hddArchivo.Value         = DatosGenerales.RutaReportesDinamicos + Path.GetFileName(Archivo);
                    Referencia = obj.RegistrarCarta(Session["UserNameLogin"].ToString(), DatosGenerales.ObtieneFecha(txtFechaDocumento.Text), Convert.ToInt32(txtNumeroPrestamo.Text), txtAcreditado.Text, File.ReadAllBytes(Archivo));

                    if (Referencia.Length == 16 && !Referencia.Contains("Error"))
                    {
                        lblReferencia.Text = "Se ha generado la carta asociada a la referencia: " + Referencia + ". " + hddConvenio.Value;
                        btnArchivo.Enabled = true;
                    }
                    else
                    {
                        lblReferencia.Text = Referencia;
                        btnArchivo.Enabled = false;
                    }

                    mp2.Show();
                }
                else
                {
                    DatosGenerales.EnviaMensaje("Error al generar la carta", "Generar carta", DatosGenerales.TiposMensaje.Informacion);
                }
            }
        }
Esempio n. 11
0
        protected void btnProcesarD_Click(object sender, EventArgs e)
        {
            int    CapHDD      = 0;
            int    Srv_Id      = 0;
            int    SrvTA_Id    = 0;
            int    SrvUD_Id    = 0;
            int    idItem      = 0;
            string SrvD_Unidad = "";

            System.Data.DataRow row;

            int.TryParse(txtCapacidad.Text, out CapHDD);
            int.TryParse(ddlServidor.SelectedValue, out Srv_Id);
            int.TryParse(ddlTipoAlmacenamiento.SelectedValue, out SrvTA_Id);
            int.TryParse(ddlUsoDisco.SelectedValue, out SrvUD_Id);
            int.TryParse(ddlEquipo.SelectedValue, out idItem);
            txtObservaciones.Text = txtObservaciones.Text.Trim();

            if (hddAccion.Value == AccionAgregar)
            {
                SrvD_Unidad = ddlUnidad.SelectedValue;
            }
            else
            {
                SrvD_Unidad = lblUnidad.Text;
            }

            if (hddAccion.Value == AccionAgregar && ddlUnidad.Items.Count == 0)
            {
                MsgBoxU.AddMessage("Ya no hay unidades disponibles para asignar", YaBu.MessageBox.uscMsgBox.enmMessageType.Attention);
                return;
            }

            if (!(SrvTA_Id == TipoEquipoDesconocido || SrvTA_Id == TipoEquipoInterno))
            {
                if (!(idItem > 0))
                {
                    MsgBoxU.AddMessage("Debe seleccionar un equipo.", YaBu.MessageBox.uscMsgBox.enmMessageType.Attention);
                    return;
                }
            }

            if (CapHDD > 0 && Srv_Id > 0 && SrvTA_Id > 0 && SrvUD_Id > 0)
            {
                BLSoftware sw = new BLSoftware();

                row    = USel.NewRow();
                row[0] = ddlUnidad.SelectedValue;
                row[1] = CapHDD.ToString();
                USel.Rows.Add(row);
                USel.AcceptChanges();

                ddlUnidad.DataSource = MinusDT(LetrasUnidad(), "SrvD_Unidad", USel, "SrvD_Unidad");
                ddlUnidad.DataBind();

                sw.InsertarDiscoServidorApp(Srv_Id, CapHDD, SrvD_Unidad, SrvTA_Id, SrvUD_Id, idItem, txtObservaciones.Text);

                //CargaDiscos(Srv_Id);
                txtCapacidad.Text = "";
                Response.Redirect("ModificarDiscos.aspx?Srv=" + Srv_Id.ToString());
            }
            else
            {
                MsgBoxU.AddMessage("Información ingresada de manera incorrecta. Verifique.", YaBu.MessageBox.uscMsgBox.enmMessageType.Attention);
            }
        }