예제 #1
0
        public int checkBalance()
        {
            DateTime dt             = DateTime.Now;
            int      month          = dt.Month;
            int      balance        = defaultBalance + (month * 2);
            int      acceptedLeaves = leaveBLL.getAcceptedLeaveCountDAL(EmployeeEntity.EmployeeID);

            Console.WriteLine("accepted leave " + acceptedLeaves);
            Console.WriteLine("balance leave " + balance);
            if (balance > acceptedLeaves)
            {
                balance = balance - acceptedLeaves;
                return(balance);
            }
            else
            {
                MessageBox.Show("balance is very low..... ");
                balance = balance - acceptedLeaves;
                return(balance);
            }
        }