Ejemplo n.º 1
0
        public void ListenerAfterExecuteDependentTask(object sender)
        {
            if (sender.GetType().Equals(typeof(mz.erp.businessrules.ComprobantesPendientes)))
            {
                ComprobantesPendientes comprobantesPendientes = (ComprobantesPendientes)sender;
                this._arrayComprobantesPendientes = comprobantesPendientes.ArrayIdComprobantesPendientes;
                ArrayList TCdestinos = comprobantesPendientes.TiposDeComprobantesDestino;
                if (comprobantesPendientes.RelacionesComprobanteOrigenDestino != null && comprobantesPendientes.RelacionesComprobanteOrigenDestino.Count > 0 && !comprobantesPendientes.HasShowSeleccionItems)
                {
                    this._relacionesComprobantesOrigenDestino = comprobantesPendientes.RelacionesComprobanteOrigenDestino;
                }
                else
                {
                    GetRelacionesComprobantesOrigenDestino(TCdestinos);
                }
                _hasShow = comprobantesPendientes.HasShowSeleccionItems;
            }
            if (sender.GetType().Equals(typeof(mz.erp.businessrules.SeleccionReparacionesPendientes)))
            {
                SeleccionReparacionesPendientes reparacionesPendientes = (SeleccionReparacionesPendientes)sender;
                this._arrayComprobantesPendientes = reparacionesPendientes.ArrayIdComporbantesPendientes;
                GetRelacionesComprobantesOrigenDestinoFromReparaciones();
            }

            if (sender.GetType().Equals(typeof(mz.erp.businessrules.ComprobantesPendientesConsolaEntregas)))
            {
                ComprobantesPendientesConsolaEntregas comprobantesPendientesConsolaEntregas = (ComprobantesPendientesConsolaEntregas)sender;
                this._arrayComprobantesPendientes = comprobantesPendientesConsolaEntregas.ComprobantesSeleccionados;
                GetRelacionesComprobantesOrigenDestino();
                _hasShow = true;
            }
        }
Ejemplo n.º 2
0
        private void LoadFromComprobantesPendientes(ComprobantesPendientes comp)
        {
            this._items.Clear();
            ArrayList compPendientes = comp.ArrayIdComprobantesPendientes;

            foreach (string IdComp in compPendientes)
            {
                //DataTable table = mz.erp.businessrules.tsa_ComprobantesDet.GetList(IdComp, DateTime.MinValue, null, null, long.MinValue).Tables[0];
                DataTable table = mz.erp.businessrules.tsa_ComprobantesDet.GetByPk(IdComp).Tables[0];
                foreach (DataRow row in table.Rows)
                {
                    ItemAjuste item = new ItemAjuste();
                    item.IdProducto = Convert.ToString(row["IdProducto"]);
                    item.Cantidad   = Convert.ToInt64(row["Cantidad"]);
                    this._items.Add(item);
                }
            }
            if (this._items.Count > 0)
            {
                if (ObjectHasChanged != null)
                {
                    ObjectHasChanged(this, new EventArgs());
                }
            }
        }
 public void ListenerAfterExecuteDependentTask(object sender)
 {
     if (sender.GetType() == typeof(mz.erp.businessrules.ComprobantesPendientes))
     {
         ComprobantesPendientes comprobantesPendientes = (ComprobantesPendientes)sender;
         ArrayList rel = comprobantesPendientes.ArrayIdComprobantesPendientes;
         LoadFromRelacionesComprobanteOrigenDestino(rel);
     }
 }
 public void ListenerAfterExecuteDependentTask(object sender)
 {
     if (sender.GetType() == typeof(mz.erp.businessrules.ObtenerComprobantesAsociados))
     {
         ObtenerComprobantesAsociados comprobantes = (ObtenerComprobantesAsociados)sender;
         LoadFromObtenerComprobantesAsociados(comprobantes);
     }
     if (sender.GetType() == typeof(mz.erp.businessrules.ComprobantesPendientes))
     {
         ComprobantesPendientes comprobantes = (ComprobantesPendientes)sender;
         _idComprobantesAAnular = comprobantes.ArrayIdComprobantesPendientes;
     }
 }
Ejemplo n.º 5
0
        public virtual void ListenerAfterExecuteDependentTask(object sender)
        {
            if (sender.GetType() == typeof(mz.erp.businessrules.SeleccionReparacionAjustes))
            {
                SeleccionReparacionAjustes comprobantesAjustes = (SeleccionReparacionAjustes)sender;
                if (this._processParent.Process.ProcessName.Equals("ProcesoTransferenciaMercaderiaAST"))
                {
                    this._ordenReparacion = comprobantesAjustes.ArrayIdComporbantesPendientes[0].ToString();
                }
                //this._ordenesReparacion = comprobantesAjustes.ArrayIdComporbantesPendientes;

                /*
                 * if(comprobantesPendientes.RelacionesComprobanteOrigenDestino != null && comprobantesPendientes.RelacionesComprobanteOrigenDestino.Count > 0)
                 * {
                 *      this.Step(comprobantesPendientes.RelacionesComprobanteOrigenDestino);
                 *      //this.OnRecalcularComprobante(this, new EventArgs());
                 * }
                 */
            }
            if (sender.GetType().Equals(typeof(mz.erp.businessrules.ComprobantesPendientes)))
            {
                ComprobantesPendientes ins = (ComprobantesPendientes)sender;
                LoadFromComprobantesPendientes(ins);
            }
            if (sender.GetType().Equals(typeof(mz.erp.businessrules.SeleccionarInstanciaOrdenReparacion)))
            {
                SeleccionarInstanciaOrdenReparacion ins = (SeleccionarInstanciaOrdenReparacion)sender;
                LoadFromSeleccionarInstanciaOrdenReparacion(ins);
            }

            if (sender.GetType().Equals(typeof(mz.erp.businessrules.RegistrarNumerosDeSerie)))
            {
                if (this._processParent.Process.ProcessName.Equals("ProcesoDevolucionMercaderiaAST"))
                {
                    RegistrarNumerosDeSerie rns = (RegistrarNumerosDeSerie)sender;
                    LoadFromSeleccionarInstanciaOrdenReparacionNS(rns);
                }
            }

            if (sender.GetType().Equals(typeof(mz.erp.businessrules.AjustarStock)))
            {
                if (sender != this)
                {
                    AjustarStock aj = (AjustarStock)sender;
                    LoadFromAjustarStock(aj);
                }
            }
        }
 public ComprobantesPendientesController(mz.erp.businessrules.ComprobantesPendientes comprobantesPendientes)
 {
     this._comprobantesPendientes = comprobantesPendientes;
     Init();
 }