public bool CreateShortPayForApproval(Treasury objTreasury, ref int iShortPayID)
        {
            System.Data.SqlClient.SqlParameter ShortPayID = DataBaseServiceHandler.AddParameter <int>("@ShortPayID",
                                                                                                      DbType.Int32, 0, ParameterDirection.InputOutput);

            try
            {
                DataBaseServiceHandler.ExecuteNonQuery(CommonDataAccess.ExchangeConnectionString, CommandType.StoredProcedure, DBConstants.CONST_SP_CREATE_SHORTPAY_FOR_APPROVAL,
                                                       DataBaseServiceHandler.AddParameter <int>("@Installation_No", DbType.Int32, objTreasury.InstallationNumber),
                                                       DataBaseServiceHandler.AddParameter <int>("@User_No", DbType.Int32, objTreasury.UserID),
                                                       DataBaseServiceHandler.AddParameter <string>("@Treasury_Type", DbType.String, objTreasury.TreasuryType),
                                                       DataBaseServiceHandler.AddParameter <string>("@Treasury_Reason", DbType.String, objTreasury.TreasuryReason),
                                                       DataBaseServiceHandler.AddParameter <double>("@Treasury_Amount", DbType.Double, objTreasury.TreasuryAmount),
                                                       DataBaseServiceHandler.AddParameter <int>("@Treasury_Reason_Code", DbType.Int32, objTreasury.TreasuryReasonCode),
                                                       DataBaseServiceHandler.AddParameter <int>("@Treasury_Issuer_User_No", DbType.Int32, objTreasury.TreasuryIssuerUserNo),
                                                       ShortPayID
                                                       );

                iShortPayID = int.Parse(ShortPayID.Value.ToString());

                return(true);
            }
            catch (Exception ex)
            {
                ExceptionManager.Publish(ex);
                return(false);
            }
        }
Beispiel #2
0
        public bool UpdateEventDetails(string clearType, string eventType, int eventNo, int installationNo)
        {
            int    errorCode    = 0;
            string errorMessage = string.Empty;

            try
            {
                LogManager.WriteLog("Inside Method", LogManager.enumLogLevel.Info);

                DataBaseServiceHandler.ExecuteNonQuery(CommonDataAccess.ExchangeConnectionString,
                                                       CommandType.StoredProcedure, DBConstants.CONST_SP_USP_CLEAREVENTDETAILS,
                                                       DataBaseServiceHandler.AddParameter <int>(DBConstants.CONST_PARAM_USER_ID, DbType.Int32, BMC.Security.SecurityHelper.CurrentUser.SecurityUserID, ParameterDirection.Input),
                                                       DataBaseServiceHandler.AddParameter <string>(DBConstants.CONST_PARAM_CLEAR_TYPE, DbType.String, clearType, ParameterDirection.Input),
                                                       DataBaseServiceHandler.AddParameter <string>(DBConstants.CONST_PARAM_EVENTTYPE, DbType.String, eventType, ParameterDirection.Input),
                                                       DataBaseServiceHandler.AddParameter <int>(DBConstants.CONST_PARAM_EVENT_NO, DbType.Int32, eventNo, ParameterDirection.Input),
                                                       DataBaseServiceHandler.AddParameter <int>(DBConstants.CONST_PARAM_INSTALATION_NO, DbType.Int32, installationNo, ParameterDirection.Input),
                                                       DataBaseServiceHandler.AddParameter <int>(DBConstants.CONST_PARAM_ERROR_CODE, DbType.Int32, errorCode, ParameterDirection.Output),
                                                       DataBaseServiceHandler.AddParameter <string>(DBConstants.CONST_PARAM_ERROR_MESSAGE, DbType.String, errorMessage, ParameterDirection.Output));

                LogManager.WriteLog(string.Format("{0} - {1}", "Error Code", errorCode.ToString()), LogManager.enumLogLevel.Info);
                LogManager.WriteLog(string.Format("{0} - {1}", "Error Message", errorMessage), LogManager.enumLogLevel.Info);

                return(errorCode == 0 ? true : false);
            }
            catch (Exception ex)
            {
                ExceptionManager.Publish(ex);
                return(false);
            }
        }
        public bool SetMachinePreviousState(int installationNo)
        {
            int    errorCode    = 0;
            string errorMessage = string.Empty;

            try
            {
                LogManager.WriteLog("Inside Method", LogManager.enumLogLevel.Info);

                DataBaseServiceHandler.ExecuteNonQuery(CommonDataAccess.ExchangeConnectionString,
                                                       CommandType.StoredProcedure, DBConstants.CONST_SP_USP_UPDATEMACHINEMAINTENANCEDETAILS,
                                                       DataBaseServiceHandler.AddParameter <int>(DBConstants.CONST_PARAM_INSTALATION_NO, DbType.Int32, installationNo, ParameterDirection.Input),
                                                       DataBaseServiceHandler.AddParameter <int>(DBConstants.CONST_PARAM_ERROR_CODE, DbType.Int32, errorCode, ParameterDirection.Output),
                                                       DataBaseServiceHandler.AddParameter <string>(DBConstants.CONST_PARAM_ERROR_MESSAGE, DbType.String, errorMessage, ParameterDirection.Output));

                LogManager.WriteLog(string.Format("{0} - {1}", "Error Code", errorCode.ToString()), LogManager.enumLogLevel.Info);
                LogManager.WriteLog(string.Format("{0} - {1}", "Error Message", errorMessage), LogManager.enumLogLevel.Info);

                return(errorCode == 0 ? true : false);
            }
            catch (Exception ex)
            {
                ExceptionManager.Publish(ex);
                return(false);
            }
        }
        public string GetSetting(string strSettingName)
        {
            SqlParameter ParamValue = new SqlParameter();

            ParamValue.ParameterName = DBConstants.CONST_SP_PARAM_SETTINGVALUE;
            ParamValue.Direction     = ParameterDirection.Output;
            ParamValue.Value         = string.Empty;
            ParamValue.SqlDbType     = SqlDbType.VarChar;
            ParamValue.Size          = 200;

            try
            {
                if (strSettingName != null)
                {
                    //DataBaseServiceHandler.ConnectionString = ExchangeConnectionString;
                    DataBaseServiceHandler.ExecuteNonQuery(CommonDataAccess.ExchangeConnectionString, CommandType.StoredProcedure, DBConstants.CONST_SP_GETSETTING,
                                                           DataBaseServiceHandler.AddParameter <int>(DBConstants.CONST_SP_PARAM_SETTINGID, DbType.Int32, 0, ParameterDirection.Input),
                                                           DataBaseServiceHandler.AddParameter <string>(DBConstants.CONST_SP_PARAM_SETTINGNAME, DbType.String, strSettingName.Trim()),
                                                           DataBaseServiceHandler.AddParameter <string>(DBConstants.CONST_SP_PARAM_SETTINGDEFAULT, DbType.String, string.Empty),
                                                           ParamValue);
                }
            }
            catch (Exception ex)
            {
                ExceptionManager.Publish(ex);
            }

            return(ParamValue.Value.ToString());
        }
 public int LogTitoTicketPrint(string BarCode, int Amount)
 {
     return(DataBaseServiceHandler.ExecuteNonQuery(CommonDataAccess.ExchangeConnectionString, CommandType.StoredProcedure, "usp_LogTITOTicketPrint",
                                                   DataBaseServiceHandler.AddParameter <string>("@TicketNumber", DbType.String, BarCode),
                                                   DataBaseServiceHandler.AddParameter <string>("@Workstation", DbType.String, Environment.MachineName),
                                                   DataBaseServiceHandler.AddParameter <int>("@Value", DbType.Int32, Amount),
                                                   DataBaseServiceHandler.AddParameter <int>("@Installation_No", DbType.Int32, 0)));
 }
Beispiel #6
0
 public static void UpdatePendingRecords()
 {
     try
     {
         DataBaseServiceHandler.ExecuteNonQuery(DBBuilder.GetConnectionString(), CommandType.StoredProcedure, "usp_UpdateInProgressVerificationRecords");
     }
     catch (Exception Ex)
     {
         ExceptionManager.Publish(Ex);
     }
 }
 public static void UpdateAFTPolling(int Installation_ID)
 {
     try
     {
         DataBaseServiceHandler.ExecuteNonQuery(GetConnectionString(), CommandType.StoredProcedure, "usp_UpdateAFTPolling",
                                                DataBaseServiceHandler.AddParameter <int>("@Installation_No", DbType.Int32, Installation_ID));
     }
     catch (Exception Ex)
     {
         ExceptionManager.Publish(Ex);
     }
 }
 public static void UpdateTicketExpireInstallations(int nInstallationNo)
 {
     try
     {
         DataBaseServiceHandler.ExecuteNonQuery(GetConnectionString(), CommandType.StoredProcedure, "usp_UpdateInstallationsForTicketExpire",
                                                DataBaseServiceHandler.AddParameter <int>("@Installation_No", DbType.Int32, nInstallationNo));
     }
     catch (Exception Ex)
     {
         LogManager.WriteLog("usp_UpdateInstallationsForTicketExpire Database Hit Failed.", LogManager.enumLogLevel.Info);
         ExceptionManager.Publish(Ex);
     }
 }
Beispiel #9
0
 public static void UpdateAAMSVerification(int ReferenceID, int IH_Status)
 {
     try
     {
         DataBaseServiceHandler.ExecuteNonQuery(DBBuilder.GetConnectionString(), CommandType.StoredProcedure, "usp_UpdateAAMSIHVerification",
                                                DataBaseServiceHandler.AddParameter <int>("@Reference_ID", DbType.Int32, ReferenceID),
                                                DataBaseServiceHandler.AddParameter <int>("@IH_Status", DbType.Int32, IH_Status));
     }
     catch (Exception Ex)
     {
         ExceptionManager.Publish(Ex);
     }
 }
 public static void UpdateEmployeeCardPolling(string EmployeecardNo, int InstallationNo)
 {
     try
     {
         DataBaseServiceHandler.ExecuteNonQuery(ExchangeConnectionString, CommandType.StoredProcedure, "usp_UpdateEmployeecardPolling",
                                                DataBaseServiceHandler.AddParameter <int>("@InstallationNo", DbType.Int32, InstallationNo),
                                                DataBaseServiceHandler.AddParameter <string>("@EmpCardNo ", DbType.String, EmployeecardNo));
     }
     catch (Exception Ex)
     {
         ExceptionManager.Publish(Ex);
     }
 }
        public int DeleteReasonDetails(ReasonCode objReason)
        {
            try
            {
                DataBaseServiceHandler.ExecuteNonQuery(CommonDataAccess.ExchangeConnectionString, CommandType.StoredProcedure, DBConstants.CONST_SP_DELETE_REASON_PROC,
                                                       DataBaseServiceHandler.AddParameter <string>(DBConstants.CONST_PARAM_REASONDESCRIPTION, DbType.String, objReason.ReasonDescription));
            }
            catch (Exception ex)
            {
                ExceptionManager.Publish(ex);
            }

            return(1);
        }
Beispiel #12
0
 public static void UpdateLP21Status(int ReferenceID, string Command, string UpdateType)
 {
     try
     {
         DataBaseServiceHandler.ExecuteNonQuery(DBBuilder.GetConnectionString(), CommandType.StoredProcedure, "usp_UpdateLP21Status",
                                                DataBaseServiceHandler.AddParameter <int>("@Reference_ID", DbType.Int32, ReferenceID),
                                                DataBaseServiceHandler.AddParameter <string>("@EntityCommand", DbType.String, Command),
                                                DataBaseServiceHandler.AddParameter <string>("@UpdateType", DbType.String, UpdateType));
     }
     catch (Exception Ex)
     {
         ExceptionManager.Publish(Ex);
     }
 }
Beispiel #13
0
        public static bool UpdateB5ReqStatus(int RefID)
        {
            try
            {
                DataBaseServiceHandler.ExecuteNonQuery(DBBuilder.GetConnectionString(), CommandType.StoredProcedure, "usp_UpdateB5ReqStatus",
                                                       DataBaseServiceHandler.AddParameter <int>("@BAD_ID", DbType.Int32, RefID));

                return(true);
            }
            catch (Exception Ex)
            {
                ExceptionManager.Publish(Ex);
                return(false);
            }
        }
 //
 public static void UpdateTicketExpire(int value)
 {
     try
     {
         DataBaseServiceHandler.ExecuteNonQuery(
             GetTicketingConnectionString(),
             CommandType.StoredProcedure,
             "usp_SetTicketExpire",
             DataBaseServiceHandler.AddParameter <int>("Value", DbType.String, value));
     }
     catch (Exception ex)
     {
         ExceptionManager.Publish(ex);
     }
 }
Beispiel #15
0
        public static bool UpdatePortDisabledStatusForPortBlocking(int installationNo)
        {
            try
            {
                DataBaseServiceHandler.ExecuteNonQuery(DBBuilder.GetConnectionString(), CommandType.StoredProcedure, "usp_UpdatePortDisabledStatus",
                                                       DataBaseServiceHandler.AddParameter <int>("@InstallationNo", DbType.Int32, installationNo));

                return(true);
            }
            catch (Exception Ex)
            {
                ExceptionManager.Publish(Ex);
                return(false);
            }
        }
Beispiel #16
0
 public static void InsertExportHistory(string Type, string Reference)
 {
     try
     {
         DataBaseServiceHandler.ExecuteNonQuery(DBBuilder.GetConnectionString(), CommandType.StoredProcedure, "usp_Export_History",
                                                DataBaseServiceHandler.AddParameter <string>("@Reference1", DbType.String, Reference),
                                                DataBaseServiceHandler.AddParameter <string>("@Reference2", DbType.String, ""),
                                                DataBaseServiceHandler.AddParameter <string>("@Type", DbType.String, Type),
                                                DataBaseServiceHandler.AddParameter <string>("@Status", DbType.String, ""));
     }
     catch (Exception Ex)
     {
         ExceptionManager.Publish(Ex);
     }
 }
Beispiel #17
0
        public static bool SyncInstallationStatus(int Installation_No, char syncStatus)
        {
            try
            {
                DataBaseServiceHandler.ExecuteNonQuery(DBBuilder.GetConnectionString(), CommandType.StoredProcedure, "usp_SyncInstallationStatus",
                                                       DataBaseServiceHandler.AddParameter <int>("@Installation_No", DbType.Int32, Installation_No), DataBaseServiceHandler.AddParameter <char>("@SyncStatus", DbType.String, syncStatus));

                return(true);
            }
            catch (Exception Ex)
            {
                ExceptionManager.Publish(Ex);
                return(false);
            }
        }
 public static void UpdateTicketExpire(int value)
 {
     try
     {
         DataBaseServiceHandler.ExecuteNonQuery(
             TicketingConnectionString,
             CommandType.StoredProcedure,
             DBConstants.CONSTANT_USP_SETTICKETEXPIRE,
             DataBaseServiceHandler.AddParameter <int>("Value", DbType.String, value));
     }
     catch (Exception ex)
     {
         ExceptionManager.Publish(ex);
     }
 }
 public void SaveFloorPosition(int slotID, int securityUserID, int topPosition, int leftPosition)
 {
     try
     {
         //DataBaseServiceHandler.ConnectionString = CommonDataAccess.ExchangeConnectionString;
         DataBaseServiceHandler.ExecuteNonQuery(CommonDataAccess.ExchangeConnectionString, CommandType.StoredProcedure, "usp_SetBarPositionDetailsForCashDeskoperator",
                                                DataBaseServiceHandler.AddParameter <int>("@Bar_Pos_No", DbType.Int32, slotID),
                                                DataBaseServiceHandler.AddParameter <int>("@SecurityUserID", DbType.Int32, securityUserID),
                                                DataBaseServiceHandler.AddParameter <int>("@Top", DbType.Int32, topPosition),
                                                DataBaseServiceHandler.AddParameter <int>("@Left", DbType.Int32, leftPosition));
     }
     catch (Exception Ex)
     {
         ExceptionManager.Publish(Ex);
     }
 }
 public int UpdateTicketException(int ID, string TicketNumber, string Value)
 {
     try
     {
         //DataBaseServiceHandler.ConnectionString = CommonDataAccess.ExchangeConnectionString;
         return(DataBaseServiceHandler.ExecuteNonQuery(CommonDataAccess.ExchangeConnectionString, CommandType.StoredProcedure, DBConstants.CONST_SP_UPDATE_TICKET_EXCEPTION_PROC,
                                                       DataBaseServiceHandler.AddParameter <string>(DBConstants.CONST_PARAM_TE_TICKET_NUMBER, DbType.String, TicketNumber),
                                                       DataBaseServiceHandler.AddParameter <int>(DBConstants.CONST_PARAM_TE_ID, DbType.Int32, ID),
                                                       DataBaseServiceHandler.AddParameter <string>(DBConstants.CONST_PARAM_TE_STATUS, DbType.Int32, Value)));
     }
     catch (Exception ex)
     {
         ExceptionManager.Publish(ex);
     }
     return(-1);
 }
 public static void UpdateGMUSiteCodeStatus(int Installation_No, int Status)
 {
     try
     {
         DataBaseServiceHandler.ExecuteNonQuery(
             ExchangeConnectionString,
             CommandType.StoredProcedure,
             DBConstants.CONSTANT_USP_SETGMUSITECODESTATUS,
             DataBaseServiceHandler.AddParameter <int>("@InstallationNo", DbType.Int32, Installation_No),
             DataBaseServiceHandler.AddParameter <int>("@Status", DbType.Int32, Status));
     }
     catch (Exception ex)
     {
         ExceptionManager.Publish(ex);
     }
 }
 public static void UpdateSettings(string SettingNamem, string SettingValue)
 {
     try
     {
         DataBaseServiceHandler.ExecuteNonQuery(
             ExchangeConnectionString,
             CommandType.StoredProcedure,
             DBConstants.CONSTANT_USP_SETSETTINGSVALUE,
             DataBaseServiceHandler.AddParameter <string>("SettingName", DbType.String, SettingNamem),
             DataBaseServiceHandler.AddParameter <string>("SettingValue", DbType.String, SettingValue));
     }
     catch (Exception ex)
     {
         ExceptionManager.Publish(ex);
     }
 }
 public static void UpdateAppSettings_SortOrder(string AppSettingKey, string AppSettingValue)
 {
     try
     {
         DataBaseServiceHandler.ExecuteNonQuery(
             ExchangeConnectionString,
             CommandType.StoredProcedure,
             DBConstants.CONSTANT_USP_APPSETTINGS_SORTORDER,
             DataBaseServiceHandler.AddParameter <string>("AppSettingName", DbType.String, AppSettingKey),
             DataBaseServiceHandler.AddParameter <string>("Value", DbType.String, AppSettingValue));
     }
     catch (Exception ex)
     {
         ExceptionManager.Publish(ex);
     }
 }
Beispiel #24
0
        public int DBUpdateVoucherPromotion(int PromoTicketID, String Barcode)
        {
            int UpdateVoucherPromotion = 0;

            try
            {
                SqlParameter[] parames = new SqlParameter[2];
                parames[0]             = DataBaseServiceHandler.AddParameter <int>("@PromotionID", DbType.Int32, PromoTicketID, ParameterDirection.Input);
                parames[1]             = DataBaseServiceHandler.AddParameter <string>("@Barcode", DbType.String, Barcode, ParameterDirection.Input);
                UpdateVoucherPromotion = DataBaseServiceHandler.ExecuteNonQuery(CommonDataAccess.TicketingConnectionString, CommandType.StoredProcedure, "usp_UpdateVoucherPromotion", parames);
            }
            catch (Exception ex)
            {
                ExceptionManager.Publish(ex);
            }
            return(UpdateVoucherPromotion);
        }
Beispiel #25
0
        public static bool UpdateInstallationcRC(int Installation_No, string cRC)
        {
            try
            {
                var output = DataBaseServiceHandler.AddParameter <bool>("@Out", DbType.Boolean, false);
                DataBaseServiceHandler.ExecuteNonQuery(DBBuilder.GetConnectionString(), CommandType.StoredProcedure, "usp_UpdateInstallationcRC",
                                                       DataBaseServiceHandler.AddParameter <int>("@Installation_No", DbType.Int32, Installation_No),
                                                       DataBaseServiceHandler.AddParameter <string>("@cRC", DbType.String, cRC), output);

                return(Convert.ToBoolean(output.Value));
            }
            catch (Exception Ex)
            {
                ExceptionManager.Publish(Ex);
                return(false);
            }
        }
 //
 public static void UpdatedTITOConfig(int Installation_ID, int SiteTITOEnabled, int SiteNonCashEnabled, int MachineTITOEnabled, int MachineNonCashEnabled, int EnableCommand)
 {
     try
     {
         DataBaseServiceHandler.ExecuteNonQuery(GetConnectionString(), CommandType.StoredProcedure, "usp_UpdatedTITOConfig",
                                                DataBaseServiceHandler.AddParameter <int>("@Installation_No", DbType.Int32, Installation_ID),
                                                DataBaseServiceHandler.AddParameter <int>("@SiteTITOEnabled", DbType.Int32, SiteTITOEnabled),
                                                DataBaseServiceHandler.AddParameter <int>("@SiteNonCashEnabled", DbType.Int32, SiteNonCashEnabled),
                                                DataBaseServiceHandler.AddParameter <int>("@MachineTITOEnabled", DbType.Int32, MachineTITOEnabled),
                                                DataBaseServiceHandler.AddParameter <int>("@MachineNonCashEnabled", DbType.Int32, MachineNonCashEnabled),
                                                DataBaseServiceHandler.AddParameter <int>("@EnableCommand", DbType.Int32, EnableCommand));
     }
     catch (Exception Ex)
     {
         ExceptionManager.Publish(Ex);
     }
 }
Beispiel #27
0
        //Cancel Print Status Update
        public int DBCancelPrintStatusUpdate(int PromoTicketID)
        {
            int RescancelPrintStatusUpdate = 0;

            try
            {
                SqlParameter[] parames = new SqlParameter[1];
                parames[0] = DataBaseServiceHandler.AddParameter <int>("@PromotionID", DbType.Int32, PromoTicketID, ParameterDirection.Input);

                RescancelPrintStatusUpdate = DataBaseServiceHandler.ExecuteNonQuery(CommonDataAccess.TicketingConnectionString, CommandType.StoredProcedure, "usp_CancelPrintUpdateStatus", parames);
            }
            catch (Exception ex)
            {
                ExceptionManager.Publish(ex);
            }
            return(RescancelPrintStatusUpdate);
        }
Beispiel #28
0
 //Insert Promotional
 public int InsertPromotionalTicket(int promTicketType, string promName, int promTotalTickets, double promAmount, DateTime promExpDate)
 {
     try
     {
         return(DataBaseServiceHandler.ExecuteNonQuery(CommonDataAccess.TicketingConnectionString, CommandType.StoredProcedure, "usp_InsertPromotionalTicket",
                                                       DataBaseServiceHandler.AddParameter <int>("@PromotionalTicketType", DbType.Int32, promTicketType),
                                                       DataBaseServiceHandler.AddParameter <string>("@PromotionName", DbType.String, promName),
                                                       DataBaseServiceHandler.AddParameter <int>("@TotalTickets", DbType.Int32, promTotalTickets),
                                                       DataBaseServiceHandler.AddParameter <double>("@TicketAmount", DbType.Decimal, promAmount),
                                                       DataBaseServiceHandler.AddParameter <DateTime>("@ExpiryDate", DbType.DateTime, promExpDate)));
     }
     catch (Exception ex)
     {
         ExceptionManager.Publish(ex);
         return(-1);
     }
 }
Beispiel #29
0
        public bool SaveAFTSettings(List <Transport.AFTSetting> lstAFTSettings)
        {
            bool bResult  = false;
            int  Executed = 0;

            SqlParameter[] parames = null;
            try
            {
                parames = new SqlParameter[] { DataBaseServiceHandler.AddParameter <bool>("AllowEFTTransactions", DbType.Boolean, lstAFTSettings[0].Name.ToUpper() == "AFTTRANSACTIONSALLOWED".Trim() ? Convert.ToBoolean(Convert.ToInt32(lstAFTSettings[0].Value)) : Convert.ToBoolean("false")),
                                               DataBaseServiceHandler.AddParameter <bool>("ALLOWCASHABLEDEPOSITS", DbType.Boolean, lstAFTSettings[1].Name.ToUpper() == "ALLOWCASHABLEDEPOSITS".Trim() ? Convert.ToBoolean(Convert.ToInt32(lstAFTSettings[1].Value)) : Convert.ToBoolean("false")),
                                               DataBaseServiceHandler.AddParameter <bool>("ALLOWNONCASHABLEDEPOSITS", DbType.Boolean, lstAFTSettings[2].Name.ToUpper() == "ALLOW NON-CASHABLE DEPOSITS".Trim() ? Convert.ToBoolean(Convert.ToInt32(lstAFTSettings[2].Value)) : Convert.ToBoolean("false")),
                                               DataBaseServiceHandler.AddParameter <bool>("ALLOWREDEEMOFFERS", DbType.Boolean, lstAFTSettings[3].Name.ToUpper() == "ALLOWREDEEMOFFERS".Trim() ? Convert.ToBoolean(Convert.ToInt32(lstAFTSettings[3].Value)) : Convert.ToBoolean("false")),
                                               DataBaseServiceHandler.AddParameter <bool>("ALLOWPOINTSWITHDRAWAL", DbType.Boolean, lstAFTSettings[4].Name.ToUpper() == "ALLOWPOINTSWITHDRAWAL".Trim() ? Convert.ToBoolean(Convert.ToInt32(lstAFTSettings[4].Value)) : Convert.ToBoolean("false")),
                                               DataBaseServiceHandler.AddParameter <bool>("ALLOWCASHWITHDRAWAL", DbType.Boolean, lstAFTSettings[5].Name.ToUpper() == "ALLOWCASHWITHDRAWAL".Trim() ? Convert.ToBoolean(Convert.ToInt32(lstAFTSettings[5].Value)) : Convert.ToBoolean("false")),
                                               DataBaseServiceHandler.AddParameter <bool>("ALLOWPARTIALTRANSFER", DbType.Boolean, lstAFTSettings[6].Name.ToUpper() == "ALLOWPARTIALTRANSFERS".Trim() ? Convert.ToBoolean(Convert.ToInt32(lstAFTSettings[6].Value)) : Convert.ToBoolean("false")),
                                               DataBaseServiceHandler.AddParameter <bool>("ALLOWAUTODEPOSITNONCASHABLECREDIT", DbType.Boolean, lstAFTSettings[7].Name.ToUpper() == "AUTODEPOSITNON-CASHABLECREDITSONCARDOUT".Trim() ? Convert.ToBoolean(Convert.ToInt32(lstAFTSettings[7].Value)) : Convert.ToBoolean("false")),
                                               DataBaseServiceHandler.AddParameter <bool>("ALLOWAUTODEPOSITCASHABLECREDIT", DbType.Boolean, lstAFTSettings[8].Name.ToUpper() == "AUTODEPOSITCASHABLECREDITSONCARDOUT".Trim() ? Convert.ToBoolean(Convert.ToInt32(lstAFTSettings[8].Value)) : Convert.ToBoolean("false")),
                                               DataBaseServiceHandler.AddParameter <bool>("ALLOWOFFERS", DbType.Boolean, lstAFTSettings[9].Name.ToUpper() == "ALLOWOFFERS".Trim() ? Convert.ToBoolean(Convert.ToInt32(lstAFTSettings[9].Value)) : Convert.ToBoolean("false")),
                                               DataBaseServiceHandler.AddParameter <int>("EFTTIMEOUT", DbType.Int32, lstAFTSettings[10].Name.ToUpper() == "EFTTIMEOUTVALUE".Trim() ? Convert.ToInt32(lstAFTSettings[10].Value) : Convert.ToInt32("0")),
                                               DataBaseServiceHandler.AddParameter <double>("OPTION1WITHDRAWALAMT", DbType.Double, lstAFTSettings[11].Name.ToUpper() == "OPTION1WITHDRAWALAMOUNT".Trim() ? Convert.ToDouble(lstAFTSettings[11].Value) : Convert.ToDouble("0")),
                                               DataBaseServiceHandler.AddParameter <double>("OPTION2WITHDRAWALAMT", DbType.Double, lstAFTSettings[12].Name.ToUpper() == "OPTION2WITHDRAWALAMOUNT".Trim() ? Convert.ToDouble(lstAFTSettings[12].Value) : Convert.ToDouble("0")),
                                               DataBaseServiceHandler.AddParameter <double>("OPTION3WITHDRAWALAMT", DbType.Double, lstAFTSettings[13].Name.ToUpper() == "OPTION3WITHDRAWALAMOUNT".Trim() ? Convert.ToDouble(lstAFTSettings[13].Value) : Convert.ToDouble("0")),
                                               DataBaseServiceHandler.AddParameter <double>("OPTION4WITHDRAWALAMT", DbType.Double, lstAFTSettings[14].Name.ToUpper() == "OPTION4WITHDRAWALAMOUNT".Trim() ? Convert.ToDouble(lstAFTSettings[14].Value) : Convert.ToDouble("0")),
                                               DataBaseServiceHandler.AddParameter <double>("OPTION5WITHDRAWALAMT", DbType.Double, lstAFTSettings[15].Name.ToUpper() == "OPTION5WITHDRAWALAMOUNT".Trim() ? Convert.ToDouble(lstAFTSettings[15].Value) : Convert.ToDouble("0")) };

                Executed = DataBaseServiceHandler.ExecuteNonQuery(CommonDataAccess.ExchangeConnectionString, CommandType.StoredProcedure,
                                                                  "usp_UpdateAFTSettings", parames);



                if (Executed > 1)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch (Exception ex)
            {
                ExceptionManager.Publish(ex);
                return(bResult);
            }
        }
 public int InsertException(TicketException objException)
 {
     try
     {
         //DataBaseServiceHandler.ConnectionString = CommonDataAccess.ExchangeConnectionString;
         return(DataBaseServiceHandler.ExecuteNonQuery(CommonDataAccess.ExchangeConnectionString, CommandType.StoredProcedure, DBConstants.CONST_SP_INSERT_EXCEPTION_PROC,
                                                       DataBaseServiceHandler.AddParameter <int>(DBConstants.CONST_PARAM_INSTALLATION_ID, DbType.Int32, objException.InstallationNumber),
                                                       DataBaseServiceHandler.AddParameter <int>(DBConstants.CONST_PARAM_EXCEPTION_TYPE, DbType.Int32, objException.ExceptionType),
                                                       DataBaseServiceHandler.AddParameter <string>(DBConstants.CONST_PARAM_EXCEPTION_DETAILS, DbType.String, objException.ExceptionDetails),
                                                       DataBaseServiceHandler.AddParameter <string>(DBConstants.CONST_PARAM_EXCEPTION_REFERENCE, DbType.String, objException.Reference),
                                                       DataBaseServiceHandler.AddParameter <int>(DBConstants.CONST_PARAM_EXCEPTION_USER, DbType.Int32, objException.User)));
     }
     catch (Exception ex)
     {
         ExceptionManager.Publish(ex);
         return(-1);
     }
 }