Beispiel #1
0
        public float retValidDelivery(int serialid)
        {
            float res = 0;
            IList <SRVLoanDisburse>   isrvdisburse        = new LoanDAOLinq().getAllLoansLikeSerialID(serialid);
            IList <SRVLoanCollection> iSrvLoanCollections = new LoanCollectionDAOLinq().getAllLoansLikeSerialID(serialid);
            SRVLoanDisburse           srvLoanDisburse     = new StockSerialNo().retLoanDisburse(isrvdisburse, serialid);
            SRVLoanCollection         srvLoanCollection   = new StockSerialNo().retLoanDisburse(iSrvLoanCollections, serialid);
            INVStockSerial            invStockSerial      = new SerialManager().GetSerialByID(serialid);
            int bagcount = new StockSerialNo().getbagcount(invStockSerial.SerialNo);

            if (srvLoanDisburse != null)
            {
                res = (-1) * float.Parse(srvLoanDisburse.LoanAmount.ToString()) * bagcount;
                if (srvLoanCollection != null)
                {
                    res += float.Parse(srvLoanCollection.TotalLoan.ToString());
                }
            }
            return(res);
        }
 public LoanManager()
 {
     _loanDaoLinq           = new LoanDAOLinq();
     _loanDaoCollectionLinq = new LoanCollectionDAOLinq();
 }