public bool UpdateMember(string strMembershipID, object dateDob, bool fAirCrew, bool fBoundCheck, bool fEmail, bool fGiroFailed, bool fPostalMail, bool fSingaporean, bool fSMS, int nLoyaltyStatusID, string strAdd1, string strAdd2, string strAltEmail, string strCardName, string strCompany, string strCreditCardNo, string strEmail, string strEmergencyContactNo, string strEmergencyContactPerson, string strHomeNo, string strMemberName, string strMobileNo, string strNIRCFIN, string strOccupation, string strOfficeNo, string strPagerNo, string strPostalCode, string strRemark, int nMediaSourceID, string strMediaSource, string strBeforePhoto, string strAfterPhoto, byte[] imgPhoto, User aUser, bool fFemale, bool fPhoneCall, string strSecurityQuestion, string strSecurityAnswer, string strMobileAppPwd) { ACMSDAL.ConnectionProvider connProvider = new ConnectionProvider(); TblMember sqlMember = new TblMember(); TblAudit sqlAudit = new TblAudit(); bool isSuccess = false; try { sqlMember.MainConnectionProvider = connProvider; sqlAudit.MainConnectionProvider = connProvider; connProvider.OpenConnection(); connProvider.BeginTransaction("UpdateMemberRecord"); sqlMember.StrMembershipID = strMembershipID; sqlMember.FFemale = fFemale; sqlMember.FAirCrew = fAirCrew; sqlMember.FBounceCheck = fBoundCheck; sqlMember.FEmail = fEmail; sqlMember.FGIROFailed = fGiroFailed; sqlMember.FPostalMail = fPostalMail; sqlMember.FSingaporean = fSingaporean; sqlMember.FSMS = fSMS; sqlMember.FPhoneCall = fPhoneCall; if (nLoyaltyStatusID != 0) { sqlMember.NLoyaltyStatusID = nLoyaltyStatusID; } sqlMember.StrAddress1 = strAdd1; sqlMember.StrAddress2 = strAdd2; sqlMember.StrAltEmail = strAltEmail; sqlMember.StrCardName = strCardName; sqlMember.StrCompany = strCompany; sqlMember.StrCreditCardNo = strCreditCardNo; sqlMember.StrEmail = strEmail; sqlMember.StrEmergencyContactNumber = strEmergencyContactNo; sqlMember.StrEmergencyContactPerson = strEmergencyContactPerson; sqlMember.StrHomeNo = strHomeNo; sqlMember.StrMemberName = strMemberName; sqlMember.StrMobileNo = strMobileNo; sqlMember.StrNRICFIN = strNIRCFIN; sqlMember.StrOccupation = strOccupation; sqlMember.StrOfficeNo = strOfficeNo; sqlMember.StrPagerNo = strPagerNo; sqlMember.StrPostalCode = strPostalCode; sqlMember.StrRemarks = strRemark; sqlMember.NMediaSourceID = nMediaSourceID; sqlMember.StrMediaSource = strMediaSource; sqlMember.NEmployeeID = aUser.NEmployeeID(); sqlMember.StrSecurityQuestion = strSecurityQuestion; sqlMember.StrSecurityAnswer = strSecurityAnswer; sqlMember.StrPassword = strMobileAppPwd; sqlMember.Update2(dateDob, strBeforePhoto, strAfterPhoto, imgPhoto); sqlAudit.NAuditTypeID = ACMSLogic.AuditTypeID.MemberRecord; sqlAudit.NEmployeeID = aUser.NEmployeeID(); sqlAudit.StrAuditEntry = "Update member " + strMembershipID; sqlAudit.StrReference = strMembershipID; sqlAudit.DtDate = DateTime.Now; sqlAudit.Insert(); connProvider.CommitTransaction(); isSuccess = true; } catch (Exception) { connProvider.RollbackTransaction("UpdateMemberRecord"); throw; } finally { if (connProvider.CurrentTransaction != null) { connProvider.CurrentTransaction.Dispose(); } if (connProvider.DBConnection != null) { if (connProvider.DBConnection.State == ConnectionState.Open) { connProvider.DBConnection.Close(); } connProvider.DBConnection.Dispose(); } sqlMember.Dispose(); sqlAudit.Dispose(); } return(isSuccess); }