當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。