Пример #1
0
        private void BtnAccept_Click(object sender, EventArgs e)
        {
            C.UpdateCashMovementDescription(CashMovementId, txtObservation.Text.ToString());
            MessageBox.Show("Se ha actualizado la observación correctamente", "Ok", MessageBoxButtons.OK, MessageBoxIcon.Information);
            L.Action     = "El usuario " + Users.CacheUser.Nick + " modificó la observación del movimiento monetario " + CashMovementId;
            L.ActionDate = DateTime.Now;
            L._users.Id  = Users.CacheUser.Id;
            L.WriteLog(L);
            if (_owner.chbIngress.Checked == false && _owner.chbEgress.Checked == false)
            {
                _owner.LoadDgvByDate();
                _owner.categoryType = 0;
                _owner.dgvCashMovement.Rows[_owner.dgvCashMovement.Rows.Count - 1].Selected = true;
            }

            if ((_owner.chbIngress.Checked == true || _owner.chbEgress.Checked == true) && _owner.chbCategory.Checked == true)
            {
                _owner.LoadDgvByDateAndCategoryType();
                _owner.dgvCashMovement.Rows[_owner.dgvCashMovement.Rows.Count - 1].Selected = true;
            }

            if ((_owner.chbIngress.Checked == true || _owner.chbEgress.Checked == true) && _owner.chbCategory.Checked == false)
            {
                _owner.LoadDgvByDateAndCategory();
                _owner.dgvCashMovement.Rows[_owner.dgvCashMovement.Rows.Count - 1].Selected = true;
            }
            this.Close();
        }
Пример #2
0
        private void FrmNewCashMovement_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (_owner.dgvCashMovement.Rows.Count > 0)
            {
                if (_owner.chbIngress.Checked == false && _owner.chbEgress.Checked == false)
                {
                    _owner.LoadDgvByDate();
                    _owner.dgvCashMovement.ClearSelection();
                    _owner.categoryType = 0;
                    _owner.dgvCashMovement.Rows[_owner.dgvCashMovement.Rows.Count - 1].Selected = true;
                }

                if ((_owner.chbIngress.Checked == true || _owner.chbEgress.Checked == true) && _owner.chbCategory.Checked == true)
                {
                    _owner.LoadDgvByDateAndCategoryType();
                    _owner.dgvCashMovement.ClearSelection();
                    _owner.dgvCashMovement.Rows[_owner.dgvCashMovement.Rows.Count - 1].Selected = true;
                }

                if ((_owner.chbIngress.Checked == true || _owner.chbEgress.Checked == true) && _owner.chbCategory.Checked == false)
                {
                    _owner.LoadDgvByDateAndCategory();
                    _owner.dgvCashMovement.ClearSelection();
                    _owner.dgvCashMovement.Rows[_owner.dgvCashMovement.Rows.Count - 1].Selected = true;
                }
            }
        }