コード例 #1
0
        private void modificarListaPrecio(int buscarPA)
        {
            Precio precio = new Precio();

            if (precio.ShowDialog() == DialogResult.OK)
            {
                if (validarPrecio(precio.textBox2.Text))
                {
                    ListaPrecio listaPrecio = crearListaPrecio(precio.textBox2.Text);
                    listaPrecio.idListaPrecio = tlp.listaPrecio.ElementAt(buscarPA).idListaPrecio;
                    if (StaticsFunctions.modificarListaPrecio(listaPrecio) == 1)
                    {
                        reiniciar();
                        MessageBox.Show("Menssage", "Modifico Producto");
                    }
                    else
                    {
                        MessageBox.Show("Menssage", "Fallo el envio del producto");
                    }
                }
                else
                {
                    MessageBox.Show("Precio no capturado o camturado incorrecto", "Menssage");
                }
            }
        }
コード例 #2
0
ファイル: Menu.cs プロジェクト: Nikooo2h/Proyecto-sia
 private void Agregar_Click(object sender, EventArgs e)
 {
     Precio pr = new Precio();
     this.AddOwnedForm(pr);
     this.Hide();
     pr.Show();
 }
コード例 #3
0
ファイル: Menu.cs プロジェクト: Nikooo2h/Proyecto-sia
        private void Agregar_Click(object sender, EventArgs e)
        {
            Precio pr = new Precio();

            this.AddOwnedForm(pr);
            this.Hide();
            pr.Show();
        }
コード例 #4
0
        private bool enviarProductoBaseDatos()
        {
            Precio precio = new Precio();

            if (ag != null)
            {
                int buscarPA = encontroProductoAgente();
                if (buscarPA == -1)
                {
                    if (precio.ShowDialog() == DialogResult.OK)
                    {
                        if (validarPrecio(precio.textBox2.Text))
                        {
                            ListaPrecio listaPrecio = crearListaPrecio(precio.textBox2.Text);
                            if (StaticsFunctions.enviarListaPrecio(listaPrecio) == 1)
                            {
                                MessageBox.Show("Menssage", "Envio del producto");
                                return(true);
                            }
                            else
                            {
                                MessageBox.Show("Menssage", "Fallo el envio del producto");
                                return(false);
                            }
                        }
                        else
                        {
                            MessageBox.Show("Precio no capturado o camturado incorrecto", "Menssage");
                            return(false);
                        }
                    }
                    else
                    {
                        return(false);
                    }
                }
                else
                {
                    modificarListaPrecio(buscarPA);
                }
            }
            else
            {
                MessageBox.Show("Menssage", "Primero debe seleccionar el agente");
            }
            return(false);
        }