コード例 #1
0
        protected void Button2_Click(object sender, EventArgs e)
        {
            vent pvent = new vent();

            pvent.codigo_venta = Convert.ToInt32(cod.Text.Trim());
            pvent.Codigo       = Convert.ToInt32(DropDownList1.Text.Trim());
            pvent.nombre_cli   = nom.Text.Trim();
            pvent.apellido     = ape.Text.Trim();
            pvent.direccion    = direc.Text.Trim();
            pvent.telefono     = Convert.ToInt32(tele.Text.Trim());
            pvent.correo       = correo.Text.Trim();



            int resultado = vent.Actualizar(pvent);

            if (resultado > 0)
            {
                Response.Write("<script>window.alert('venta Actualizado Con Exito en MYSQL');</script>");
            }
            else
            {
                Response.Write("<script>window.alert('venta no Actualizado en MYSQL');</script>");
            }
        }
コード例 #2
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            vent pp = new vent();

            pp.codigo_venta = Convert.ToInt32(cod_venta.Text.Trim());

            if (vent.Eliminar(pp) > 0)
            {
                Response.Write("<script>window.alert('Se elimino exitosamente');</script>");
            }
            else
            {
                Response.Write("<script>window.alert('no se pudo eliminar la venta');</script>");
            }
        }
コード例 #3
0
        private void button2_Click(object sender, EventArgs e)
        {
            vent vpv = new vent();

            vpv.Show(this);
        }