public bool UpdateSalesForceVersion(string versionNumber, string accountName) { try { //We need to login to sales force to initiate the process.. //Get the credentials for logging into sales force.. var credentials = _salesForceCredentialFactory.Create(); if (_salesForceInterface.Login(credentials)) { //Update the sales force version of POS.. var isEnabled = _salesForceInterface.UpdateSalesForceVersion(accountName, versionNumber); //Since we have completed all the processing we will log out.. _salesForceInterface.Logout(); return(isEnabled); } } catch (Exception exception) { ServiceLogger.LogException("Exception in UpdateSalesForceVersion", exception); } return(false); }
public PocketVoucherDetail GetPocketVoucherDetail(string accountName) { try { //We need to login to sales force to initiate the process.. //Get the credentials for logging into sales force.. var credentials = _salesForceCredentialFactory.Create(); if (_salesForceInterface.Login(credentials)) { //Get the pocket voucher fields from sales force to return to POS.. var pocketVoucherDetail = _salesForceInterface.GetPocketVoucherDetail(accountName); //Since we have completed all the processing we will log out.. _salesForceInterface.Logout(); return(pocketVoucherDetail); } } catch (Exception exception) { ServiceLogger.LogException("Exception in GetPocketVoucherDetail", exception); } return(null); }