/// <summary> /// To check whether Enable Redeem Receipt printer is enabled from the setting table. /// </summary> /// <param name=""></param> /// <returns >true or false</returns> public bool CheckEnableRedeemPrintCDODB() { string strproc = "CheckEnableRedeemPrintCDODB"; bool bEnableRedeemPrint = false; try { SqlParameter[] sqlparams = CommonDataAccess.GetSettingParameterDB(DBConstants.CONST_SP_PARAM_ENABLEREDEEMPRINTCDO); SqlHelper.ExecuteNonQuery(CommonDataAccess.ExchangeConnectionString, System.Data.CommandType.StoredProcedure, DBConstants.CONST_SP_GETSETTING, sqlparams); if (sqlparams[3].Value != null || sqlparams[3].Value.ToString() != string.Empty) { if (Convert.ToString(sqlparams[3].Value).ToUpper() == "TRUE") { bEnableRedeemPrint = true; } else { bEnableRedeemPrint = false; } } else { bEnableRedeemPrint = false; } } catch (Exception ex) { LogManager.WriteLog(strproc + ex.Message, LogManager.enumLogLevel.Error); ExceptionManager.Publish(ex); bEnableRedeemPrint = false; } return(bEnableRedeemPrint); }
public string VoucherSite() { string VoucherSite = string.Empty; try { SqlParameter[] sqlparams = CommonDataAccess.GetSettingParameterDB(DBConstants.CONST_SP_PARAM_VOUCHERSITENAME); SqlHelper.ExecuteNonQuery(CommonDataAccess.ExchangeConnectionString, System.Data.CommandType.StoredProcedure, DBConstants.CONST_SP_GETSETTING, sqlparams); if (sqlparams[3].Value != null || sqlparams[3].Value.ToString() != string.Empty) { VoucherSite = Convert.ToString(sqlparams[3].Value); } } catch (Exception ex) { ExceptionManager.Publish(ex); } return(VoucherSite); }
/// <summary> /// To Get EnableIssueReceipt from Setting table in Exchange DB /// </summary> /// <param name=""></param> /// <returns type=boolean >bCreateTicketIssueReceipt</returns> public bool CreateTicketIssueReceipt() { bool ShouldIssueReceipt = false; try { SqlParameter[] sqlparams = CommonDataAccess.GetSettingParameterDB(DBConstants.CONST_SP_PARAM_ENABLEISSUERECEIPT); SqlHelper.ExecuteNonQuery(CommonDataAccess.ExchangeConnectionString, System.Data.CommandType.StoredProcedure, DBConstants.CONST_SP_GETSETTING, sqlparams); if (sqlparams[3].Value != null && Convert.ToString(sqlparams[3].Value) != string.Empty && sqlparams[3].Value != DBNull.Value) { ShouldIssueReceipt = Convert.ToBoolean(sqlparams[3].Value); } } catch (Exception ex) { ExceptionManager.Publish(ex); } return(ShouldIssueReceipt); }
/// <summary> /// Retrieve the setting value /// </summary> /// <param name="strConnect"></param> /// <returns>dictionary</returns> public Dictionary <string, string> GetCMPCredentials(string strConnect) { Dictionary <string, string> objDicCMPDetails = new Dictionary <string, string>(); try { //Get the CMP Kiosk URL SqlParameter[] sqlparams = CommonDataAccess.GetSettingParameterDB(DBConstants.CONSTANT_RSP_GETCMPKIOSKURL); string strCMPURL = commonDataAccess.ExecuteQuery(strConnect, sqlparams); if (!String.IsNullOrEmpty(strCMPURL)) { objDicCMPDetails.Add("CMPURL", strCMPURL); } //Get the CMP Application USERNAME SqlParameter[] sqlparams1 = CommonDataAccess.GetSettingParameterDB(DBConstants.CONSTANT_RSP_GETCMPAPPUSER); string strCMPUSER = commonDataAccess.ExecuteQuery(strConnect, sqlparams1); if (!String.IsNullOrEmpty(strCMPUSER)) { objDicCMPDetails.Add("CMPUSER", strCMPUSER); } //Get the CMP Application Password SqlParameter[] sqlparams2 = CommonDataAccess.GetSettingParameterDB(DBConstants.CONSTANT_RSP_GETCMPAPPPWD); string strCMPPWD = commonDataAccess.ExecuteQuery(strConnect, sqlparams2); if (!String.IsNullOrEmpty(strCMPPWD)) { objDicCMPDetails.Add("CMPPWD", strCMPPWD); } } catch (Exception ex) { ExceptionManager.Publish(ex); } return(objDicCMPDetails); }
public string Region() { string Region = string.Empty; try { SqlParameter[] sqlparams = CommonDataAccess.GetSettingParameterDB(DBConstants.CONST_SP_PARAM_REGION); SqlHelper.ExecuteNonQuery(CommonDataAccess.ExchangeConnectionString, CommandType.StoredProcedure, DBConstants.CONST_SP_GETSETTING, sqlparams); if (sqlparams[3].Value != null || sqlparams[3].Value.ToString() != string.Empty) { Region = Convert.ToString(sqlparams[3].Value); } else { Region = string.Empty; } } catch (Exception ex) { ExceptionManager.Publish(ex); } return(Region); }