private void toolStripButtonSave_Click(object sender, EventArgs e)
        {
            try
            {
                //calculo el proximo Nro de Cotizacion
                BLL.Procedures.MAXNROCOTIZACION _proxNro = new BLL.Procedures.MAXNROCOTIZACION();
                _proxNro.ItemList();
                Int32 _nroCotizacion = (_proxNro.Resultset[0].nrocotizacion + 1);

                if (this.dataGridRequerimientosParaCotizar.Rows.Count > 0 && VerificaIngreso())
                {
                    for (int i = 0; i < this.dataGridRequerimientosParaCotizar.Rows.Count; i++)
                    {
                        //STORED CORREGIDO.. DISTINGUE EMPRESA
                        BLL.Procedures.INGRESAPEDIDOCOTIZACIONARTICULOEMPRESA _cotizaArt = new BLL.Procedures.INGRESAPEDIDOCOTIZACIONARTICULOEMPRESA();
                        string   _codEmp          = this.comboBoxEmpresa.SelectedValue.ToString();
                        string   _articulo_id     = dataGridRequerimientosParaCotizar.Rows[i].Cells[(int)Col_GridDetalle.ARTICULO].Value.ToString();
                        string   _uniMed          = dataGridRequerimientosParaCotizar.Rows[i].Cells[(int)Col_GridDetalle.UNIDAD].Value.ToString();
                        decimal  _cantidad        = Convert.ToDecimal(dataGridRequerimientosParaCotizar.Rows[i].Cells[(int)Col_GridDetalle.CANTIDAD].Value.ToString(), culture);
                        decimal  _precio          = 0; //NO LO NECESITO
                        string   _Proveed         = this.comboBoxProveed.SelectedValue.ToString();
                        DateTime _fecha           = Convert.ToDateTime(DateTime.Now.ToShortDateString());
                        string   _usuario         = Clases.Usuario.UsuarioLogeado.usuario_Logeado;
                        string   _obs             = (this.textBoxObs.Text == string.Empty) ? "" : this.textBoxObs.Text.Trim();
                        string   _descripArticulo = dataGridRequerimientosParaCotizar.Rows[i].Cells[(int)Col_GridDetalle.DESCRIPCION].Value.ToString();

                        //VERIFICO SI ESTE ARTICULO QUE ESTA PIDIENDO TIENE PENDIENTE DE ENTREGA-....
                        BLL.Procedures.PEDIENTEENTREGAARTICULO _pendiente = new BLL.Procedures.PEDIENTEENTREGAARTICULO();
                        _pendiente.Items(_codEmp, _articulo_id);
                        if (_pendiente.Resultset[0].diferencia > 0)
                        {
                            DialogResult _result = MessageBox.Show("El artículo: " + _descripArticulo + " tiene pendiente de entrega, desea pedir cotización de todos modos?", "Mensaje", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
                            if (_result == DialogResult.OK)
                            {
                                _cotizaArt.ItemList(_codEmp, _nroCotizacion, _articulo_id, _uniMed, _cantidad, _precio, _Proveed, _fecha, _usuario, _obs);
                            }
                        } //FIN VERIFICA PENDIENTE DE ENTREGA
                        else
                        {
                            _cotizaArt.ItemList(_codEmp, _nroCotizacion, _articulo_id, _uniMed, _cantidad, _precio, _Proveed, _fecha, _usuario, _obs);
                        }
                    }
                    string _codEmpresa = this.comboBoxEmpresa.SelectedValue.ToString();
                    GenerarPDFProveedor(_codEmpresa, _nroCotizacion);
                }
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void dataGridViewConsolidado_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                if (e.ColumnIndex == (int)Col_GridDetalle.INCLUIR && e.RowIndex != -1)
                {
                    dataGridViewConsolidado.CommitEdit(DataGridViewDataErrorContexts.Commit);
                    //como no desea pediro.. SACO EL TILDE
                    DataGridViewCheckBoxCell cellSelecion = dataGridViewConsolidado.Rows[e.RowIndex].Cells[(int)Col_GridDetalle.INCLUIR] as DataGridViewCheckBoxCell;
                    if (Convert.ToBoolean(cellSelecion.Value))
                    {
                        //VERIFICO SI ESTE ARTICULO QUE ESTA PIDIENDO TIENE PENDIENTE DE ENTREGA-....
                        BLL.Procedures.PEDIENTEENTREGAARTICULO _pendiente = new BLL.Procedures.PEDIENTEENTREGAARTICULO();
                        string _codEmp   = Clases.Usuario.EmpresaLogeada.EmpresaIngresada.ToString().Trim();
                        string _articulo = dataGridViewConsolidado.Rows[e.RowIndex].Cells[(int)Col_GridDetalle.ARTICULO].Value.ToString();

                        _pendiente.Items(_codEmp, _articulo);
                        if (_pendiente.Resultset[0].diferencia > 0)
                        {
                            DialogResult _result = MessageBox.Show("Este artículo tiene pendiente de entrega, desea pedir cotización de todos modos?", "Mensaje", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
                            if (_result == DialogResult.Cancel)
                            {
                                dataGridViewConsolidado.Rows[e.RowIndex].Cells[(int)Col_GridDetalle.INCLUIR].Value = false;
                                //dataGridViewConsolidado.Rows[e.RowIndex].Cells[(int)Col_GridDetalle.INCLUIR].Selected = false;
                                dataGridViewConsolidado.CommitEdit(DataGridViewDataErrorContexts.Commit);
                            }
                        }
                    }
                }
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }