public ServiceResult SetWithdrawalFeeType(WithdrawalFeeType type) { var result = new ServiceResult(); new MerchantAccountComponent().SetWithdrawalFeeType(this.GetMerchantAccountId(), type); return(result); }
//public void SettingMinerCryptoAddress(Guid accountId, string address) //{ // const string sql = @"UPDATE [dbo].[MerchantAccounts] // SET [MinerCryptoAddress] = @MinerCryptoAddress // WHERE [Id] = @Id"; // using (var conn = WriteConnection()) // { // conn.Execute(sql, new // { // Id = accountId, // MinerCryptoAddress = address // }); // } //} public void SetWithdrawalFeeType(Guid accountId, WithdrawalFeeType type) { const string sql = @"UPDATE [dbo].[MerchantAccounts] SET [WithdrawalFeeType] = @WithdrawalFeeType WHERE [Id] = @Id"; using (var connection = WriteConnection()) { connection.Execute(sql, new { WithdrawalFeeType = type, Id = accountId }); } }
internal static string ToSerializedValue(this WithdrawalFeeType value) { switch (value) { case WithdrawalFeeType.Absolute: return("Absolute"); case WithdrawalFeeType.Relative: return("Relative"); } return(null); }
/// <summary> /// Initializes a new instance of the WithdrawalCryptoFeeModel class. /// </summary> /// <param name="type">Possible values include: 'Absolute', /// 'Relative'</param> public WithdrawalCryptoFeeModel(double size, WithdrawalFeeType type) { Size = size; Type = type; CustomInit(); }
//public void SettingMinerCryptoAddress(Guid merchantId, string address) //{ // var account = new MerchantAccountDAC().GetById(merchantId); // if (account?.POSId == null) // return; // if (account.Status != AccountStatus.Active) // return; // var pos = new POSDAC().GetById(account.POSId.Value); // if (!pos.Status) // return; // new FiiiChainAgent().SaveMiners(address, account.Username, pos.Sn); // new MerchantAccountDAC().SettingMinerCryptoAddress(merchantId, address); //} public void SetWithdrawalFeeType(Guid accountId, WithdrawalFeeType type) { new MerchantAccountDAC().SetWithdrawalFeeType(accountId, type); }