コード例 #1
0
        protected override void NuevoConceptoAction()
        {
            if (_entity.OidSerie == 0)
            {
                PgMng.ShowInfoException(Resources.Messages.NO_SERIE_SELECTED);
                return;
            }

            if (_entity.OidCliente == 0)
            {
                PgMng.ShowInfoException(Resources.Messages.NO_CLIENT_SELECTED);
                return;
            }

            _cliente = Datos_Cliente.Current as ClienteInfo;
            BudgetLineAddForm form = new BudgetLineAddForm(ETipoProducto.Almacen, _entity, _serie, _cliente, this);

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                _entity.CalculaTotal();

                if (_entity.Conceptos.Count > 0)
                {
                    Serie_BT.Enabled = false;
                }

                RefreshConceptos();
                ControlsMng.UpdateBinding(Datos);

                HideComponentes();
            }
        }
コード例 #2
0
        protected override void NuevoConceptoLibreAction()
        {
            if (_entity.OidSerie == 0)
            {
                PgMng.ShowInfoException(Resources.Messages.NO_SERIE_SELECTED);
                return;
            }

            if (_entity.OidCliente == 0)
            {
                PgMng.ShowInfoException(Resources.Messages.NO_CLIENT_SELECTED);
                return;
            }

            _cliente = Datos_Cliente.Current as ClienteInfo;

            BudgetLineAddForm form = new BudgetLineAddForm(ETipoProducto.Libres, _entity, _serie, _cliente, this);

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                _entity.CalculaTotal();
                RefreshConceptos();
            }
        }