Beispiel #1
0
        public bool CheckAdvanceAmount(string employeeId, string amount)
        {
            bool Cancel = true;

            try
            {
                decimal          decEmployeeId     = 0;
                AdvancePaymentSP spAdvancePayment  = new AdvancePaymentSP();
                decimal          decEmployeesalary = 0;
                if (employeeId != string.Empty)
                {
                    decEmployeeId = Convert.ToDecimal(employeeId);
                }
                decEmployeesalary = spAdvancePayment.AdvancePaymentAmountchecking(decEmployeeId);

                decimal txtamountvalue = 0;
                if (amount != string.Empty)
                {
                    txtamountvalue = Convert.ToDecimal(amount);
                }
                if (txtamountvalue > decEmployeesalary)
                {
                    Cancel = false;
                }
            }
            catch (Exception ex)
            {
            }
            return(Cancel);
        }
Beispiel #2
0
        public decimal AdvancePaymentAmountchecking(decimal decEmployeeId)
        {
            decimal decAdvanceAmount = 0;

            try
            {
                decAdvanceAmount = spAdvancePayment.AdvancePaymentAmountchecking(decEmployeeId);
            }
            catch (Exception ex)
            {
                MessageBox.Show("AP10:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            return(decAdvanceAmount);
        }