//------------------------------------------------------------------------------- //------------------------ Update Loan Status ----------------------------------- public static int UpdateLoanStatus(string loanId, string status) { int output = 0; output = LoanDL.UpdateLoanStatus(loanId, status); return(output); }
//---------------------------------------------------------------------------------------- //--------------- Get basic Loan Details ------------------------------------------------- public static DataSet GetBasicLoanDetails() { DataSet dsLoans = null; try { dsLoans = LoanDL.GetBasicLoanDetails(); } catch (Exception ex) { Console.Out.WriteLine("Error : LoanBL:GetBasicLoanDetails : " + ex.Message.ToString()); } return(dsLoans); }
//------------------------------------------------------------------------------------------ //----------------------- Insert Loan Details ---------------------------------------------- public static int InsertLoanDetails(Loan InsertLoanDetails) { int output = 0; try { output = LoanDL.InsertLoanDetails(InsertLoanDetails); } catch (Exception ex) { Console.Out.WriteLine("Error : LoanBL:InsertLoanDetails : " + ex.Message.ToString()); } return(output); }
//-------------------------------------------------------------------------------- //------------------- Get Customer Details By Customer Id ------------------------ public static Customer GetCustomerById(string customerId) { Customer customerObj = null; try { customerObj = LoanDL.GetCustomerById(customerId); } catch (Exception ex) { Console.Out.WriteLine("Error : LoanBL:GetCustomerById : " + ex.Message.ToString()); } return(customerObj); }
//-------------------------------------------------------------------------------------- //-------------- Search for Loan Details ----------------------------------------------- public static DataSet GetLoansLike(string likeName, string searchOption) { DataSet dsLoans = null; try { dsLoans = LoanDL.GetLoansLike(likeName, searchOption); } catch (Exception ex) { Console.Out.WriteLine("Error : FinTrustBL:GetLoansLike : " + ex.Message.ToString()); } return(dsLoans); }
//---------------------------------------------------------------------------------- //---------- Generate New Loan Id for next ----------------------------------------- public static string GetNewLoanId() { string lastLoanId = null; string newLoanId = null; try { lastLoanId = LoanDL.GetLastLoanId(); if (lastLoanId != null) { newLoanId = UtilityHelper.GenerateLoanId(lastLoanId); } else { newLoanId = "LN1001"; } } catch (Exception ex) { Console.Out.WriteLine("Error : LoanBL : GetNewLoanId() " + ex.Message.ToString()); } return(newLoanId); }