protected void gridCarro_RowUpdating(object sender, GridViewUpdateEventArgs e)
        {
            objGestion = new GestionDB();
            Carro objCarro = new Carro();

            objCarro.Marca   = (gridCarro.FooterRow.FindControl("txtMarcaPie") as TextBox).Text.Trim();
            objCarro.Modelo  = (gridCarro.FooterRow.FindControl("txtModeloPie") as TextBox).Text.Trim();
            objCarro.Pais    = (gridCarro.FooterRow.FindControl("txtPaisPie") as TextBox).Text.Trim();
            objCarro.Costo   = Convert.ToDecimal((gridCarro.FooterRow.FindControl("txtCostoPie") as TextBox).Text);
            objCarro.IdCarro = Convert.ToInt32(gridCarro.DataKeys[e.RowIndex].Value.ToString());
            int resultado = objGestion.actualizarCarro(objCarro);

            gridCarro.EditIndex = -1;


            if (resultado == 1)
            {
                cargaCarro();
                mostrarMensaje("Actualización con exito", true);
            }
            else
            {
                mostrarMensaje("Existe un error en el registro del Vehiculo", false);
            }
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            Console.WriteLine("Hello world");
            BaseEscrimeEntities db = GestionDB.getContext();
            CLUB unClub            = new CLUB("le club de test", "MermozLand");

            Console.WriteLine(unClub);
            Console.ReadKey();
        }
Esempio n. 3
0
 void cargarCmbHerramientas()
 {
     objBD       = new GestionDB();
     listadoTool = objBD.ListadoHerramienta();
     DropDownListcategoriaHerramienta.DataSource     = listadoTool;
     DropDownListcategoriaHerramienta.DataTextField  = "cat_desc";
     DropDownListcategoriaHerramienta.DataValueField = "cat_id";
     DropDownListcategoriaHerramienta.DataBind();
 }
Esempio n. 4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         GestionDB M_Preferencia  = new GestionDB();
         string    ID_Preferencia = Request.QueryString["ID_Preferencia"];
         DataTable DT_MPREF_Datos = M_Preferencia.BuscarDatosPreferencia(ID_Preferencia);
         TxBx_MPREF_Nombre.Text = DT_MPREF_Datos.Rows[0]["Nombre"].ToString();
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         GestionDB MOrigen   = new GestionDB();
         string    ID_Origen = Request.QueryString["ID_Origen"];
         DataTable Tb_MORG   = MOrigen.BuscarDatosOrigen(ID_Origen);
         TxBx_MORG_Descripcion.Text = Tb_MORG.Rows[0]["OrigenDeConsulta"].ToString();
     }
 }
        protected void gridCarro_RowDeleting(object sender, GridViewDeleteEventArgs e)
        {
            objGestion = new GestionDB();
            Carro objCarro = new Carro();

            objCarro.IdCarro = Convert.ToInt32(gridCarro.DataKeys[e.RowIndex].Value.ToString());
            objGestion.eliminarPersona(objCarro);
            gridCarro.EditIndex = -1;
            cargaCarro();

            mostrarMensaje("Elimino con exito", true);
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         GestionDB MExtra   = new GestionDB();
         string    ID_Extra = Request.QueryString["ID_Extra"];
         DataTable Tb_MEXT  = MExtra.Buscar_Extras(ID_Extra);
         TxBx_MEXT_Nombre.Text      = Tb_MEXT.Rows[0]["Nombre"].ToString();
         TxBX_MEXT_Descripcion.Text = Tb_MEXT.Rows[0]["Descripcion"].ToString();
         TxBx_MEXT_Monto.Text       = Tb_MEXT.Rows[0]["Monto"].ToString();
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         GestionDB M_salida      = new GestionDB();
         string    ID_Salida     = Request.QueryString["ID_Salida"];
         DataTable DT_MSAL_Datos = M_salida.BuscarDatosSalida(ID_Salida);
         DPL_MSAL_Programa.SelectedValue = DT_MSAL_Datos.Rows[0]["ID_Programa"].ToString();
         Date_MSAL_Fecha.Text            = DT_MSAL_Datos.Rows[0]["Fecha"].ToString();
         TxBx_MSAL_Cant_Conf.Text        = DT_MSAL_Datos.Rows[0]["Confirmados"].ToString();
         TxBx_MSAL_PrecioxPersona.Text   = DT_MSAL_Datos.Rows[0]["Precio"].ToString();
     }
 }
        protected void Bt_AGUI_Guardar_Click(object sender, EventArgs e)
        {
            GestionDB A_Guias = new GestionDB();
            bool      runner  = A_Guias.Alta_Guias(DPL_AGUI_Tipo_Doc.SelectedValue, TxBx_AGUI_Nro_doc.Text, TxBx_AGUI_Nombre.Text, TxBx_AGUI_Apellido.Text, TxBx_AGUI_Telefono.Text, TxBx_AGUI_Email.Text, DPL_AGUI_Sexo.SelectedValue);

            if (runner)
            {
                Lb_AGUI_Ready.Text = "<h4>Guardado!</h4>";
            }
            else
            {
                Lb_AGUI_Ready.Text = "<h4>Falla!</h4>";
            }
        }
        protected void Bt_ASAL_Guardar_Click(object sender, EventArgs e)
        {
            GestionDB A_Salidas = new GestionDB();
            bool      runner    = A_Salidas.Alta_Salidas(DPL_ASAL_Programa.SelectedValue, Date_ASAL_Fecha.Text, TxBx_ASAL_Cant_Conf.Text, TxBx_ASAL_PrecioxPersona.Text);

            if (runner)
            {
                Lb_ASAL_Ready.Text = "<h4>Guardado!</h4>";
            }
            else
            {
                Lb_ASAL_Ready.Text = "<h4>Falla!</h4>";
            }
        }
Esempio n. 11
0
        protected void Bt_APREF_Guardar_Click(object sender, EventArgs e)
        {
            GestionDB A_Preferencias = new GestionDB();
            bool      runner         = A_Preferencias.Alta_Preferencia(TxBx_APREF_Nombre.Text);

            if (runner)
            {
                Lb_APREF_Ready.Text = "<h4>Guardado!</h4>";
            }
            else
            {
                Lb_APREF_Ready.Text = "<h4>Falla!</h4>";
            }
        }
Esempio n. 12
0
        protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
        {
            Prog_Sal.Visible = false;
            Email_Bt.Visible = true;
            GestionDB A = new GestionDB();

            string ID_Salida = Convert.ToString(GridView1.SelectedValue);

            A.TempEnvioMails(DropDownList1.SelectedValue, ID_Salida);
            DataTable Cant_Mails_mandar    = A.Cant_Mails_x_Mandar();
            int       Cant_Mails_xx_Mandar = Cant_Mails_mandar.Rows.Count;

            Label1.Text = "<h4>SE ENVIARAN " + Cant_Mails_xx_Mandar + " E-MAILS</h4>";
        }
        protected void Bt_ACLI_Guardar_Click(object sender, EventArgs e)
        {
            GestionDB A_Cliente = new GestionDB();
            bool      runner    = A_Cliente.Alta_Clientes(DPL_ACLI_Tipo_Doc.SelectedValue, TxBx_ACLI_Nro_Doc.Text, TxBx_ACLI_Nombre.Text, TxBx_ACLI_Apellido.Text, Date_ACLI_Fecha_Nac.Text, TxBx_ACLI_Domicilio.Text, DPL_ACLI_Localidad.SelectedValue, DPL_ACLI_Provincia.SelectedValue, TxBx_ACLI_Pais.Text, TxBx_ACLI_Email.Text, TxBx_ACLI_Telefono.Text, DPL_ACLI_Origen.SelectedValue, DPL_ACLI_Sexo.SelectedValue, ChBx_ACLI_Ficha_Med.Checked.ToString());

            if (runner)
            {
                Lb_ACLI_Ready.Text = "<h4>Guardado!</h4>";
            }
            else
            {
                Lb_ACLI_Ready.Text = "<h4>Falla!</h4>";
            }
        }
Esempio n. 14
0
        protected void Bt_AEX_Guardar_Click(object sender, EventArgs e)
        {
            GestionDB A_Extra = new GestionDB();
            bool      runner  = A_Extra.Alta_Extras(TxBx_AEX_Nombre.Text, TxBX_AEX_Descripcion.Text, TxBx_AEX_Monto.Text);

            if (runner)
            {
                Lb_AEXT_ready.Text = "<h4>Guardado!</h4>";
            }
            else
            {
                Lb_AEXT_ready.Text = "<h4>Falla!</h4>";
            }
        }
        protected void Bt_AORG_Guardar_Click(object sender, EventArgs e)
        {
            GestionDB A_Origen = new GestionDB();
            bool      runner   = A_Origen.Alta_Origen(TxBx_AORG_Descripcion.Text);

            if (runner)
            {
                Lb_AORG_Ready.Text = "<h4>Guardado!</h4>";
            }
            else
            {
                Lb_AORG_Ready.Text = "<h4>Falla!</h4>";
            }
        }
Esempio n. 16
0
        protected void Bt_SET_Email_Click(object sender, EventArgs e)
        {
            GestionDB S_Email = new GestionDB();
            bool      runner  = S_Email.Settings_Emails(TxBx_SET_Email.Text, TxBX_SET_Pass.Text);

            if (runner)
            {
                Lb_SET_Email.Text = "<h4>Guardado!</h4>";
            }
            else
            {
                Lb_SET_Email.Text = "<h4>Falla!</h4>";
            }
        }
Esempio n. 17
0
        protected void Bt_MPREF_Guardar_Click(object sender, EventArgs e)
        {
            GestionDB M_Preferencia  = new GestionDB();
            string    ID_Preferencia = Request.QueryString["ID_Preferencia"];
            bool      runner         = M_Preferencia.ModificarPreferencia(ID_Preferencia, TxBx_MPREF_Nombre.Text);

            if (runner)
            {
                Lb_MPREF_Ready.Text = "<h4>Guardado!</h4>";
            }
            else
            {
                Lb_MPREF_Ready.Text = "<h4>Falla!</h4>";
            }
        }
Esempio n. 18
0
        protected void Bt_MGUI_Guardar_Click(object sender, EventArgs e)
        {
            GestionDB M_Guias   = new GestionDB();
            string    M_ID_Guia = Request.QueryString["ID_Guia"];
            bool      runner    = M_Guias.Modificar_Guia(M_ID_Guia, DPL_MGUI_Tipo_Doc.SelectedValue, TxBx_MGUI_Nro_doc.Text, TxBx_MGUI_Nombre.Text, TxBx_MGUI_Apellido.Text, TxBx_MGUI_Telefono.Text, TxBx_MGUI_Email.Text, DPL_MGUI_Sexo.SelectedValue);

            if (runner)
            {
                Lb_MGUI_Ready.Text = "<h4>Guardado!</h4>";
            }
            else
            {
                Lb_MGUI_Ready.Text = "<h4>Falla!</h4>";
            }
        }
        protected void Bt_MORG_Guardar_Click(object sender, EventArgs e)
        {
            GestionDB M_Origen    = new GestionDB();
            string    M_ID_Origen = Request.QueryString["ID_Origen"];
            bool      runner      = M_Origen.Modificar_Origen(M_ID_Origen, TxBx_MORG_Descripcion.Text);

            if (runner)
            {
                Lb_MORG_Ready.Text = "<h4>Guardado!</h4>";
            }
            else
            {
                Lb_MORG_Ready.Text = "<h4>Falla!</h4>";
            }
        }
        protected void Bt_MSAL_Guardar_Click(object sender, EventArgs e)
        {
            GestionDB M_salida  = new GestionDB();
            string    ID_Salida = Request.QueryString["ID_salida"];
            bool      runner    = M_salida.ModificarSalida(ID_Salida, Date_MSAL_Fecha.Text, TxBx_MSAL_Cant_Conf.Text, TxBx_MSAL_PrecioxPersona.Text);

            if (runner)
            {
                Lb_MSAL_Ready.Text = "<h4>Guardado!</h4>";
            }
            else
            {
                Lb_MSAL_Ready.Text = "<h4>Falla!</h4>";
            }
        }
        protected void Bt_MEXT_Guardar_Click(object sender, EventArgs e)
        {
            GestionDB M_Extra    = new GestionDB();
            string    M_ID_Extra = Request.QueryString["ID_Extra"];
            bool      runner     = M_Extra.Modificar_Extra(M_ID_Extra, TxBx_MEXT_Nombre.Text, TxBX_MEXT_Descripcion.Text, TxBx_MEXT_Monto.Text);

            if (runner)
            {
                Lb_MEXT_ready.Text = "<h4>Guardado!</h4>";
            }
            else
            {
                Lb_MEXT_ready.Text = "<h4>Falla!</h4>";
            }
        }
Esempio n. 22
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         GestionDB MGuia   = new GestionDB();
         string    ID_Guia = Request.QueryString["ID_Guia"];
         DataTable Tb_MGUI = MGuia.BuscarDatosGuia(ID_Guia);
         TxBx_MGUI_Email.Text            = Tb_MGUI.Rows[0]["Email"].ToString();
         TxBx_MGUI_Nombre.Text           = Tb_MGUI.Rows[0]["Nombre"].ToString();
         TxBx_MGUI_Nro_doc.Text          = Tb_MGUI.Rows[0]["Numero_Documento"].ToString();
         TxBx_MGUI_Telefono.Text         = Tb_MGUI.Rows[0]["Telefono"].ToString();
         TxBx_MGUI_Apellido.Text         = Tb_MGUI.Rows[0]["Apellido"].ToString();
         DPL_MGUI_Sexo.SelectedValue     = Tb_MGUI.Rows[0]["Sexo"].ToString();
         DPL_MGUI_Tipo_Doc.SelectedValue = Tb_MGUI.Rows[0]["Tipo_Documento"].ToString();
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         GestionDB M_program     = new GestionDB();
         string    ID_Programa   = Request.QueryString["ID_Programa"];
         DataTable DT_MPRG_Datos = M_program.BuscarDatosPrograma(ID_Programa);
         TxBx_MPRG_Nombre.Text        = DT_MPRG_Datos.Rows[0]["Nombre"].ToString();
         TxBX_MPRG_Descripcion.Text   = DT_MPRG_Datos.Rows[0]["Descripcion"].ToString();
         TxBX_MPRG_Cupo_Min.Text      = DT_MPRG_Datos.Rows[0]["Cupo_Min"].ToString();
         TxBx_MPRG_Cupo_Max.Text      = DT_MPRG_Datos.Rows[0]["Cupo_Max"].ToString();
         TxBx_MPRG_PrcioxPersona.Text = DT_MPRG_Datos.Rows[0]["PrecioDelPrograma"].ToString();
         string[] IDs_Preferenica = M_program.ObtenerIDsPrefXProgr(ID_Programa);
         MarcarCxBxSeleccionado(IDs_Preferenica);
     }
 }
Esempio n. 24
0
        protected void btnactualizar_Click(object sender, EventArgs e)
        {
            objBD = new GestionDB();
            ControlHerramienta objTool = new ControlHerramienta();

            objTool.ct_codigo = txtCT_codigo.Text;


            bool resultado = objBD.actualizarRegistro(objTool);


            if (resultado)
            {
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "scr1", "Swal.fire('Se actualizó con exito el registro')", true);
                return;
            }

            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "scr1", "alert('No se pudo actualizar el registro')", true);
        }
Esempio n. 25
0
        protected void btnregistrar_Click(object sender, EventArgs e)
        {
            objBD = new GestionDB();
            ControlHerramienta objTool = new ControlHerramienta();

            objTool.ct_nombre = txtCT_nombre.Text;
            objTool.ct_codigo = txtCT_codigo.Text;
            objTool.ct_marca  = txtCT_marca.Text;
            objTool.ct_cate   = DropDownListcategoriaHerramienta.Text;
            objTool.ct_precio = Convert.ToDecimal(txtCT_precio.Text);

            bool resultado = objBD.registrarHerramienta(objTool);


            if (resultado)
            {
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "scr1", "Swal.fire('Registro con exito')", true);
                return;
            }

            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "scr1", "alert('No se logro registrar')", true);
        }
Esempio n. 26
0
        protected void GridView2_SelectedIndexChanged(object sender, EventArgs e)
        {
            string c = GridView2.SelectedValue.ToString();

            GestionDB nuevo = new GestionDB();
            string    PS    = nuevo.obtenerPrecioSalida(c).ToString();
            string    TS    = nuevo.obtenerPrecioTotalSalida(c).ToString();
            string    TE    = nuevo.obtenerPrecioExtra(c).ToString();
            string    TP    = nuevo.obtenerPagoTotal(c).ToString();

            int OPS = Convert.ToInt16(TS) - Convert.ToInt16(TP);

            Label_txt.Text  = TS;
            Label5_txt.Text = PS;
            Label2_txt.Text = TE;
            Label3_txt.Text = TP;
            Label4_txt.Text = OPS.ToString();

            Resto.Visible   = true;
            Cliente.Visible = true;
            Salida.Visible  = true;
        }
        protected void Bt_APRG_Guardar_Click(object sender, EventArgs e)
        {
            GestionDB A_Programa = new GestionDB();
            bool      runner     = A_Programa.Alta_Programa(TxBx_APRG_Nombre.Text, TxBX_APRG_Descripcion.Text, TxBX_APRG_Cupo_Min.Text, TxBx_APRG_Cupo_Max.Text, TxBx_APRG_PrcioxPersona.Text);

            if (runner)
            {
                int ID_Programa = A_Programa.ObtenerUltimoPrograma();
                foreach (ListItem Item in CBX_APRG_Preferencia.Items)
                {
                    if (Item.Selected)
                    {
                        string ID_Preferencia = Item.Value;
                        A_Programa.CargarProgXPref(ID_Programa.ToString(), ID_Preferencia);
                    }
                }
                Lb_APROG_Ready.Text = "<h4>Guardado!</h4>";
            }
            else
            {
                Lb_APROG_Ready.Text = "<h4>Falla!</h4>";
            }
        }
        protected void gridCarro_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName.Equals("AddNew"))
            {
                objGestion = new GestionDB();
                Carro objCarro = new Carro();
                objCarro.Marca  = (gridCarro.FooterRow.FindControl("txtMarcaPie") as TextBox).Text.Trim();
                objCarro.Modelo = (gridCarro.FooterRow.FindControl("txtModeloPie") as TextBox).Text.Trim();
                objCarro.Pais   = (gridCarro.FooterRow.FindControl("txtPaisPie") as TextBox).Text.Trim();
                objCarro.Costo  = Convert.ToDecimal((gridCarro.FooterRow.FindControl("txtCostoPie") as TextBox).Text);
                int resultado = objGestion.registrarCarro(objCarro);

                if (resultado == 1)
                {
                    cargaCarro();
                    mostrarMensaje("Registro con exito", true);
                }
                else
                {
                    mostrarMensaje("Existe un error en el registro del Vehiculo", false);
                }
            }
        }
        void cargaCarro()
        {
            DataTable datosCarro = new DataTable();

            objGestion = new GestionDB();
            datosCarro = objGestion.cargaCarro();

            if (datosCarro.Rows.Count > 0)
            {
                gridCarro.DataSource = datosCarro;
                gridCarro.DataBind();
            }
            else
            {
                datosCarro.Rows.Add(datosCarro.NewRow());
                gridCarro.DataSource = datosCarro;
                gridCarro.DataBind();
                gridCarro.Rows[0].Cells.Clear();
                gridCarro.Rows[0].Cells.Add(new TableCell());
                gridCarro.Rows[0].Cells[0].ColumnSpan      = datosCarro.Columns.Count;
                gridCarro.Rows[0].Cells[0].Text            = "No hay datos que mostrar.....";
                gridCarro.Rows[0].Cells[0].HorizontalAlign = HorizontalAlign.Center;
            }
        }
        protected void Bt_MPRG_Guardar_Click(object sender, EventArgs e)
        {
            GestionDB M_program   = new GestionDB();
            string    ID_Programa = Request.QueryString["ID_Programa"];
            bool      runner      = M_program.ModificarPrograma(ID_Programa, TxBx_MPRG_Nombre.Text, TxBX_MPRG_Descripcion.Text, TxBX_MPRG_Cupo_Min.Text, TxBx_MPRG_Cupo_Max.Text, TxBx_MPRG_PrcioxPersona.Text);

            if (runner)
            {
                M_program.EliminarRegistroDePreferencias(ID_Programa);
                foreach (ListItem Item in CBX_MPRG_Preferencia.Items)
                {
                    if (Item.Selected)
                    {
                        string ID_Preferencia = Item.Value;
                        M_program.CargarProgXPref(ID_Programa, ID_Preferencia);
                    }
                }
                Lb_MPRG_Ready.Text = "<h4>Guardado!</h4>";
            }
            else
            {
                Lb_MPRG_Ready.Text = "<h4>Falla!</h4>";
            }
        }