public jackpotProcessInfoDTO payJackpot(long sequenceNumber, long siteId, string userId, string firstName, string lastName, string cashDeskLocation) { jackpotProcessInfoDTO response = new jackpotProcessInfoDTO(); try { response = handpay.payJackpot(sequenceNumber.ToString(), Convert.ToInt32(siteId), userId, firstName, lastName, cashDeskLocation); } catch (Exception Ex) { ExceptionManager.Publish(Ex); } return response; }
public jackpotProcessInfoDTO getJackpotStatusAmount(long sequenceNumber, long siteId) { jackpotProcessInfoDTO response = new jackpotProcessInfoDTO(); try { response = handpay.getJackpotStatusAmount(sequenceNumber.ToString(), Convert.ToInt32(siteId)); } catch (Exception Ex) { ExceptionManager.Publish(Ex); } return response; }
public getJackpotStatusAmountResponse1 getJackpotStatusAmount(getJackpotStatusAmountRequest request) { if (!CheckCageEnabled()) return null; getJackpotStatusAmountResponse1 oResponse = new getJackpotStatusAmountResponse1(); oResponse.getJackpotStatusAmountResponse = new getJackpotStatusAmountResponse(); jackpotProcessInfoDTO response = new jackpotProcessInfoDTO(); try { oResponse.getJackpotStatusAmountResponse.@return = handpay.getJackpotStatusAmount(request.getJackpotStatusAmount.arg0.ToString(), Convert.ToInt32(request.getJackpotStatusAmount.arg1)); //oResponse.getJackpotStatusAmountResponse.@return = handpay.getJackpotStatusAmount(request.getJackpotStatusAmount.arg0.ToString(), 1030); } catch (Exception Ex) { ExceptionManager.Publish(Ex); } return oResponse; }
public payJackpotResponse1 payJackpot(payJackpotRequest request) { if (!CheckCageEnabled()) return null; payJackpotResponse1 oResponse = new payJackpotResponse1(); oResponse.payJackpotResponse = new payJackpotResponse(); jackpotProcessInfoDTO response = new jackpotProcessInfoDTO(); try { oResponse.payJackpotResponse.@return = handpay.payJackpot(request.payJackpot.arg0.ToString(),int.Parse(request.payJackpot.arg1.ToString()) , request.payJackpot.arg2, request.payJackpot.arg3, request.payJackpot.arg4, request.payJackpot.arg5); //oResponse.payJackpotResponse.@return = handpay.payJackpot(request.payJackpot.arg0.ToString(), 1030, request.payJackpot.arg2, request.payJackpot.arg3, request.payJackpot.arg4, request.payJackpot.arg5); //response = handpay.payJackpot(sequenceNumber.ToString(), Convert.ToInt32(siteId), userId, firstName, lastName, cashDeskLocation); } catch (Exception Ex) { ExceptionManager.Publish(Ex); } return oResponse; }
public void PrintSlip(jackpotProcessInfoDTO jackpot) { JackpotXml xml = null; try { filename = "Print.txt"; filepath = System.Windows.Forms.Application.StartupPath + "\\" + filename; if (File.Exists(filepath)) { File.Delete(filepath); } outputfile = new FileStream(filepath, FileMode.OpenOrCreate, FileAccess.Write); writer = new StreamWriter(outputfile); writer.BaseStream.Seek(0, SeekOrigin.End); xml = new JackpotXml(writer); xml.ParseXmlFile(); ModuleName module = ModuleName.AttendantPay; string Type = string.Empty; string screenName = Settings.CAGE_ENABLED ? "PrintCageSlip|" : ""; switch (jackpot.jackpotTypeId) { case 1: Type = "AttendantPay Credit"; screenName += "AttendantPay Credit"; break; case 2: Type = "AttendantPay Jackpot"; screenName += "AttendantPay Jackpot"; break; case 3: Type = "Progressive"; screenName += "Progressive"; break; case 4: Type = "MANUAL CREDIT"; module = ModuleName.ManualAttendantPay; screenName += "MANUAL CREDIT"; break; case 5: Type = "MANUAL JACKPOT"; module = ModuleName.ManualAttendantPay; screenName += "MANUAL JACKPOT"; break; case 6: Type = "MANUAL PROGRESSIVE"; module = ModuleName.ManualAttendantPay; screenName += "MANUAL PROGRESSIVE"; break; default: Type = "Handpay"; screenName += "Handpay"; break; } // Modified by A.Vinod Kumar at 3:40 PM 17/01/12 // required values for xml string sVersion = CommonDataAccess.GetVersion(); double JAmt = Double.Parse(jackpot.hpjpAmount.ToString()) / 100; double jActualAmt = JAmt; if (JAmt < 0) jActualAmt = (-1 * JAmt); string JAmtInWords = objWords.ConvertValueToWords(jActualAmt, CommonDataAccess.GetSettingValue("Region") == "US" ? "en-US" : CommonDataAccess.GetSettingValue("Region") == "UK" ? "en-GB" : CommonDataAccess.GetSettingValue("Region") == "IT" ? "it-IT" : "en-US"); // fill the values xml[JackpotXmlFields.SiteName].Value = jackpot.siteNo; // Site Name xml[JackpotXmlFields.BMCVersion].Value = sVersion; // BMC Version xml[JackpotXmlFields.Type].Value = Type; // Type xml[JackpotXmlFields.Amount].Value = CommonUtilities.GetCurrency(JAmt); // Amount xml[JackpotXmlFields.AmountInWords].Value = JAmtInWords; // Amount in Words xml[JackpotXmlFields.TransactionDateTime].Value = jackpot.TransactionDate; // Transaction Date/Time xml[JackpotXmlFields.BarPosition].Value = jackpot.assetConfigNumber + "/" + jackpot.Slot; // Bar Position xml[JackpotXmlFields.SlotDenom].Value = jackpot.Denom.ToString(); // Slot Denomination xml[JackpotXmlFields.SiteID].Value = jackpot.siteId.ToString(); // Site Id xml[JackpotXmlFields.PrintedDate].Value = DateTime.Now.GetUniversalDateTimeFormat(); // Printed Date/Time xml[JackpotXmlFields.SequenceNo].Value = jackpot.sequenceNumber.ToString(); // Sequence No xml.Write(); writer.Close(); _textSettings = xml.TextSettings; PrintSlippage(xml.TextSettings); AuditViewerBusiness.InsertAuditData(new Audit.Transport.Audit_History { AuditModuleName = module, Audit_Screen_Name = screenName, Audit_Desc = Type, AuditOperationType = OperationType.ADD, Audit_Field = "Amount", Audit_New_Vl = xml[JackpotXmlFields.Amount].Value.ToString(), Audit_Slot = xml[JackpotXmlFields.BarPosition].Value }); } catch (Exception ex) { ExceptionManager.Publish(ex); } finally { if (xml != null) { xml.Dispose(); xml = null; } } }
public void PrintSlip(jackpotProcessInfoDTO jackpot) { filename = "Print.txt"; filepath = System.Windows.Forms.Application.StartupPath + "\\" + filename; if (File.Exists(filepath)) { File.Delete(filepath); } outputfile = new FileStream(filepath, FileMode.OpenOrCreate, FileAccess.Write); writer = new StreamWriter(outputfile); writer.BaseStream.Seek(0, SeekOrigin.End); string Type = string.Empty; switch (jackpot.jackpotTypeId) { case 1: Type = "AttendantPay Credit"; break; case 2: Type = "AttendantPay Jackpot"; break; case 3: Type = "Progressive"; break; case 4: Type = "MANUAL CREDIT"; break; case 5: Type = "MANUAL JACKPOT"; break; case 6: Type = "MANUAL PROGRESSIVE"; break; default: Type = "Handpay"; break; } dynTableHeader = ""; string sVersion = CommonDataAccess.GetVersion(); DoWrite(" Site Name : " + jackpot.siteNo + " BMC Version : " + sVersion); // DoWrite(dynTableHeader); DoWrite("<LN>"); //DoWrite(" TYPE OF JACKPOT "); // DoWrite(dynTableHeader); DoWrite(""); DoWrite(" JP TYPE : " + Type); // DoWrite(dynTableHeader); DoWrite(" SLOT :" + jackpot.Slot); // DoWrite(dynTableHeader); DoWrite(" STAND : " + jackpot.assetConfigNumber); // DoWrite(dynTableHeader); DoWrite(" TRANSACTION DATE : " + jackpot.TransactionDate); // DoWrite(dynTableHeader); DoWrite(" EMPLOYEE ID : " + jackpot.UserID); // DoWrite(dynTableHeader); DoWrite(" EMPLOYEE NAME : " + jackpot.UserName); // DoWrite(dynTableHeader); DoWrite(" SITE ID : " + jackpot.siteId); // DoWrite(dynTableHeader); DoWrite(" DENOM : " + jackpot.Denom); // DoWrite(dynTableHeader); double JAmt = Double.Parse(jackpot.hpjpAmount.ToString()) / 100; DoWrite(" ORIGINAL AMT : " + CommonUtilities.GetCurrency(JAmt)); // DoWrite(dynTableHeader); DoWrite(" ACTUAL AMT : " + CommonUtilities.GetCurrency(JAmt)); // DoWrite(dynTableHeader); DoWrite(" HP JP AMT : " + CommonUtilities.GetCurrency(JAmt)); // DoWrite(dynTableHeader); DoWrite(" TOTAL TAX AMT : -------------------------"); // DoWrite(dynTableHeader); DoWrite(" TOTAL JACKPOT AMT : " + CommonUtilities.GetCurrency(JAmt)); // DoWrite(dynTableHeader); DoWrite(" AMT IN WRITING : " + objWords.ConvertValueToWords(JAmt, CommonDataAccess.GetSettingValue("Region") == "US" ? "en-US" : CommonDataAccess.GetSettingValue("Region") == "UK" ? "en-GB" : CommonDataAccess.GetSettingValue("Region") == "IT" ? "it-IT" : "en-US")); // DoWrite(dynTableHeader); DoWrite(" SHIFT: DAY "); // DoWrite(dynTableHeader); DoWrite(" PAYLINE : -------------------------"); // DoWrite(dynTableHeader); DoWrite(" COINS PLAYED : -------------------------"); // DoWrite(dynTableHeader); DoWrite(" WINNING COMBO : -------------------------"); // DoWrite(dynTableHeader); DoWrite(" WINDOW : -------------------------"); // DoWrite(dynTableHeader); DoWrite(" PLAYER CARD : 0000000000 "); // DoWrite(dynTableHeader); DoWrite(" PLAYER NAME : -------------------------"); // DoWrite(dynTableHeader); DoWrite(" TOP : -------------------------"); // DoWrite(dynTableHeader); DoWrite(" MIDDLE : -------------------------"); // DoWrite(dynTableHeader); DoWrite(" BOTTOM : -------------------------"); // DoWrite(dynTableHeader); DoWrite(" IN-MTR : -------------------------"); // DoWrite(dynTableHeader); DoWrite(" RESET : -------------------------"); // DoWrite(dynTableHeader); DoWrite(" REEL SYMBOLS : -------------------------"); // DoWrite(dynTableHeader); DoWrite(" KIOSK : " + Environment.MachineName); // DoWrite(dynTableHeader); DoWrite(" GAMING DAY : -------------------------"); // DoWrite(dynTableHeader); DoWrite(" AREA : -------------------------"); // DoWrite(dynTableHeader); DoWrite(" SLOT ATTN ID : -------------------------"); // DoWrite(dynTableHeader); DoWrite(" SLOT ATTN NAME : -------------------------"); // DoWrite(dynTableHeader); DoWrite(" FIRST AUTH EMP ID : -------------------------"); // DoWrite(dynTableHeader); DoWrite(" FIRST AUTH EMP NAME : -------------------------"); // DoWrite(dynTableHeader); DoWrite(" SECOND AUTH EMP ID : -------------------------"); // DoWrite(dynTableHeader); DoWrite(" SECOND AUTH EMP NAME : -------------------------"); // DoWrite(dynTableHeader); DoWrite(" PRINTER : -------------------------"); // DoWrite(dynTableHeader); DoWrite(" REGULATORY ID : ------------------------- "); // DoWrite(dynTableHeader); DoWrite(" JP DESCRIPTION : -------------------------"); // DoWrite(dynTableHeader); DoWrite(" FLOOR PERSON : -------------------------"); // DoWrite(dynTableHeader); DoWrite(" CHANGE PERSON : -------------------------"); // DoWrite(dynTableHeader); DoWrite(" PREPARER : -------------------------"); // DoWrite(dynTableHeader); DoWrite(" PRINTED DATE : " + DateTime.Now.GetUniversalDateTimeFormat()); // DoWrite(dynTableHeader); DoWrite(" SEQUENCE NO : " + jackpot.sequenceNumber.ToString()); // // DoWrite(dynTableHeader); DoWrite("<LN>"); writer.Close(); PrintSlippage(); }
private void GenerateManulJackpot() { double amount = 0; if (txtBox != null && txtBox.Text.Length > 0) { double.TryParse(txtBox.Text.ToString(), NumberStyles.Currency, new CultureInfo(ExtensionMethods.CurrentCurrenyCulture), out amount); } //if (amount > Settings.W2GWinAmount) //{ // MessageBox.ShowBox("MessageID367", BMC_Icon.Information); // //return; //} try { jackpotProcessInfoDTO jpinfo = new jackpotProcessInfoDTO(); CAuthorize objAuthorize = null; string HP_Type = string.Empty; Double iAmount = 0; if (txtBox != null && txtBox.Text.Length > 0) { // Issue fix for ->set cultureinfo='en-US', currencyculture='it-IT' Double.TryParse(txtBox.Text.ToString(), NumberStyles.Currency, new CultureInfo(ExtensionMethods.CurrentCurrenyCulture), out iAmount); } if (Settings.Client != null && Settings.Client.ToLower() == "winchells" && Settings.MaxHandPayAuthRequired && txtBox != null && (iAmount > Settings.HandpayPayoutCustomer_Max)) { objAuthorize = new CAuthorize("CashdeskOperator.Authorize.cs.MaxHandpay"); objAuthorize.User = Security.SecurityHelper.CurrentUser; if (!Security.SecurityHelper.HasAccess("CashdeskOperator.Authorize.cs.MaxHandpay")) { objAuthorize.ShowDialog(); if (!objAuthorize.IsAuthorized) return; } else { objAuthorize.IsAuthorized = true; } } if (optHandpay.IsChecked == true) { HP_Type = "AttendantPay Credit"; jpinfo.jackpotTypeId = 4; } else if (optJackpot.IsChecked == true) { HP_Type = "AttendantPay Jackpot"; jpinfo.jackpotTypeId = 5; } else { HP_Type = "AttendantPay Progressive"; jpinfo.jackpotTypeId = 6; } // Finding Denom for the machine-CR# 167677 decimal DenomValue = 0; DataSet oDt = handpay.createTickeException_HandpayCAGE(int.Parse((cmbBarPositions.SelectedItem as BarPositions).Bar_Pos_Name), iAmount, 0, HP_Type); List<DenomValueResult> lstDenom = handpay.GetDenomValue(oDt.Tables[0].Rows[0]["Asset"].ToString()); foreach (var denom in lstDenom) { DenomValue = denom.Denom; } jpinfo.Slot = (cmbBarPositions.SelectedItem as BarPositions).Bar_Pos_Name; jpinfo.assetConfigNumber = oDt.Tables[0].Rows[0]["Asset"].ToString(); jpinfo.Denom = DenomValue; jpinfo.hpjpAmount = long.Parse(oDt.Tables[0].Rows[0]["TE_VALUE"].ToString()); jpinfo.jackpotNetAmount = long.Parse(oDt.Tables[0].Rows[0]["TE_VALUE"].ToString()); jpinfo.sequenceNumber = long.Parse(oDt.Tables[0].Rows[0]["TE_ID"].ToString()); jpinfo.TransactionDate = oDt.Tables[0].Rows[0]["TE_Date"].ToString(); jpinfo.UserID = Security.SecurityHelper.CurrentUser.SecurityUserID.ToString(); jpinfo.siteNo = Settings.SiteName; jpinfo.siteId = Convert.ToInt32(Settings.SiteCode); txtBox.Text = this.DefaultAmount(); handpay.PrintSlip(jpinfo); //send PT 10 from client Treasury treasury = new Treasury(); treasury.ActualTreasuryDate = Convert.ToDateTime(jpinfo.TransactionDate); treasury.Asset = Asset; treasury.Authorized_Date = Convert.ToDateTime(jpinfo.TransactionDate); treasury.AuthorizedUser_No = SecurityHelper.CurrentUser.User_No; treasury.CustomerID = SecurityHelper.CurrentUser.User_No; treasury.InstallationNumber = InstallationNumber; treasury.TreasuryAmount = iAmount; treasury.UserID = SecurityHelper.CurrentUser.User_No; treasury.TreasuryType = HP_Type; if (((bool)optJackpot.IsChecked) || ((bool)optProgressive.IsChecked) )//|| ((bool)optHandpay.IsChecked)) { PostHandpayEvent(treasury); } } catch (Exception Ex) { ExceptionManager.Publish(Ex); } }
private void btnGenerateSlipNo_Click(object sender, RoutedEventArgs e) { try { int Auth_User_ID = 0; if (lstHandpay.Items.Count > 0) { LogManager.WriteLog("Generating Slip", LogManager.enumLogLevel.Debug); if (Clearhandpay(Convert.ToInt32((lstHandpay.SelectedItem as FillTreasuryList).Installation_No))) { jackpotProcessInfoDTO jpinfo = new jackpotProcessInfoDTO(); CAuthorize objAuthorize = null; int TE_ID = (lstHandpay.SelectedItem as FillTreasuryList).TE_ID; Treasury treasury = new Treasury { InstallationNumber = (lstHandpay.SelectedItem as FillTreasuryList).Installation_No, TreasuryType = (lstHandpay.SelectedItem as FillTreasuryList).HP_Type, TreasuryAmount = (double)(lstHandpay.SelectedItem as FillTreasuryList).Amount, TreasuryTemp = false, ActualTreasuryDate = (DateTime)((lstHandpay.SelectedItem as FillTreasuryList).TreasuryDate) }; Auth_User_ID = Security.SecurityHelper.CurrentUser.User_No; if (treasury.TreasuryAmount > Settings.HandpayPayoutCustomer_Max) { objAuthorize = new CAuthorize("CashdeskOperator.Authorize.cs.MaxHandpay"); objAuthorize.User = Security.SecurityHelper.CurrentUser; if (!Security.SecurityHelper.HasAccess("CashdeskOperator.Authorize.cs.MaxHandpay")) { objAuthorize.ShowDialog(); if (!objAuthorize.IsAuthorized) return; else Auth_User_ID = handpay.GetUserID(objAuthorize.User.SecurityUserID); } else { objAuthorize.IsAuthorized = true; } } treasury.CustomerID = Custid; treasury.UserID = Auth_User_ID; treasury.Authorized_Date = DateTime.Now.DBMinValue(); jpinfo.Slot = (lstHandpay.SelectedItem as FillTreasuryList).Pos; jpinfo.assetConfigNumber = (lstHandpay.SelectedItem as FillTreasuryList).Asset; jpinfo.Denom = 0.01M; jpinfo.hpjpAmount = Convert.ToInt32((lstHandpay.SelectedItem as FillTreasuryList).Amount * 100); jpinfo.jackpotNetAmount = Convert.ToInt32((lstHandpay.SelectedItem as FillTreasuryList).Amount); jpinfo.jackpotTypeId = (lstHandpay.SelectedItem as FillTreasuryList).HP_Type.ToLower() == "attendantpay Credit" ? Convert.ToInt16(1) : (lstHandpay.SelectedItem as FillTreasuryList).HP_Type.ToLower() == "attendantpay jackpot" ? Convert.ToInt16(2) : (lstHandpay.SelectedItem as FillTreasuryList).HP_Type.ToLower() == "progressive" ? Convert.ToInt16(3) : Convert.ToInt16(1); jpinfo.sequenceNumber = (lstHandpay.SelectedItem as FillTreasuryList).TE_ID; jpinfo.TransactionDate = (lstHandpay.SelectedItem as FillTreasuryList).TreasuryDate.ToString(); jpinfo.UserID = Security.SecurityHelper.CurrentUser.SecurityUserID.ToString(); jpinfo.siteNo = Settings.SiteName; jpinfo.siteId = Convert.ToInt32(Settings.SiteCode); handpay.PrintSlip(jpinfo); } else { MessageBox.ShowBox("MessageID382", BMC_Icon.Information); } } else MessageBox.ShowBox("MessageID383", BMC_Icon.Information); } catch (Exception Ex) { ExceptionManager.Publish(Ex); } }
private int VoidHandpay() { int result = 0; VoidTranCreate voidTran = null; try { voidTran = new VoidTranCreate { TreasuryID = Treasury_No.ToString(), Date = DateTime.Now, UserNo = Security.SecurityHelper.CurrentUser.User_No.ToString() //Date = DateTime.Now }; result = handpay.VoidTransaction(voidTran); } catch (Exception Ex) { ExceptionManager.Publish(Ex); return -99; } finally { if (result > 0) { try { jackpotProcessInfoDTO jpinfo = new jackpotProcessInfoDTO(); jpinfo.Slot = this.BarPosition; jpinfo.assetConfigNumber = Asset; jpinfo.Denom = 0.01M; string TreasuryDate = string.Empty; string Amount = string.Empty; string TreasuryNo = string.Empty; string TreasuryType = string.Empty; short jackpotTypeId = 0; string slot = string.Empty; string assetConfigNumber = string.Empty; try { FillTreasuryList list = (lstHandpay.SelectedItem as FillTreasuryList); if (list != null) { TreasuryDate = list.TreasuryDate.ToString(); Amount = list.Amount.ToString(); TreasuryNo = list.TE_ID.ToString(); TreasuryType = list.HP_Type; jackpotTypeId = list.HP_Type.ToLower() == "attendantpay Credit" ? Convert.ToInt16(1) : list.HP_Type.ToLower() == "attendantpay jackpot" ? Convert.ToInt16(2) : list.HP_Type.ToLower() == "progressive" ? Convert.ToInt16(3) : Convert.ToInt16(1); slot = list.Pos; assetConfigNumber = list.Asset; } LogManager.WriteLog("|==> VOID AMOUNT IS : " + Amount, LogManager.enumLogLevel.Info); } catch (Exception ex) { LogManager.WriteLog("|==> Exception Occured in VoidHandpy " + Amount, LogManager.enumLogLevel.Info); ExceptionManager.Publish(ex); } jpinfo.Slot = slot; jpinfo.assetConfigNumber = assetConfigNumber; double value = 0; double.TryParse(Amount, out value); jpinfo.hpjpAmount = (long)(-1 * (value * 100)); try { jpinfo.jackpotNetAmount = (long)value; } catch { } jpinfo.jackpotTypeId = jackpotTypeId; double.TryParse(TreasuryNo, out value); jpinfo.sequenceNumber = (long)value; jpinfo.TransactionDate = TreasuryDate; jpinfo.UserID = Security.SecurityHelper.CurrentUser.SecurityUserID.ToString(); jpinfo.siteNo = Settings.SiteName; jpinfo.siteId = Convert.ToInt32(Settings.SiteCode); //Commented for not printing in cage slip format if (Settings.CAGE_ENABLED) handpay.PrintSlip(jpinfo); } catch (Exception ex) { ExceptionManager.Publish(ex); } } } return result; }
private void btnVoid_Click(object sender, RoutedEventArgs e) { int iVoid; int iResult = 0; LockHandler Lock = new LockHandler(); if (dgHandpay.Items.Count > 0) { if (dgHandpay.SelectedItem != null) { sPos = ""; sTEid = ""; FillTreasuryList handpay_Fill = dgHandpay.SelectedItem as FillTreasuryList; sPos = handpay_Fill.Pos; sTEid = handpay_Fill.TE_ID.ToString(); iResult = Lock.InsertLockRecord(0, "", "HANDPAY", "HP", sTEid); // if (iResult == 1) { MessageBox.ShowBox("MessageID380", BMC_Icon.Error); return; } if (MessageBox.ShowBox("MessageID109", BMC_Icon.Question, BMC_Button.YesNo) == System.Windows.Forms.DialogResult.Yes) { if (Clearhandpay(Convert.ToInt32(handpay_Fill.Installation_No))) { IsHandpayVoid = true; ProcessHandpay(true); if (Treasury_No < 0 || Treasury_No == 0) return; iVoid = VoidHandpay(); try { Asset = handpay_Fill.Asset.ToString(); VoidAmount = handpay_Fill.Amount; if (iVoid > 0) { MessageBox.ShowBox("MessageID110", BMC_Icon.Information); // Newly Added by Venkatesh Kumar.J - SGVI Requirements if (!Settings.CAGE_ENABLED) (oCommonUtilities.CreateInstance()).PrintCommonReceipt(true, handpay_Fill.HP_Type, iVoid.ToString()); //if (VoidAmount > Settings.W2GWinAmount) //{ // if (Settings.W2GMessage) // { // if (AppSettings.IsReceiptRequired && !Settings.CAGE_ENABLED) // { // (oCommonUtilities.CreateInstance()).PrintCommonReceipt(true, handpay_Fill.HP_Type, iVoid.ToString()); // } // } //} //else //{ // if (VoidAmount <= Settings.W2GWinAmount && !Settings.CAGE_ENABLED) // { // (oCommonUtilities.CreateInstance()).PrintCommonReceipt(true, handpay_Fill.HP_Type, iVoid.ToString()); // } //} //if (AppSettings.IsReceiptRequired && (!Settings.CAGE_ENABLED)) //{ // (oCommonUtilities.CreateInstance()).PrintCommonReceipt(true, handpay_Fill.HP_Type, iVoid.ToString()); //} //-----------Untill Here------------------------------- string TreasuryDate = handpay_Fill.TreasuryDate.ToString(); string Amount = handpay_Fill.Amount.ToString(); string TreasuryNo = handpay_Fill.TE_ID.ToString(); string TreasuryType = handpay_Fill.HP_Type; string amount = BMC.Business.CashDeskOperator.CommonUtilities.GetCurrency(Convert.ToDouble(Amount)); //FillTreasury((dgHandpay.SelectedItem as FillTreasuryList).Pos); FillTreasury(string.Empty); //BindListView(); // Helper_classes.Common.BindListView(treasuryList, dgHandpay); dgHandpay.ItemsSource = treasuryList; if (Settings.CAGE_ENABLED) { jackpotProcessInfoDTO jpinfo = new jackpotProcessInfoDTO(); jpinfo.Slot = this.BarPosition; jpinfo.assetConfigNumber = Asset; jpinfo.Denom = 0.01M; jpinfo.jackpotTypeId = handpay_Fill.HP_Type.ToLower() == "attendantpay Credit" ? Convert.ToInt16(1) : handpay_Fill.HP_Type.ToLower() == "attendantpay jackpot" ? Convert.ToInt16(2) : handpay_Fill.HP_Type.ToLower() == "progressive" ? Convert.ToInt16(3) : Convert.ToInt16(1); jpinfo.Slot = handpay_Fill.Pos; jpinfo.assetConfigNumber = Asset; double value = 0; double.TryParse(Amount, out value); jpinfo.hpjpAmount = (long)(-1 * (value * 100)); try { jpinfo.jackpotNetAmount = (long)value; } catch { } double.TryParse(TreasuryNo, out value); jpinfo.sequenceNumber = (long)value; jpinfo.TransactionDate = TreasuryDate; jpinfo.UserID = Security.SecurityHelper.CurrentUser.SecurityUserID.ToString(); jpinfo.siteNo = Settings.SiteName; jpinfo.siteId = Convert.ToInt32(Settings.SiteCode); //Commented for not printing in cage slip format handpay.PrintSlip(jpinfo); } AuditViewerBusiness.InsertAuditData(new Audit.Transport.Audit_History { AuditModuleName = ModuleName.Void, Audit_Screen_Name = "Postion Details|Attendant Pay|Void", Audit_Desc = TreasuryType + " Date: " + TreasuryDate + " Amount:" + amount, AuditOperationType = OperationType.ADD, Audit_Field = "Treasury Number", Audit_New_Vl = TreasuryNo, Audit_Slot = Asset }); //BMC.Business.CashDeskOperator.CommonUtilities.GetCurrency(0.00) } else if (iVoid == -1) MessageBox.ShowBox("MessageID111", BMC_Icon.Information); else { MessageBox.ShowBox("MessageID113", BMC_Icon.Error); AuditViewerBusiness.InsertAuditData(new Audit.Transport.Audit_History { AuditModuleName = ModuleName.Void, Audit_Screen_Name = "Postion Details|Attendant Pay|Void", Audit_Desc = "Error occured while voiding this transaction.", AuditOperationType = OperationType.ADD, Audit_Slot = Asset }); } } catch (Exception Ex) { ExceptionManager.Publish(Ex); MessageBox.ShowBox("MessageID113", BMC_Icon.Error); AuditViewerBusiness.InsertAuditData(new Audit.Transport.Audit_History { AuditModuleName = ModuleName.Void, Audit_Screen_Name = "Postion Details|Attendant Pay|Void", Audit_Desc = "Error occured while voiding this transaction.", AuditOperationType = OperationType.ADD, Audit_Slot = Asset }); } } else { MessageBox.ShowBox("MessageID382", BMC_Icon.Information); } } Lock.DeleteLockRecord(0, "", "HANDPAY", "HP", sTEid); } else MessageBox.ShowBox("MessageID114", BMC_Icon.Information); } else MessageBox.ShowBox("MessageID115", BMC_Icon.Information); }
private void GenerateManulJackpot() { try { jackpotProcessInfoDTO jpinfo = new jackpotProcessInfoDTO(); CAuthorize objAuthorize = null; string HP_Type = string.Empty; Double iAmount = 0; if (txtBox != null && txtBox.Text.Length > 0) { // Issue fix for ->set cultureinfo='en-US', currencyculture='it-IT' Double.TryParse(txtBox.Text.ToString(), NumberStyles.Currency, new CultureInfo(ExtensionMethods.CurrentCurrenyCulture), out iAmount); } if (Settings.Client != null && Settings.Client.ToLower() == "winchells" && Settings.MaxHandPayAuthRequired && txtBox != null && (iAmount > Settings.HandpayPayoutCustomer_Max)) { objAuthorize = new CAuthorize("CashdeskOperator.Authorize.cs.MaxHandpay"); objAuthorize.User = Security.SecurityHelper.CurrentUser; if (!Security.SecurityHelper.HasAccess("CashdeskOperator.Authorize.cs.MaxHandpay")) { objAuthorize.ShowDialogEx(this); if (!objAuthorize.IsAuthorized) return; } else { objAuthorize.IsAuthorized = true; } } if ((dgHandpay.SelectedItem as FillTreasuryList).HP_Type.ToUpper() == "HANDPAY") { HP_Type = "AttendantPay Credit"; jpinfo.jackpotTypeId = 4; } else if ((dgHandpay.SelectedItem as FillTreasuryList).HP_Type.ToUpper() == "JACKPOT") { HP_Type = "AttendantPay Jackpot"; jpinfo.jackpotTypeId = 5; } else { HP_Type = "AttendantPay Progressive"; jpinfo.jackpotTypeId = 6; } DataSet oDt = handpay.createTickeException_HandpayCAGE(int.Parse(this.BarPosition), iAmount, 0, HP_Type); if (Asset.IsNullOrEmpty()) { Asset = handpay.GetAssetNumber(InstallationNumber)[0].Stock_No; } jpinfo.Slot = this.BarPosition; jpinfo.assetConfigNumber = Asset; jpinfo.Denom = 0.01M; jpinfo.hpjpAmount = long.Parse(oDt.Tables[0].Rows[0]["TE_VALUE"].ToString()); jpinfo.jackpotNetAmount = long.Parse(oDt.Tables[0].Rows[0]["TE_VALUE"].ToString()); jpinfo.sequenceNumber = long.Parse(oDt.Tables[0].Rows[0]["TE_ID"].ToString()); jpinfo.TransactionDate = oDt.Tables[0].Rows[0]["TE_Date"].ToString(); jpinfo.UserID = objAuthorize.User.SecurityUserID.ToString(); jpinfo.siteNo = Settings.SiteName; jpinfo.siteId = Convert.ToInt32(Settings.SiteCode); txtBox.Text = this.DefaultAmount(); handpay.PrintSlip(jpinfo); //send PT 10 from client Treasury treasury = new Treasury(); treasury.ActualTreasuryDate = Convert.ToDateTime(jpinfo.TransactionDate); treasury.Asset = Asset; treasury.Authorized_Date = Convert.ToDateTime(jpinfo.TransactionDate); treasury.AuthorizedUser_No = BMC.Security.SecurityHelper.CurrentUser.User_No; treasury.CustomerID = BMC.Security.SecurityHelper.CurrentUser.User_No; treasury.InstallationNumber = InstallationNumber; treasury.TreasuryAmount = iAmount; treasury.UserID = BMC.Security.SecurityHelper.CurrentUser.User_No; treasury.TreasuryType = HP_Type; PostHandpayEvent(treasury); } catch (Exception Ex) { ExceptionManager.Publish(Ex); } }