Ejemplo n.º 1
0
        /// <summary>
        /// Returns true if TransmissionsStateResponse200 instances are equal
        /// </summary>
        /// <param name="other">Instance of TransmissionsStateResponse200 to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(TransmissionsStateResponse200 other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Created == other.Created ||
                     Created != null &&
                     Created.Equals(other.Created)
                     ) &&
                 (
                     Transferred == other.Transferred ||
                     Transferred != null &&
                     Transferred.Equals(other.Transferred)
                 ) &&
                 (
                     Delivered == other.Delivered ||
                     Delivered != null &&
                     Delivered.Equals(other.Delivered)
                 ));
        }
Ejemplo n.º 2
0
    protected void CashoutButtonConfirm_Click(object sender, EventArgs e)
    {
        if (Page.IsValid)
        {
            SuccMessagePanel.Visible     = false;
            ErrorMessagePanel.Visible    = false;
            CashoutButtonConfirm.Visible = false;

            try
            {
                //Parse amount
                Money Transferred;
                try
                {
                    Transferred = Money.Parse(AmountToCashoutTextBox.Text).FromMulticurrency();
                    Transferred = Money.Parse(Transferred.ToShortClearString());
                }
                catch (Exception ex)
                {
                    throw new MsgException(U2502.INVALIDMONEYFORMAT);
                }

                if (!AppSettings.Payments.WithdrawalEmailEnabled && AppSettings.Proxy.SMSType == ProxySMSType.EveryCashout)
                {
                    User.IsPhoneVerifiedBeforeCashout = true;
                    User.UnconfirmedSMSSent--;
                    User.Save();
                }

                //Lets process to cashout
                PayoutManager Manager = new PayoutManager(User, Transferred, RadioFrom.SelectedValue,
                                                          CustomPayoutProcessor.IsCustomPayoutProcessor(RadioFrom.SelectedValue), CustomPayoutProcessor.GetCustomPayoutProcessorId(RadioFrom.SelectedValue), Account.Text);

                SuccMessage.Text         = Manager.TryMakePayout();
                SuccMessagePanel.Visible = true;
            }
            catch (Exception ex)
            {
                ErrorMessagePanel.Visible = true;
                ErrorMessage.Text         = ex.Message;
            }
            finally
            {
                Account.Enabled = true;
                PIN.Enabled     = true;
                AmountToCashoutTextBox.Enabled       = true;
                CashoutButton.Visible                = true;
                ConfirmationCodePlaceHolder2.Visible = false;
                CashoutButtonConfirm.Visible         = false;
            }
        }
    }
Ejemplo n.º 3
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (Created != null)
         {
             hashCode = hashCode * 59 + Created.GetHashCode();
         }
         if (Transferred != null)
         {
             hashCode = hashCode * 59 + Transferred.GetHashCode();
         }
         if (Delivered != null)
         {
             hashCode = hashCode * 59 + Delivered.GetHashCode();
         }
         return(hashCode);
     }
 }