Example #1
0
        protected override void EditPagoAction()
        {
            bool locked = false;

            if (Pago == null)
            {
                PgMng.ShowInfoException(Face.Resources.Messages.NO_SELECTED);
                return;
            }

            if (Pago.EEstado == moleQule.Base.EEstado.Anulado)
            {
                PgMng.ShowInfoException(Face.Resources.Messages.ITEM_ANULADO_NO_EDIT);
                return;
            }

            PayrollPaymentEditForm form = new PayrollPaymentEditForm(this, _entity, Pago.Oid, locked);

            form.MedioPago_BT.Enabled = false;
            form.ShowDialog(this);

            Payment current = Pago;

            Payments_BS.ResetBindings(false);
            _summary.Refresh(_entity);
            Summary_BS.ResetBindings(false);
            SetGridColors(Pagos_DGW.Name);
            _payrolls = PayrollList.GetListByEmpleado(_entity.Oid, false);
            Select(current);
        }
Example #2
0
        protected virtual void EditEmpleadoAction()
        {
            EmployeeEditForm form = new EmployeeEditForm(Entity, this);

            form.ShowDialog();

            _summary.Refresh(Entity);
            Summary_BS.DataSource = _summary;
            Summary_BS.ResetBindings(false);
        }
Example #3
0
        protected void ChangeState(moleQule.Base.EEstado estado)
        {
            if (Pago == null)
            {
                PgMng.ShowInfoException(Face.Resources.Messages.NO_SELECTED);
                return;
            }

            if (Pago.EEstado == moleQule.Base.EEstado.Anulado)
            {
                PgMng.ShowInfoException(Face.Resources.Messages.ITEM_ANULADO_NO_EDIT);
                return;
            }

            switch (estado)
            {
            case moleQule.Base.EEstado.Anulado:
            {
                if (Pago.EEstado == moleQule.Base.EEstado.Contabilizado)
                {
                    PgMng.ShowInfoException(moleQule.Common.Resources.Messages.NULL_CONTABILIZADO_NOT_ALLOWED);
                    return;
                }

                if (ProgressInfoMng.ShowQuestion(Face.Resources.Messages.NULL_CONFIRM) != DialogResult.Yes)
                {
                    return;
                }
            }
            break;
            }

            try
            {
                _entity.Pagos.ChangeState(estado, Pago, _entity);
                _entity.ApplyEdit();
                _entity.ISave(Pago);
                _entity.BeginEdit();

                Payment current = Pago;
                Payments_BS.ResetBindings(false);
                _summary.Refresh(_entity);
                Summary_BS.ResetBindings(false);
                SetGridColors(Pagos_DGW.Name);
                _payrolls = PayrollList.GetListByEmpleado(_entity.Oid, false);
                Select(current);
            }
            catch (Exception ex)
            {
                PgMng.ShowInfoException(ex);
            }
        }
Example #4
0
        protected override void RefreshAction()
        {
            Payment current = Pago;

            Payments_BS.DataSource = _entity.Pagos.GetSortedList("Fecha", ListSortDirection.Descending);
            Pagos_DGW.Refresh();
            Payments_BS.ResetBindings(false);

            _payrolls = PayrollList.GetListByEmpleado(_entity.Oid, false);
            UpdatePendientes();

            _summary.Refresh(_entity);
            Summary_BS.ResetBindings(false);

            SetGridColors(Pagos_DGW.Name);

            Select(current);
        }