Ejemplo n.º 1
0
        private void finalizarVenderProceso_btn_Click(object sender, EventArgs e)
        {
            DialogResult dialogResult = MessageBox.Show("Está seguro que desea realizar esta acción?", Program.Gtitulo, MessageBoxButtons.YesNo);

            if (dialogResult == DialogResult.Yes)
            {
                P.IdVehiculo = idVehiculo;
                P.Tipo       = tipoEstado;
                if (tipoEstado != "vender")
                {
                    string msj = P.CambiarEstadosVehiculo();
                    if (msj == "1")
                    {
                        MessageBox.Show("Estado del vehículo fue sido actualizado correctamente", Program.Gtitulo, MessageBoxButtons.OK, MessageBoxIcon.Information);
                        updateBtn();
                        ObtenerDetallesVehiculo();
                    }
                    else
                    {
                        MessageBox.Show("Estado del vehículo no pudo ser actualizado", Program.Gtitulo, MessageBoxButtons.OK, MessageBoxIcon.Information);
                        ObtenerDetallesVehiculo();
                    }
                }
                else
                {
                    VenderForm form = new VenderForm();
                    form.ShowDialog();
                    ObtenerDetallesVehiculo();
                    //string msj = P.CambiarEstadosVehiculo();
                    //if (msj == "1")
                    //{
                    //    MessageBox.Show("Estado del vehículo fue sido actualizado correctamente", Program.Gtitulo, MessageBoxButtons.OK, MessageBoxIcon.Information);
                    //    updateBtn();
                    //}
                    //else
                    //{
                    //    MessageBox.Show("Estado del vehículo no pudo ser actualizado", Program.Gtitulo, MessageBoxButtons.OK, MessageBoxIcon.Information);

                    //}
                    //P.IdVehiculo = idVehiculo;
                    //string msj = P.InsertarFactura();
                    //if(msj == "1")
                    //{
                    //    Program.GidVehiculoRpt = idVehiculo;
                    //    Program.Greporte = "Factura Venta Vehículo";
                    //    ReportesForm form1 = new ReportesForm();
                    //    form1.Show();
                    //}
                    //else
                    //{
                    //    MessageBox.Show("No se pudo crear factura del vehículo vendido", Program.Gtitulo, MessageBoxButtons.OK, MessageBoxIcon.Information);

                    //}
                }
            }
        }
Ejemplo n.º 2
0
        private void facturacion_btn_Click(object sender, EventArgs e)
        {
            Form fc = Application.OpenForms["VenderForm"];

            if (fc != null)
            {
                fc.BringToFront();
                fc.WindowState = FormWindowState.Normal;
            }
            else
            {
                VenderForm frm = new VenderForm();
                frm.Show();
            }
        }
Ejemplo n.º 3
0
        private void seguro_btn_Click(object sender, EventArgs e)
        {
            Form fc = Application.OpenForms["VenderForm"];

            if (fc != null)
            {
                fc.BringToFront();
                fc.WindowState = FormWindowState.Normal;
            }
            else
            {
                Program.GtipoVentanaFacturar = "Seguro";
                VenderForm frm = new VenderForm();
                frm.Show();
            }
        }