public int RejectGuarantorLoanApplication(GuarantorLoanApplication theLoanReject)
        {
            int ReturnValue = 0;

            using (SqlCommand UpdateCommand = new SqlCommand())
            {
                UpdateCommand.CommandType = CommandType.StoredProcedure;
                UpdateCommand.Parameters.Add(GetParameter("@ReturnValue", SqlDbType.Int, ReturnValue)).Direction = ParameterDirection.Output;
                UpdateCommand.Parameters.Add(GetParameter("@GuarantorLoanApplicationID", SqlDbType.Int, theLoanReject.GuarantorLoanApplicationID));
                UpdateCommand.Parameters.Add(GetParameter("@LoanAppliedBy", SqlDbType.VarChar, theLoanReject.LoanAppliedBy));
                UpdateCommand.Parameters.Add(GetParameter("@LoanApplicantID", SqlDbType.Int, theLoanReject.LoanApplicantID));
                UpdateCommand.Parameters.Add(GetParameter("@LoanApplicationDate", SqlDbType.VarChar, theLoanReject.LoanApplicationDate));
                UpdateCommand.Parameters.Add(GetParameter("@LoanApplicationFee", SqlDbType.Decimal, theLoanReject.LoanApplicationFee));
                UpdateCommand.Parameters.Add(GetParameter("@RequiredFor", SqlDbType.VarChar, theLoanReject.RequiredFor));
                UpdateCommand.Parameters.Add(GetParameter("@LoanAmountApplied", SqlDbType.Decimal, theLoanReject.LoanAmountApplied));
                UpdateCommand.Parameters.Add(GetParameter("@ApprovalStatus", SqlDbType.VarChar, theLoanReject.ApprovalStatus));
                UpdateCommand.Parameters.Add(GetParameter("@Remarks", SqlDbType.VarChar, theLoanReject.Remarks));
                UpdateCommand.Parameters.Add(GetParameter("@OfficeID", SqlDbType.Int, Micro.Commons.Connection.LoggedOnUser.OfficeID));
                UpdateCommand.Parameters.Add(GetParameter("@ModifiedBy", SqlDbType.Int, Micro.Commons.Connection.LoggedOnUser.UserID));
                UpdateCommand.CommandText = "pCRM_GuarantorLoanApplications_Update";
                ExecuteStoredProcedure(UpdateCommand);
                ReturnValue = int.Parse(UpdateCommand.Parameters[0].Value.ToString());
                return(ReturnValue);
            }
        }
Ejemplo n.º 2
0
        public static List <GuarantorLoanApplication> GetGuarantorLoanApplicationListByApprovalStatus(string approvalStatus, bool allOffices = false)
        {
            List <GuarantorLoanApplication> TheGuarantorLoanApplicationList = new List <GuarantorLoanApplication>();

            DataTable TheGuarantorLoanApplicationTable = GuarantorLoanApplicationDataAccess.GetInstance.GetGuarantorLoanApplicationListByApprovalStatus(approvalStatus, allOffices);

            foreach (DataRow dr in TheGuarantorLoanApplicationTable.Rows)
            {
                GuarantorLoanApplication TheGuarantorLoanApplication = DataRowToObject(dr);

                TheGuarantorLoanApplicationList.Add(TheGuarantorLoanApplication);
            }

            return(TheGuarantorLoanApplicationList);
        }
Ejemplo n.º 3
0
        public static List <GuarantorLoanApplication> GetGuarantorLoanApplicationListByApplicantID(int loanApplicantID)
        {
            List <GuarantorLoanApplication> TheGuarantorLoanApplicationList = new List <GuarantorLoanApplication>();

            DataTable TheGuarantorLoanApplicationTable = GuarantorLoanApplicationDataAccess.GetInstance.GetGuarantorLoanApplicationListByApplicantID(loanApplicantID);

            foreach (DataRow dr in TheGuarantorLoanApplicationTable.Rows)
            {
                GuarantorLoanApplication TheGuarantorLoanApplication = DataRowToObject(dr);

                TheGuarantorLoanApplicationList.Add(TheGuarantorLoanApplication);
            }

            return(TheGuarantorLoanApplicationList);
        }
Ejemplo n.º 4
0
        public static List <GuarantorLoanApplication> GetGuarantorLoanApplicationList(bool allOffices = false, bool showDeleted = false)
        {
            List <GuarantorLoanApplication> GuarantorLoanApplicationList = new List <GuarantorLoanApplication>();

            DataTable GetGuarantorLoanApplicationTable = GuarantorLoanApplicationDataAccess.GetInstance.GetGuarantorLoanApplicationList(allOffices, showDeleted);

            foreach (DataRow dr in GetGuarantorLoanApplicationTable.Rows)
            {
                GuarantorLoanApplication TheGuarantorLoanApplication = DataRowToObject(dr);

                GuarantorLoanApplicationList.Add(TheGuarantorLoanApplication);
            }

            return(GuarantorLoanApplicationList);
        }
        public int DeleteGuarantorLoanApplication(GuarantorLoanApplication theGuarantorLoanApplication)
        {
            int ReturnValue = 0;

            using (SqlCommand DeleteCommand = new SqlCommand())
            {
                DeleteCommand.CommandType = CommandType.StoredProcedure;
                DeleteCommand.Parameters.Add(GetParameter("@ReturnValue", SqlDbType.Int, ReturnValue)).Direction = ParameterDirection.Output;
                DeleteCommand.Parameters.Add(GetParameter("@GuarantorLoanApplicationID", SqlDbType.Int, theGuarantorLoanApplication.GuarantorLoanApplicationID));
                DeleteCommand.Parameters.Add(GetParameter("@ModifiedBy", SqlDbType.Int, Micro.Commons.Connection.LoggedOnUser.UserID));
                DeleteCommand.CommandText = "pCRM_GuarantorLoanApplications_Delete";
                ExecuteStoredProcedure(DeleteCommand);
                ReturnValue = int.Parse(DeleteCommand.Parameters[0].Value.ToString());
                return(ReturnValue);
            }
        }
Ejemplo n.º 6
0
        public static GuarantorLoanApplication GetGuarantorLoanApplicationByID(int guarantorLoanApplicationID)
        {
            GuarantorLoanApplication TheGuarantorLoanApplication;
            DataRow GuarantorLoanApplicationRow = GuarantorLoanApplicationDataAccess.GetInstance.GetGuarantorLoanApplicationByID(guarantorLoanApplicationID);

            if (GuarantorLoanApplicationRow != null)
            {
                TheGuarantorLoanApplication = DataRowToObject(GuarantorLoanApplicationRow);
            }
            else
            {
                TheGuarantorLoanApplication = new GuarantorLoanApplication();
            }

            return(TheGuarantorLoanApplication);
        }
Ejemplo n.º 7
0
        public static GuarantorLoanApplication DataRowToObject(DataRow dr)
        {
            GuarantorLoanApplication TheGuarantorLoanApplication = new GuarantorLoanApplication
            {
                GuarantorLoanApplicationID = int.Parse(dr["GuarantorLoanApplicationID"].ToString()),
                LoanAppliedBy         = dr["LoanAppliedBy"].ToString(),
                LoanApplicantID       = int.Parse(dr["LoanApplicantID"].ToString()),
                LoanApplicationNumber = dr["LoanApplicationNumber"].ToString(),
                LoanApplicantName     = dr["LoanApplicantName"].ToString(),
                LoanApplicationDate   = DateTime.Parse(dr["LoanApplicationDate"].ToString()).ToString(MicroConstants.DateFormat),
                LoanApplicationFee    = decimal.Parse(dr["LoanApplicationFee"].ToString()),
                RequiredFor           = dr["RequiredFor"].ToString(),
                LoanAmountApplied     = decimal.Parse(dr["LoanAmountApplied"].ToString()),
                ApprovalStatus        = dr["ApprovalStatus"].ToString(),
                Remarks  = dr["Remarks"].ToString(),
                OfficeID = int.Parse(dr["OfficeID"].ToString())
            };

            return(TheGuarantorLoanApplication);
        }
        public int InsertGuarantorLoanApplication(GuarantorLoanApplication theGuarantorLoanApplication)
        {
            int ReturnValue = 0;

            using (SqlCommand InsertCommand = new SqlCommand())
            {
                InsertCommand.CommandType = CommandType.StoredProcedure;
                InsertCommand.Parameters.Add(GetParameter("@ReturnValue", SqlDbType.Int, ReturnValue)).Direction = ParameterDirection.Output;
                InsertCommand.Parameters.Add(GetParameter("@LoanAppliedBy", SqlDbType.VarChar, theGuarantorLoanApplication.LoanAppliedBy));
                InsertCommand.Parameters.Add(GetParameter("@LoanApplicantID", SqlDbType.Int, theGuarantorLoanApplication.LoanApplicantID));
                InsertCommand.Parameters.Add(GetParameter("@LoanApplicationDate", SqlDbType.VarChar, theGuarantorLoanApplication.LoanApplicationDate));
                InsertCommand.Parameters.Add(GetParameter("@RequiredFor", SqlDbType.VarChar, theGuarantorLoanApplication.RequiredFor));
                InsertCommand.Parameters.Add(GetParameter("@LoanAmountApplied", SqlDbType.Decimal, theGuarantorLoanApplication.LoanAmountApplied));
                InsertCommand.Parameters.Add(GetParameter("@OfficeID", SqlDbType.Int, Micro.Commons.Connection.LoggedOnUser.OfficeID));
                InsertCommand.Parameters.Add(GetParameter("@AddedBy", SqlDbType.Int, Micro.Commons.Connection.LoggedOnUser.UserID));
                InsertCommand.CommandText = "pCRM_GuarantorLoanApplications_Insert";
                ExecuteStoredProcedure(InsertCommand);
                ReturnValue = int.Parse(InsertCommand.Parameters[0].Value.ToString());
                return(ReturnValue);
            }
        }
 public int RejectGuarantorLoanApplication(GuarantorLoanApplication theLoanReject)
 {
     return(GuarantorLoanApplicationIntegration.RejectGuarantorLoanApplication(theLoanReject));
 }
 public int DeleteGuarantorLoanApplication(GuarantorLoanApplication theGuarantorLoanApplication)
 {
     return(GuarantorLoanApplicationIntegration.DeleteGuarantorLoanApplication(theGuarantorLoanApplication));
 }
 public int UpdateGuarantorLoanApplication(GuarantorLoanApplication theGuarantorLoanApplication)
 {
     return(GuarantorLoanApplicationIntegration.UpdateGuarantorLoanApplication(theGuarantorLoanApplication));
 }
 public int InsertGuarantorLoanApplication(GuarantorLoanApplication theGuarantorLoanApplication)
 {
     return(GuarantorLoanApplicationIntegration.InsertGuarantorLoanApplication(theGuarantorLoanApplication));
 }
Ejemplo n.º 13
0
 public static int RejectGuarantorLoanApplication(GuarantorLoanApplication theLoanReject)
 {
     return(GuarantorLoanApplicationDataAccess.GetInstance.RejectGuarantorLoanApplication(theLoanReject));
 }
Ejemplo n.º 14
0
 public static int DeleteGuarantorLoanApplication(GuarantorLoanApplication theGuarantorLoanApplication)
 {
     return(GuarantorLoanApplicationDataAccess.GetInstance.DeleteGuarantorLoanApplication(theGuarantorLoanApplication));
 }