protected virtual void SelectExpedienteAction()
        {
            ExpedienteSelectForm form = new ExpedienteSelectForm(this);

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                SetExpediente((ExpedientInfo)form.Selected);
            }
        }
        private void Expediente_BT_Click(object sender, EventArgs e)
        {
            ExpedienteSelectForm form = new ExpedienteSelectForm(this);

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                _expediente        = form.Selected as ExpedientInfo;
                Expediente_TB.Text = _expediente.Codigo;
            }
        }
        protected virtual void SelectExpedienteAction()
        {
            ExpedienteSelectForm form = new ExpedienteSelectForm(this);

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                SetExpediente((ExpedientInfo)form.Selected);
                _entity.SetExpediente(_expediente);
                RefreshConceptos();
            }
        }
        protected override void SelectExpedienteLineaAction()
        {
            if (Datos_Concepto.Current == null)
            {
                return;
            }

            BudgetLine item = Datos_Concepto.Current as BudgetLine;

            ExpedienteSelectForm form = new ExpedienteSelectForm(this);

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                ExpedientInfo source = (ExpedientInfo)form.Selected;

                item.OidExpediente = source.Oid;
                item.Expediente    = source.Codigo;

                //AddCacheItem(source);
            }
        }
        protected override void SelectExpedienteLineaAction()
        {
            if (Datos_Lineas.Current == null)
            {
                return;
            }

            LineaPedido item = Datos_Lineas.Current as LineaPedido;

            ExpedienteSelectForm form = new ExpedienteSelectForm(this);

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                ExpedientInfo source = (ExpedientInfo)form.Selected;

                item.OidExpediente = source.Oid;
                item.Expediente    = source.Codigo;

                ControlsMng.UpdateBinding(Lineas_DGW);
            }
        }
        protected override void SelectLineExpedientAction()
        {
            if (_entity.EHolderType == ETipoEntidad.WorkReport)
            {
                return;
            }

            if (Lines_BS.Current == null)
            {
                return;
            }

            OutputDeliveryLine item = Lines_BS.Current as OutputDeliveryLine;

            if (item.OidPartida != 0)
            {
                ProgressInfoMng.ShowInfo(Resources.Messages.DELIVERY_LINE_EXPEDIENT_WARNING);
                return;
            }

            ExpedienteList expedientes = ExpedienteList.GetListByStockProducto(item.GetInfo(false));

            ExpedienteSelectForm form = new ExpedienteSelectForm(this, expedientes);

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                ExpedientInfo source = (ExpedientInfo)form.Selected;

                if (source.StockKilos < item.CantidadKilos)
                {
                    PgMng.ShowErrorException(Resources.Messages.STOCK_INSUFICIENTE + " " + source.StockKilos.ToString());
                    return;
                }

                item.OidExpediente = source.Oid;
                item.Expediente    = source.Codigo;

                AddCacheItem(source);
            }
        }