当前位置: 首页>>代码示例>>C#>>正文


C# AccountInfo类代码示例

本文整理汇总了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);
    }
开发者ID:viticm,项目名称:pap2,代码行数:29,代码来源:AccountInfo.aspx.cs

示例2: OrdersInformationUpdateResponseMessage

 /// <summary>
 /// 
 /// </summary>
 public OrdersInformationUpdateResponseMessage(AccountInfo accountInfo, 
     OrderInfo[] orderInformations, ActiveOrder.UpdateTypeEnum[] ordersUpdates, bool operationResult)
     : base(accountInfo, operationResult)
 {
     _ordersUpdates = ordersUpdates;
     _orderInformations = orderInformations;
 }
开发者ID:redrhino,项目名称:DotNetConnectTerminal,代码行数:10,代码来源:OrdersInformationUpdateResponseMessage.cs

示例3: ModifyOrderResponceMessage

 /// <summary>
 /// 
 /// </summary>
 public ModifyOrderResponceMessage(AccountInfo sessionInfo, string orderId,
     string orderModifiedId, bool operationResult)
     : base(sessionInfo, operationResult)
 {
     _orderId = orderId;
     _orderModifiedId = orderModifiedId;
 }
开发者ID:redrhino,项目名称:DotNetConnectTerminal,代码行数:10,代码来源:ModifyOrderResponceMessage.cs

示例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;
                }
            }
        }
开发者ID:jeffrschneider,项目名称:OpenBookSystem,代码行数:34,代码来源:OBSRoleProvider.cs

示例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));
        }
开发者ID:redrhino,项目名称:DotNetConnectTerminal,代码行数:7,代码来源:RemoteExecutionAccount.cs

示例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();
        }
开发者ID:hma14,项目名称:AccountRegistrationApp,代码行数:29,代码来源:HomeController.cs

示例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;
        }
开发者ID:SaladLab,项目名称:TicTacToe,代码行数:36,代码来源:Authenticator.cs

示例8: IsFiscalOfficer

        public bool IsFiscalOfficer(AccountInfo account, string userId)
        {
            var client = InitializeClient();

            var result = client.isUserFiscalOfficerForAccount(userId, account.Chart, account.Number);

            return result;
        }
开发者ID:ucdavis,项目名称:Purchasing,代码行数:8,代码来源:FinancialRoleSystemService.cs

示例9: GetAccountInfo

        public AccountInfo GetAccountInfo(AccountInfo account)
        {
            var client = InitializeClient();

            var result = client.getSimpleAccountInfo(account.Chart, account.Number);

            return new AccountInfo(result);
        }
开发者ID:ucdavis,项目名称:Purchasing,代码行数:8,代码来源:FinancialRoleSystemService.cs

示例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;
 }
开发者ID:redrhino,项目名称:DotNetConnectTerminal,代码行数:8,代码来源:FXCMOrders.cs

示例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;
 }
开发者ID:redrhino,项目名称:DotNetConnectTerminal,代码行数:12,代码来源:CloseOrderVolumeMessage.cs

示例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;
 }
开发者ID:redrhino,项目名称:DotNetConnectTerminal,代码行数:12,代码来源:CloseOrderVolumeResponceMessage.cs

示例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;
 }
开发者ID:redrhino,项目名称:DotNetConnectTerminal,代码行数:10,代码来源:FXCMOrders.cs

示例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);
        }
开发者ID:wangsying,项目名称:EasySite,代码行数:11,代码来源:AccountDaoTest.cs

示例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;
        }
开发者ID:jsgydjq,项目名称:train,代码行数:15,代码来源:AccountManager.cs


注:本文中的AccountInfo类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。