private void seteoFinProyectos() { idPar = Convert.ToInt32(lblPartida.Text); int numPro = cone.ObtenerProyectos(idPar); int presuAc = Convert.ToInt32(txtPresupuesto.Text); int trLibres = Convert.ToInt32(cone.ObtenerTraLibres(idPar)); int trLibNu; int presuNu; if (lblTipoPRoyecto.Text == "web") { MessageBox.Show("El cliente ha quedado encantado con el el proyecto que le hemos entregado! Te ha realizado la transferencia con el pago de 2.000€ "); presuNu = presuAc + 2000; txtPresupuesto.Text = presuNu.ToString(); cone.ActualizarPresupuesto(Convert.ToDouble(presuNu), idPar); trLibNu = trLibres + 2; cone.ActualizarTrLibres(trLibNu, idPar); prgbProyectos.Visible = false; } else if (lblTipoPRoyecto.Text == "app") { MessageBox.Show("El cliente ha quedado encantado con el el proyecto que le hemos entregado! Te ha realizado la transferencia con el pago de 5.000€ "); presuNu = presuAc + 5000; txtPresupuesto.Text = presuNu.ToString(); cone.ActualizarPresupuesto(Convert.ToDouble(presuNu), idPar); trLibNu = trLibres + 6; cone.ActualizarTrLibres(trLibNu, idPar); prgbProyectos2.Visible = false; } else if (lblTipoPRoyecto.Text == "juego") { MessageBox.Show("El cliente ha quedado encantado con el el proyecto que le hemos entregado! Te ha realizado la transferencia con el pago de 15.000€ "); presuNu = presuAc + 15000; txtPresupuesto.Text = presuNu.ToString(); cone.ActualizarPresupuesto(Convert.ToDouble(presuNu), idPar); trLibNu = trLibres + 14; cone.ActualizarTrLibres(trLibNu, idPar); prgbProyectos3.Visible = false; } else if (lblTipoPRoyecto.Text == "multi") { MessageBox.Show("El cliente ha quedado encantado con el el proyecto que le hemos entregado! Te ha realizado la transferencia con el pago de 50.000€ "); presuNu = presuAc + 50000; txtPresupuesto.Text = presuNu.ToString(); cone.ActualizarPresupuesto(Convert.ToDouble(presuNu), idPar); trLibNu = trLibres + 25; cone.ActualizarTrLibres(trLibNu, idPar); prgbProyectos4.Visible = false; } }
public Form4(int pidpar) { InitializeComponent(); cone = new ClsConexion(); lblPartida.Text = pidpar.ToString(); txtPresupuesto.Text = cone.ObtenerPresupuesto(pidpar).ToString(); txtTrabajadores.Text = cone.ObtenerTrabajadores(pidpar).ToString(); txtMotivacion.Text = cone.ObtenerMotivacion(pidpar).ToString(); txtNivel.Text = cone.ObtenerLvlPartida(pidpar).ToString(); lblLvlOf1.Text = cone.ObtenerLvlOfi1(pidpar).ToString(); lblLvlOf2.Text = cone.ObtenerLvlOfi2(pidpar).ToString(); lblLvlOf3.Text = cone.ObtenerLvlOfi3(pidpar).ToString(); lblLvlOf4.Text = cone.ObtenerLvlOfi4(pidpar).ToString(); cone.ActualizarTrLibres(Convert.ToInt32(txtTrabajadores.Text), pidpar); }