public void PrintCommonReceipt(bool isVoidedTransaction, string Type, string Treasury, IUser autherizedUser) { CommonUtilities CommonUtilitiesObject = new CommonUtilities(); CommonUtilitiesObject.currentUser = autherizedUser; try { switch (Type.ToUpper()) { case "PROG": Type = "Progressive"; break; case "REFILL": Type = "Refills"; break; case "REFUND": Type = "Refunds"; break; default: break; } BMC.Common.LogManagement.LogManager.WriteLog("Called PrintCommonReceipt type:treasury" + Type.ToString() + " : " + Treasury.ToString() , BMC.Common.LogManagement.LogManager.enumLogLevel.Debug); CommonUtilitiesObject.GetCommonValues(isVoidedTransaction, Type, Treasury); } catch (Exception Ex) { ExceptionManager.Publish(Ex); } }
public void PrintCommonReceipt(OfflineTicket OfflineTicket, int treasuryNo) { CommonUtilities CommonUtilitiesObject = new CommonUtilities(); try { CommonUtilitiesObject.GetCommonValues(OfflineTicket, treasuryNo); } catch (Exception Ex) { ExceptionManager.Publish(Ex); } }
public void PrintCommonReceipt(Voucher voucher) { CommonUtilities CommonUtilitiesObject = new CommonUtilities(); try { CommonUtilitiesObject.GetCommonValues(voucher); } catch (Exception Ex) { ExceptionManager.Publish(Ex); } }
/// <summary> /// For offline Ticket Check-Durga /// </summary> /// <param name="TicketDetail"></param> /// <returns></returns> public RTOnlineTicketDetail CheckTicket(RTOnlineTicketDetail TicketDetail) { string LocalTicketorSiteCode; string sURL; int Installation_No = 0; int ValidationLength = 0; bool OfflineTicketRedemption = false; bool isTISPrintedTicket = VoucherHelper.IsTISPrintedTicket(TicketDetail.TicketString); if (!isTISPrintedTicket) { LinqDataAccessDataContext linqDBExchange = new LinqDataAccessDataContext(CommonDataAccess.ExchangeConnectionString); IEnumerable<InstallationFromTicket> InstallationTicket = linqDBExchange.GetInstallationNumber(TicketDetail.TicketString); foreach (var item in InstallationTicket) { Installation_No = item.installation_no.Value; } DataTable InstallationDetails = (new CommonDataAccess()).GetInstallationDetails(0, Installation_No, false, false); if (InstallationDetails.Rows.Count > 0) { try { int.TryParse(InstallationDetails.Rows[0]["Validation_length"].ToString(), out ValidationLength); if (ValidationLength == 0) ValidationLength = CONST_DEFAULT_TICKET_LENGTH; } catch { ValidationLength = CONST_DEFAULT_TICKET_LENGTH; } } if (ValidationLength == CONST_DEFAULT_TICKET_LENGTH) { ValidateSiteCode(TicketDetail.TicketString, out LocalTicketorSiteCode, out sURL); if (sURL.IsNullOrEmpty() || sURL == "INVALID") //Invalid Site Code or No rights to access other Site { TicketDetail.TicketStatus = "MessageID312"; TicketDetail.TicketStatusCode = -99; TicketDetail.ValidTicket = false; return TicketDetail; } else if (sURL.StartsWith("http")) // WebService Call in case of Different Site Code { EndpointAddress objEndpoint = new EndpointAddress(sURL); TicketingServiceClient objClient = new TicketingServiceClient(objEndpoint, LocalTicketorSiteCode); //EndpointAddress objEndpoint = new EndpointAddress("http://10.2.108.29/TicketingWCFService/TicketingService.svc"); //sURL //TicketingServiceClient objClient = new TicketingServiceClient(objEndpoint, "1001"); //LocalTicketorSiteCode); return objClient.RedeemOnlineTicket(TicketDetail); } } } else { if (!VoucherHelper.IsEffectiveDateActivated(TicketDetail.TicketString)) { TicketDetail.TicketStatus = "MessageID876"; TicketDetail.ValidTicket = false; return TicketDetail; } //else if (VoucherHelper.IsCardRequired(TicketDetail.TicketString)) //{ // TicketDetail.TicketStatus = "MessageID878"; // TicketDetail.ValidTicket = false; // return TicketDetail; //} } // Local Site Code (Default) int Return = 0; bool isValidTicket = false; string TicketStatus = ""; string TicketString = TicketDetail.TicketString; //HFXVH.Ticket HFXVHTicket = new HFXVH.Ticket(); RTOnlineWageredDropDetail WageredDropDetail = new RTOnlineWageredDropDetail(); TicketDetail.ShowOfflineTicketScreen = false; try { //Return = HFXVHTicket.TicketIsValid(ref TicketString, ref ReturnValue); Return = TicketIsValid(TicketString, isTISPrintedTicket, ref TicketDetail); //TicketDetail.TicketValue = ReturnValue; if (Return > -1) { TicketStatus = "MessageID210"; // "VALID VOUCHER"+ //Application.Current.FindResource("MessageID210") as string // "(" + CommonUtilities.GetCurrency(Convert.ToDouble(TicketDetail.TicketValue / 100)) + ")"; isValidTicket = true; } else { switch (Return) { case -1: TicketStatus = "MessageID211";// Application.Current.FindResource("MessageID211") as string; break; case -2: TicketStatus = "MessageID212";// Application.Current.FindResource("MessageID212") as string; break; case -3: TicketStatus = "MessageID213";// Application.Current.FindResource("MessageID213") as string; if (CheckOfflineRedeemEnabled()) { if (OfflineTicket(ref TicketDetail)) { TicketStatus = "MessageID214";// Application.Current.FindResource("MessageID214") as string; TicketDetail.EnableTickerPrintDetails = true; } else { TicketDetail.ShowOfflineTicketScreen = true; } } break; case -4: TicketStatus = "MessageID215";// Application.Current.FindResource("MessageID215") as string; TicketDetail.EnableTickerPrintDetails = true; GetTicketDetails(ref TicketDetail); //if (HFXVHTicket.GetTicketDetails(ref TicketString)) //{ // TicketDetail.RedeemedMachine = HFXVHTicket.PrintedMachine; // TicketDetail.RedeemedDevice = HFXVHTicket.RedeemedMachine; // TicketDetail.RedeemedDate = HFXVHTicket.RedeemedDate; // TicketDetail.RedeemedAmount = CommonUtilities.GetCurrency((Convert.ToDouble(HFXVHTicket.Value) / 100)); //} //else //{ // TicketDetail.RedeemedMachine = ""; // TicketDetail.RedeemedDevice = ""; // TicketDetail.RedeemedDate = ""; // TicketDetail.RedeemedAmount = ""; //} break; case -5: TicketStatus = "MessageID216";// Application.Current.FindResource("MessageID216") as string; break; case -6: TicketStatus = "MessageID217";// Application.Current.FindResource("MessageID217") as string; break; case -7: TicketStatus = "MessageID218";// Application.Current.FindResource("MessageID218") as string; break; case -8: TicketStatus = "MessageID219";// Application.Current.FindResource("MessageID219") as string; break; case -9: TicketStatus = "MessageID220";// Application.Current.FindResource("MessageID220") as string; break; case -10: TicketStatus = "MessageID221";// Application.Current.FindResource("MessageID221") as string; break; case -11: TicketStatus = "MessageID222";// Application.Current.FindResource("MessageID222") as string; break; case -12: TicketStatus = "MessageID223"; //Application.Current.FindResource("MessageID223") as string; break; case -13: TicketStatus = "MessageID306";// Application.Current.FindResource("MessageID306") as string; break; case -14: TicketStatus = "MessageID312";// Application.Current.FindResource("MessageID312") as string; break; case -98: CheckTicket(TicketDetail); TicketStatus = "MessageID214";// Application.Current.FindResource("MessageID214") as string; break; default: TicketStatus = "MessageID224";// Application.Current.FindResource("MessageID224") as string; break; } } TicketDetail.TicketStatus = TicketStatus; if (isValidTicket || Return == -4) { TicketDetail.ValidTicket = true; GetTicketDetails(ref TicketDetail); //if (HFXVHTicket.GetTicketDetails(ref TicketString)) //{ // TicketDetail.RedeemedMachine = HFXVHTicket.PrintedMachine; // TicketDetail.RedeemedAmount = CommonUtilities.GetCurrency((Convert.ToDouble(HFXVHTicket.Value) / 100)); //} //else //{ // TicketDetail.RedeemedMachine = ""; // TicketDetail.RedeemedAmount = ""; //} // Check laundering limits, if amount wagered is not enough of credits in, show warning if (Settings.EnableLaundering) { double Wagered = 0; double Drop = 0; WageredDropDetail.WageredAmount = 0; WageredDropDetail.DropAmount = 0; WageredDropDetail.TicketString = TicketString; bool isSuccess = GetWageredAndDrop(ref WageredDropDetail); if (isSuccess) { Wagered = WageredDropDetail.WageredAmount; Drop = WageredDropDetail.DropAmount; } if (Drop > 0) { if ((100 - (((Drop - Wagered) * 100) / Drop)) <= GetAmberCreditsWageredtoCashIn()) TicketDetail.TicketWarning = "Suspect Voucher.."; } } if (CheckTicketValidateVoucherEnabled() && isValidTicket) { //Check for Offline if (OfflineTicket(ref TicketDetail)) OfflineTicketRedemption = true; BMC.Common.LogManagement.LogManager.WriteLog("Started RTOnlineReceiptDetail", BMC.Common.LogManagement.LogManager.enumLogLevel.Debug); RTOnlineReceiptDetail ReceiptDetail = new RTOnlineReceiptDetail(); TicketRedemptionReceiptCreate((TicketDetail.TicketValue / 100), "", TicketString, 0, ref ReceiptDetail);//HFXVHTicket.CurrentPayoutID); CommonUtilities oCommonUtilities = new CommonUtilities(); if (OfflineTicketRedemption) oCommonUtilities.GetCommonValues(TicketDetail, ReceiptDetail, "OFFLINE VOUCHER REDEMPTION"); else oCommonUtilities.GetCommonValues(TicketDetail, ReceiptDetail); BMC.Common.LogManagement.LogManager.WriteLog("Done RTOnlineReceiptDetail", BMC.Common.LogManagement.LogManager.enumLogLevel.Debug); } } return TicketDetail; } catch (Exception ex) { ExceptionManager.Publish(ex); return TicketDetail; } }