private void UpdateToRedeemPointsCash(string strPrizeName, int Unitpointvalue, float UnitCashvalue) { try { if (Unitpointvalue != 0) { if ((PlayerInformationBusinessObject.CreateInstance()).UpdateUnitCashPoints(strPrizeName, Unitpointvalue, UnitCashvalue) == false) { MessageBox.ShowBox("MessageID96", BMC_Icon.Error); } LoadPlayerInfo(); } else { MessageBox.ShowBox("MessageID97", BMC_Icon.Information); } } catch (Exception ex) { ExceptionManager.Publish(ex); } }
private void btnRedeem_Click(object sender, RoutedEventArgs e) { try { this.Cursor = Cursors.Wait; if (Settings.IsKioskRequired) { if (lblUnitPointValue.Content.ToString().Length > 0 && int.Parse(lblUnitPointValue.Content.ToString()) > 0 && txtPrizeQty.Text.Length > 0 && int.Parse(txtPrizeQty.Text) > 0) { LoginInfoDTO objLoginInfo = playerInformationBusinessObject.GetLoginInformation(); PlayerInfoDTO objPlayerInfo = playerInformationBusinessObject.GetPlayerInformation(txtAcctNo.Text); IPlayerInformation objCashDeskOperator = PlayerInformationBusinessObject.CreateInstance(); if (objCashDeskOperator.UpdateRedeempoints(txtAcctNo.Text, listReedeem.PrizeId, int.Parse(txtPrizeQty.Text), int.Parse(listReedeem.RedeemPoints), objLoginInfo, objPlayerInfo) == true) { if (objCashDeskOperator.CheckEnableRedeemPrintCDO() == true) { EpsonReceiptPrint(); } MessageBox.ShowBox("MessageID90", BMC_Icon.Information); AuditViewerBusiness.InsertAuditData(new Audit.Transport.Audit_History { AuditModuleName = ModuleName.PlayerClub, Audit_Screen_Name = "PlayerClub", Audit_Desc = "Player club points redeemed", AuditOperationType = OperationType.ADD, Audit_Field = "Reedeem Points", Audit_New_Vl = listReedeem.RedeemPoints }); LoadPlayerInfo(); lblUnitPointValue.Content = listReedeem.RedeemPoints; lblCashValue.Content = listReedeem.AuthAward; txtPrizeQty.Text = "1"; } else { MessageBox.ShowBox("MessageID91", BMC_Icon.Information); AuditViewerBusiness.InsertAuditData(new Audit.Transport.Audit_History { AuditModuleName = ModuleName.PlayerClub, Audit_Screen_Name = "PlayerClub", Audit_Desc = "Unable to redeem points", AuditOperationType = OperationType.ADD, }); } } else if (txtAcctNo.Text == "0" || txtAcctNo.Text == "") { MessageBox.ShowBox("MessageID92", BMC_Icon.Information); } else if (txtPrizeQty.Text.Length <= 0) { MessageBox.ShowBox("MessageID93", BMC_Icon.Information); txtPrizeQty.Text = "1"; } else if (int.Parse(txtPrizeQty.Text) <= 0) { MessageBox.ShowBox("MessageID93", BMC_Icon.Information); txtPrizeQty.Text = "1"; } else if (txtAcctNo.Text != "") { LoadPlayerInfo(); } } else { MessageBox.ShowBox("MessageID376", BMC_Icon.Information); return; } } catch (Exception ex) { MessageBox.ShowBox("MessageID94", BMC_Icon.Information); txtPrizeQty.Text = "1"; ExceptionManager.Publish(ex); } finally { this.Cursor = Cursors.Arrow; } }