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


C# AccountType.ToString方法代码示例

本文整理汇总了C#中AccountType.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# AccountType.ToString方法的具体用法?C# AccountType.ToString怎么用?C# AccountType.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AccountType的用法示例。


在下文中一共展示了AccountType.ToString方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Account

        public Account(User user, AccountType type)
        {
            _user = user;
            _Id++;

            _type = type;
            _AccountId = type.ToString() + _Id.ToString();
        }
开发者ID:ManjunathP,项目名称:ABCBank,代码行数:8,代码来源:Account.cs

示例2: setUserRole

        public void setUserRole(String username, AccountType accountType)
        {
            AccountDAO accountDao = new AccountDAO();
            AccountDTO accountDto = accountDao.find(username);

            accountDto.accountType = accountType.ToString();
            accountDao.merge(accountDto);
        }
开发者ID:TheProjecter,项目名称:turnkeycareers,代码行数:8,代码来源:SecurityServiceImpl.cs

示例3: SubCount

        private void SubCount(int userId, AccountType accountType, int setCount, int? updateUserId)
        {
            var numCount = _userAccountRepository.SubCount(userId, accountType, setCount, updateUserId);

            if (numCount != 1)
            {
                Logger.Warn(String.Format("减少{4}发生影响行数不为1,userid={0},foverCount={1},updateId={2},numCount={3}", userId, setCount, updateUserId, numCount, accountType.ToString()));
            }
        }
开发者ID:ngnono,项目名称:NG.FM,代码行数:9,代码来源:UserService.cs

示例4: TestContext

 public TestContext(AccountType accType)
 {
     this.AccountType = accType;
     if (AccountType == AccountType.Gross)
         Symbol = "EURUSD";
     else
         Symbol = "EUR/USD";
     VeryLowPrice = 0.5;
     VeryHighPrice = 1.5;
     Volume = 10000;
     this.Comment = string.Format("UnitTest for {0} account", accType.ToString());
 }
开发者ID:ifzz,项目名称:FDK,代码行数:12,代码来源:TestContext.cs

示例5: Given_an_account

        private Account Given_an_account(AccountType type = AccountType.Sales)
        {
            return Api.Accounts
                .Where(string.Format("Type == \"{0}\"", type.ToString().ToUpper()))
                .Find()
                .FirstOrDefault() ??

                Api.Create(new Account
                {
                    Name = Random.GetRandomString(20),
                    Code = Random.GetRandomString(10),
                    Type = type
                });
        }
开发者ID:ChrisRomp,项目名称:Xero-Net,代码行数:14,代码来源:ManualJournalsTest.cs

示例6: SetAccountType

 public void SetAccountType(AccountType type)
 {
     if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor && this.mAccount != null)
     {
         AndroidJavaClass androidJavaClass = new AndroidJavaClass("com.tendcloud.tenddata.TDGAAccount$AccountType");
         AndroidJavaObject androidJavaObject = androidJavaClass.CallStatic<AndroidJavaObject>("valueOf", new object[]
         {
             type.ToString()
         });
         this.mAccount.Call("setAccountType", new object[]
         {
             androidJavaObject
         });
     }
 }
开发者ID:floatyears,项目名称:Decrypt,代码行数:15,代码来源:TDGAAccount.cs

示例7: TryParseAccountType

        private static bool TryParseAccountType(string value, out AccountType accountType)
        {
            var success = Enum.TryParse(value, out accountType);
            if (!success) return false;

            decimal d;
            var isInvalid = Decimal.TryParse(accountType.ToString(), out d);

            return !isInvalid;
        }
开发者ID:mattwatson,项目名称:Akcounts,代码行数:10,代码来源:AccountViewModel.cs

示例8: createHttpClient

        private HttpClient createHttpClient(Uri baseUri, string userName, string password,
			AccountType? accountType, IWebProxy proxy, bool compressionEnabled, TimeSpan timeout)
        {
            bool autenticationDisabled = string.IsNullOrEmpty(userName) && string.IsNullOrEmpty(password);

            HttpClientHandler handler = new HttpClientHandler
            {
                AutomaticDecompression = compressionEnabled
                    ? DecompressionMethods.GZip | DecompressionMethods.Deflate
                    : DecompressionMethods.None,
                Credentials = autenticationDisabled ? null : createCredentials(baseUri, userName, password),
                PreAuthenticate = !autenticationDisabled,
                UseProxy = proxy != null,
                Proxy = proxy
            };

            HttpClient client = new HttpClient(handler, true)
            {
                BaseAddress = baseUri,
                Timeout = timeout
            };

            client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue(_defaultMediaType));

            if (compressionEnabled)
            {
                client.DefaultRequestHeaders.AcceptEncoding.Add(StringWithQualityHeaderValue.Parse("gzip"));

                client.DefaultRequestHeaders.AcceptEncoding.Add(StringWithQualityHeaderValue.Parse("deflate"));
            }

            if (!autenticationDisabled && accountType != null)
                client.DefaultRequestHeaders.Add(_accountTypeHeaderName, accountType.ToString());

            return client;
        }
开发者ID:Ogonik,项目名称:LWS,代码行数:36,代码来源:ComprenoClient.cs

示例9: Create

 /// <summary>
 /// Creates an account given the <see cref="T:AccountType"/> to create.
 /// </summary>
 /// <param name="accountType">The <see cref="T:AccountType"/> of the account to create.</param>
 /// <returns>The newly created account.</returns>
 public static Account Create(AccountType accountType)
 {
     return Create(accountType.ToString());
 }
开发者ID:PaulStovell,项目名称:trial-balance,代码行数:9,代码来源:AccountFactory.cs

示例10: CreateAccount

 public AccountBase CreateAccount(AccountType accountType)
 {
     var objectHandle = Activator.CreateInstance(null, string.Format("{0}Account", accountType.ToString()));
     return (AccountBase)objectHandle.Unwrap();
 }
开发者ID:aleksandrzak-rafal,项目名称:AdaptiveCode,代码行数:5,代码来源:AccountFactory.cs

示例11: SaveIndex

        private void SaveIndex(List<Guid> indexItems, AccountType accountType)
        {
            Dictionary<string, string> results = new Dictionary<string, string>();
            Uri indexFileUri = new Uri("/" + accountType.ToString() + "Index.txt", UriKind.Relative);
            using (Package package = ZipPackage.Open(this.FilePath, System.IO.FileMode.OpenOrCreate)) {
                // Either get the existing PackagePart or create a new one
                PackagePart indexPart = null;
                if (package.PartExists(indexFileUri)) {
                    indexPart = package.GetPart(indexFileUri);
                } else {
                    indexPart = package.CreatePart(indexFileUri, "text/xml");
                }

                // Now write the settings to the package
                using (StreamWriter sw = new StreamWriter(indexPart.GetStream())) {
                    foreach (Guid accountId in indexItems) {
                        sw.WriteLine(accountId.ToString());
                    }
                }

            }
        }
开发者ID:PaulStovell,项目名称:trial-balance,代码行数:22,代码来源:PackageDataProvider.cs

示例12: ReadIndex

 private List<Guid> ReadIndex(AccountType accountType)
 {
     List<Guid> results = new List<Guid>();
     Uri indexFileUri = new Uri("/" + accountType.ToString() + "Index.txt", UriKind.Relative);
     using (Package package = ZipPackage.Open(this.FilePath, System.IO.FileMode.OpenOrCreate)) {
         if (package.PartExists(indexFileUri)) {
             PackagePart indexPart = package.GetPart(indexFileUri);
             using (StreamReader reader = new StreamReader(indexPart.GetStream())) {
                 string line = null;
                 while ((line = reader.ReadLine()) != null) {
                     Guid accountId = new Guid(line);
                     results.Add(accountId);
                 }
             }
         }
     }
     return results;
 }
开发者ID:PaulStovell,项目名称:trial-balance,代码行数:18,代码来源:PackageDataProvider.cs

示例13: DeleteProvider

        public ActionResult DeleteProvider(string timelineId, string user, AccountType accountType)
        {
            var config = SocialAllianceConfig.Read();
            var timelineConfig = config.ReadTimeline(timelineId, true);

            try
            {
                if (accountType == AccountType.youTube)
                {
                    timelineConfig.YouTubeProviders.Remove(user);
                }
                else
                {
                    timelineConfig.TwitterProviders.Remove(user);
                }
                SocialAllianceConfig.CreateOrUpdateTimeline(timelineConfig);
            }
            catch
            {
                TempData["Error"] = "There was an error deleting the entry, maybe it has already been deleted.";
            }

            return PartialView("_" + accountType.ToString() + "ProvidersListPartial", timelineConfig);
        }
开发者ID:JustynaJuza,项目名称:SocialConnections,代码行数:24,代码来源:TimelinesController.cs


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