本文整理汇总了C#中AccountInfo类的典型用法代码示例。如果您正苦于以下问题:C# AccountInfo类的具体用法?C# AccountInfo怎么用?C# AccountInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AccountInfo类属于命名空间,在下文中一共展示了AccountInfo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ShowAccountInfo
private void ShowAccountInfo(AccountInfo accountInfo)
{
LiteralResult.Text = string.Format("[{0}]{1} {2}", accountInfo.ZoneName, accountInfo.AccountName,StringDef.AccountInfo);
TextAccount.Text = accountInfo.AccountName;
TextZoneName.Text = accountInfo.ZoneName;
TextEndDate.Text = accountInfo.EndDate.ToString();
TextLeftSecond.Text = accountInfo.LeftSecond.ToString();
TextLastLoginTime.Text = accountInfo.LastLoginTime.ToString();
TextLastLoginIP.Text = accountInfo.LastLoginIP.ToString();
TextLastLogoutTime.Text = accountInfo.LastLogoutTime.ToString();
TextLeftCoin.Text = accountInfo.LeftCoin.ToString();
TextLeftSecond.Text = accountInfo.LeftSecond.ToString();
TextActiveIP.Text = accountInfo.ActiveIP.ToString();
TextActiveTime.Text = accountInfo.ActiveTime.ToString();
TextActiveType.Text = accountInfo.ActiveType.ToString();
TextExtPoint0.Text = accountInfo.ExtPoint0.ToString();
TextExtPoint1.Text = accountInfo.ExtPoint1.ToString();
TextExtPoint2.Text = accountInfo.ExtPoint2.ToString();
TextExtPoint3.Text = accountInfo.ExtPoint3.ToString();
TextExtPoint4.Text = accountInfo.ExtPoint4.ToString();
TextExtPoint5.Text = accountInfo.ExtPoint5.ToString();
TextExtPoint6.Text = accountInfo.ExtPoint6.ToString();
TextExtPoint7.Text = accountInfo.ExtPoint7.ToString();
TextState.Text = TheAdminServer.PaySysAgent.GetAccountState(accountInfo.AccountName).ToString();
TextGatewayInfo.Text = TheAdminServer.PaySysAgent.GetGatewayByAccount(accountInfo.AccountName);
HyperLinkSetPassword.NavigateUrl = string.Format("~/PaySys/AccountPassword.aspx?{0}={1}",
WebConfig.ParamAccount, accountInfo.AccountName);
}
示例2: OrdersInformationUpdateResponseMessage
/// <summary>
///
/// </summary>
public OrdersInformationUpdateResponseMessage(AccountInfo accountInfo,
OrderInfo[] orderInformations, ActiveOrder.UpdateTypeEnum[] ordersUpdates, bool operationResult)
: base(accountInfo, operationResult)
{
_ordersUpdates = ordersUpdates;
_orderInformations = orderInformations;
}
示例3: ModifyOrderResponceMessage
/// <summary>
///
/// </summary>
public ModifyOrderResponceMessage(AccountInfo sessionInfo, string orderId,
string orderModifiedId, bool operationResult)
: base(sessionInfo, operationResult)
{
_orderId = orderId;
_orderModifiedId = orderModifiedId;
}
示例4: GetUserRole
public static AccountRoles GetUserRole(string strUserName)
{
AccountInfo user = new AccountInfo();
try
{
user = CurrentUser.Details(strUserName);
}
catch (Exception)
{
FormsAuthentication.SignOut();
HttpContext.Current.Items["loggedOut"] = true;
HttpContext.Current.Response.RedirectToRoute("SignOut", null);
}
if (user != null)
{
return user.Role;
}
else
{
string result = OBSDataSource.GetUserProfile(long.Parse(strUserName), out user);
if (string.IsNullOrEmpty(result))
{
CurrentUser.CacheUser(user);
return CurrentUser.Details(strUserName).Role;
}
else
{
//TODO
return AccountRoles.User;
}
}
}
示例5: Orders_OrderUpdatedEvent
protected override void Orders_OrderUpdatedEvent(ITradeEntityManagement provider, AccountInfo account, Order[] orders, ActiveOrder.UpdateTypeEnum[] updatesType)
{
base.Orders_OrderUpdatedEvent(provider, account, orders, updatesType);
// Run in a separate thread since it takes time to request from server.
//GeneralHelper.FireAndForget(new GeneralHelper.GenericReturnDelegate<bool>(Update));
}
示例6: Login
public ActionResult Login(string userId, string password)
{
AccountInfo info = new AccountInfo();
if (ModelState.IsValid)
{
info.userid = userId;
info.password = password;
try {
using (svcClient = new AccountServiceClient())
{
if (svcClient.Authenticate(info))
{
Session["IsAuthenticated"] = true;
Session["User"] = userId;
return View("LoggedIn");
}
}
}
catch (FaultException<AccountServiceFault> ex)
{
HandleErrorInfo errorInfo = new HandleErrorInfo(ex, "Home", "Login");
return View("Error", errorInfo);
}
}
ViewBag.LoginFailed = "Oops... user credential is not matched, please try again!";
return View();
}
示例7: AuthenticateAsync
// If account exists, check password correct.
// Otherwise create new account with id and password.
public static async Task<AccountInfo> AuthenticateAsync(string id, string password)
{
if (string.IsNullOrWhiteSpace(id))
return null;
var accountCollection = MongoDbStorage.Instance.Database.GetCollection<AccountInfo>("Account");
await EnsureIndex(accountCollection);
var account = await accountCollection.Find(a => a.Id == id).FirstOrDefaultAsync();
if (account != null)
{
if (PasswordUtility.Verify(password, account.PassSalt, account.PassHash) == false)
return null;
account.LastLoginTime = DateTime.UtcNow;
await accountCollection.ReplaceOneAsync(a => a.Id == id, account);
}
else
{
var saltHash = PasswordUtility.CreateSaltHash(password);
account = new AccountInfo
{
Id = id,
PassSalt = saltHash.Item1,
PassHash = saltHash.Item2,
UserId = UniqueInt64Id.GenerateNewId(),
RegisterTime = DateTime.UtcNow,
LastLoginTime = DateTime.UtcNow
};
await accountCollection.InsertOneAsync(account);
}
return account;
}
示例8: IsFiscalOfficer
public bool IsFiscalOfficer(AccountInfo account, string userId)
{
var client = InitializeClient();
var result = client.isUserFiscalOfficerForAccount(userId, account.Chart, account.Number);
return result;
}
示例9: GetAccountInfo
public AccountInfo GetAccountInfo(AccountInfo account)
{
var client = InitializeClient();
var result = client.getSimpleAccountInfo(account.Chart, account.Number);
return new AccountInfo(result);
}
示例10: DecreaseOrderVolume
public bool DecreaseOrderVolume(AccountInfo accountInfo, string orderId, decimal volumeDecreasal, decimal? allowedSlippage,
decimal? desiredPrice, out decimal decreasalPrice, out string modifiedId, out string operationResultMessage)
{
decreasalPrice = 0;
modifiedId = string.Empty;
operationResultMessage = "The operation is not supported by this provider.";
return false;
}
示例11: CloseOrderVolumeMessage
/// <summary>
/// Close order.
/// </summary>
public CloseOrderVolumeMessage(AccountInfo accountInfo, Symbol symbol, string orderId, string orderTag, decimal? price, decimal? slippage)
: base(accountInfo)
{
_symbol = symbol;
_orderId = orderId;
_price = price;
_slippage = slippage;
_orderTag = orderTag;
}
示例12: CloseOrderVolumeResponceMessage
/// <summary>
///
/// </summary>
public CloseOrderVolumeResponceMessage(AccountInfo sessionInfo, string orderId,
string orderModifiedId, decimal closingPrice, DateTime closingDateTime, bool operationResult)
: base(sessionInfo, operationResult)
{
_orderId = orderId;
_orderModifiedId = orderModifiedId;
_closingPrice = closingPrice;
_closingDateTime = closingDateTime;
}
示例13: CloseOrCancelOrder
public bool CloseOrCancelOrder(AccountInfo accountInfo, string orderId, string orderTag,
decimal? allowedSlippage, decimal? desiredPrice, out decimal closingPrice,
out DateTime closingTime, out string modifiedId, out string operationResultMessage)
{
closingPrice = 0;
closingTime = DateTime.MinValue;
modifiedId = string.Empty;
operationResultMessage = "The operation is not supported by this provider.";
return false;
}
示例14: InsertTest
public void InsertTest()
{
AccountDao target = new AccountDao(); // TODO: 初始化为适当的值
AccountInfo account = new AccountInfo(); // TODO: 初始化为适当的值
account.UserName = "wahahha1";
account.Password = "******";
object expected = null; // TODO: 初始化为适当的值
object actual;
actual = target.Register(account);
}
示例15: CreateNewAccount
/// <summary>
/// ����һ�����˺�
/// </summary>
/// <returns></returns>
public static Account CreateNewAccount()
{
string name = "NewAccount" + _accountList.Count + 1;
AccountInfo accountInfo = new AccountInfo() {Username = name};
Config.BuyTicketConfig.Instance.AccountInfos.Add(accountInfo);
Config.BuyTicketConfig.Save();
Account account = new Account(accountInfo);
_accountList.Add(account);
return account;
}