Beispiel #1
0
        private void Administrar_Click(object sender, EventArgs e)
        {
            Boolean        seleccion      = false;
            PresupuestoDTO presupuestoDTO = new PresupuestoDTO();

            foreach (DataGridViewRow row in dataGridView1.Rows)
            {
                bool isSelected = Convert.ToBoolean(row.Cells["Cb"].Value);
                if (isSelected)
                {
                    seleccion         = true;
                    presupuestoDTO.Id = Convert.ToInt32(row.Cells[1].Value);
                    presupuestoDTO.FechaGeneracion  = Convert.ToDateTime(row.Cells[2].Value);
                    presupuestoDTO.FechaVencimiento = Convert.ToDateTime(row.Cells[3].Value);
                    presupuestoDTO.IdCliente        = Convert.ToInt32(row.Cells[4].Value);
                    presupuestoDTO.Estado           = row.Cells[5].Value.ToString();
                    presupuestoDTO.Descuento        = Convert.ToDouble(row.Cells[7].Value);
                    presupuestoDTO.Observacion      = row.Cells[8].Value.ToString();
                }
            }
            if (seleccion)
            {
                this.Hide();
                VAdministrarPresupuesto vAdministrarPresupuesto = new VAdministrarPresupuesto(presupuestoDTO);
                vAdministrarPresupuesto.ShowDialog();
                this.Close();
            }
        }
        private void AsociarPresupuesto_Click(object sender, EventArgs e)
        {
            Boolean seleccion = false;

            foreach (DataGridViewRow row in dataGridView1.Rows)
            {
                bool isSelected = Convert.ToBoolean(row.Cells["Cb"].Value);
                if (isSelected)
                {
                    seleccion = true;
                    IdCliente = Convert.ToInt32(row.Cells[1].Value);
                }
            }
            if (seleccion)
            {
                this.Hide();
                VAdministrarPresupuesto vAdministrarPresupuesto = new VAdministrarPresupuesto(IdCliente, Filas, FechaEvento, FechaVencimiento, IdPresupuesto, Descuento, Observacion);
                vAdministrarPresupuesto.ShowDialog();
                this.Close();
            }
            else
            {
                MessageBox.Show("Debe seleccionar un cliente");
            }
        }
Beispiel #3
0
        private void Agregar_Click(object sender, EventArgs e)
        {
            this.Hide();
            VAdministrarPresupuesto vAdministrarPresupuesto = new VAdministrarPresupuesto();

            vAdministrarPresupuesto.ShowDialog();
            this.Close();
        }
Beispiel #4
0
        private void CargarPresupuesto_Click(object sender, EventArgs e)
        {
            Boolean    seleccion   = false;
            List <int> idProductos = new List <int>();

            foreach (DataGridViewRow row in dataGridView1.Rows)
            {
                bool isSelected = Convert.ToBoolean(row.Cells["Cb"].Value);
                if (isSelected)
                {
                    seleccion = true;
                    int idProducto = Convert.ToInt32(row.Cells[1].Value);
                    idProductos.Add(idProducto);
                }
            }
            if (seleccion)
            {
                this.Hide();
                VAdministrarPresupuesto vAdministrarPresupuesto = new VAdministrarPresupuesto(IdCliente, idProductos, Filas, FechaEvento, FechaVencimiento, IdPresupuesto, Descuento, Observacion);
                vAdministrarPresupuesto.ShowDialog();
                this.Close();
            }
        }
        private void AdministrarPresupuesto_Click(object sender, EventArgs e)
        {
            VAdministrarPresupuesto vAdministrarPresupuesto = new VAdministrarPresupuesto(Convert.ToInt32(NumeroLoteOPresupuestoLabel.Text));

            vAdministrarPresupuesto.ShowDialog();
        }