/// <summary> /// 修改 /// </summary> /// <param name="banktype"></param> /// <returns></returns> public String Update(BankType banktype) { try { int result = new BLBankType().Update(banktype); if (result > 0) { return(JsonConvert.JavaScriptSerializer(new ExtResult() { success = true, msg = "修改成功" })); } else { return(JsonConvert.JavaScriptSerializer(new ExtResult() { success = false, msg = "修改失败" })); } } catch (Exception ex) { return(JsonConvert.JavaScriptSerializer(new ExtResult() { success = false, msg = "修改失败,失败原因:" + ex.Message })); } }
public void SaveBank(Rootobject bank) { var cat = new Category() { Name = "Banka", // IconId = 2 }; UnitOfWork.CurrentSession.Categories.Add(cat); var type = new BankType { Name = "Banka Şubeleri", CategoryId = cat.Id }; UnitOfWork.CurrentSession.BankTypes.Add(type); foreach (var item in bank.response.venues) { var data = new Bank { Name = item.name, BankTypeId = type.Id, Long = item.location != null ? item.location.lng : "", Lat = item.location != null ? item.location.lat : "", Phone = item.contact != null ? item.contact.phone : "", Url = item.url ?? "", }; UnitOfWork.CurrentSession.Banks.Add(data); } UnitOfWork.CurrentSession.SaveChanges(); }
public UserAccount( string firstName, string lastName, string identificationNumber, BankType bank, string bankAccountNumber, string password, bool isAdmin = false) { if (string.IsNullOrEmpty(identificationNumber)) { throw new ArgumentNullException("identification number can not be null!"); } if (string.IsNullOrEmpty(bankAccountNumber)) { throw new ArgumentNullException("bank account number can not be null!"); } if (string.IsNullOrEmpty(password)) { throw new ArgumentNullException("password can not be null!"); } if (password.Length > 6) { throw new ArgumentNullException("password not valid. Enter max 6 numbers!"); } FirstName = firstName; LastName = lastName; IdentificationNumber = identificationNumber; Bank = bank; BankAccountNumber = bankAccountNumber; Password = password; IsAdmin = isAdmin; }
public WalletInfoDTO( string jMBG, string firstName, string lastName, BankType bank, string bankAccountNumber, decimal balance, bool isBlocked, DateTime walletCreationTime, decimal maxDeposit, decimal usedDeposit, decimal maxWithdraw, decimal usedWithdraw) { JMBG = jMBG; FirstName = firstName; LastName = lastName; Bank = bank; BankAccountNumber = bankAccountNumber; Balance = balance; IsBlocked = isBlocked; WalletCreationTime = walletCreationTime; MaxDeposit = maxDeposit; UsedDeposit = usedDeposit; MaxWithdraw = maxWithdraw; UsedWithdraw = usedWithdraw; }
public void UnLoadBank(string bankName, BankType bankType) { if (this.m_isPrepared && this.m_loadedBanks[(int)bankType].Remove(bankName)) { AkBankManager.UnloadBank(bankName); } }
/// <summary> /// Gets specified bank as string. /// </summary> public string GetBank(BankType bank) { try { _lock.EnterReadLock(); try { if (bank == BankType.Input1) { return(BankToString(_input1)); } else if (bank == BankType.Input2) { return(BankToString(_input2)); } else if (bank == BankType.Output) { return(BankToString(_outputRead)); } throw new Exception($"Bank not valid"); } finally { _lock.ExitReadLock(); } } catch (Exception ex) { _errorHandler.LogError(ex); throw; } }
public async Task <BankType> AddBankTypeAsync(BankType bankType) { _uow.BankTypes.Add(bankType); await _uow.SaveChangesAsync().ConfigureAwait(false); return(bankType); }
private void CreateBankAtPlayerPosition(BankType typeOfBank) { try { Vector3 currentPos = Game.Player.Character.Position; Bank newBank = new Bank() { XPos = currentPos.X, YPos = currentPos.Y, ZPos = currentPos.Z, typeOfBank = typeOfBank }; if (newBank.typeOfBank == BankType.fleeca) { newBank.startingMoney = 250; } else if (newBank.typeOfBank == BankType.blaineCounty) { newBank.startingMoney = 50; } else if (newBank.typeOfBank == BankType.pacificStandard) { newBank.startingMoney = 500; } configuration.banks.Add(newBank); Save(); } catch (Exception ex) { UI.Notify($"Ocorreu um Erro: {ex.Message}"); } }
public void SaveAtm(Rootobject atm) { var type = new BankType { Name = "Atm", CategoryId = 7 }; UnitOfWork.CurrentSession.BankTypes.Add(type); foreach (var item in atm.response.venues) { var data = new Bank { Name = item.name, Long = item.location != null ? item.location.lng : "", Lat = item.location != null ? item.location.lat : "", BankTypeId = type.Id, Url = item.url ?? "", Phone = item.contact != null ? item.contact.phone : "" }; UnitOfWork.CurrentSession.Banks.Add(data); } UnitOfWork.CurrentSession.SaveChanges(); }
/// <summary> /// 新增 /// </summary> /// <param name="banktype"></param> /// <returns></returns> public String Add(BankType banktype) { try { banktype.Id = Guid.NewGuid().ToString(); int result = new BLBankType().Add(banktype); if (result > 0) { return(JsonConvert.JavaScriptSerializer(new ExtResult() { success = true, msg = "新增成功" })); } else { return(JsonConvert.JavaScriptSerializer(new ExtResult() { success = false, msg = "新增失败" })); } } catch (Exception ex) { return(JsonConvert.JavaScriptSerializer(new ExtResult() { success = false, msg = "新增失败,失败原因:" + ex.Message })); } }
public IBankAnalyzer GetBankAnalyzer(BankType type) { switch (type) { case BankType.PkoBP: default: return(new PkoBpDataAnalyzer(_configuration)); } }
public Account(BankType banktype, string id, string pwd, double money) { //if( money < 0 ) throw new Exception("...."); this.banktype = banktype; this.Id = id; this.Pwd = pwd; this.Money = money; this.Valid = true; }
public static Bank GetBank(BankType type) { switch (type) { case BankType.TPBank: return(new TPBank()); case BankType.VietcomBank: return(new VietcomBank()); default: throw new Exception("This bank type is unsupported"); } }
public Pin(IGpioPin basePin, GpioPinDriveMode mode, BankType bank, ushort bit, ushort gpioID, ushort pinID) { _basePin = basePin; _mode = mode; _bank = bank; _bit = bit; _gpioID = gpioID; _pinID = pinID; _value = false; _highUntilTime = DateTime.MinValue; }
/// <summary> /// 保存 /// </summary> /// <param name="banktype"></param> /// <returns></returns> public String Save(BankType banktype) { if (string.IsNullOrEmpty(banktype.Id)) { return(Add(banktype)); } else { return(Update(banktype)); } }
public async Task <BankType> UpdateBankTypeAsync(BankType bankType) { //var cmd = $"EXEC BankType_Update @BankTypeId = {bankType.BankTypeId}," + //$" @BankTypeTitle=N'{bankType.BankTypeTitle}'"; //await _uow.Database.ExecuteSqlCommandAsync(cmd).ConfigureAwait(false); _uow.Entry(bankType).State = EntityState.Modified; await _uow.SaveChangesAsync().ConfigureAwait(false); return(bankType); }
public void UnloadBanks(BankType bankType) { if (this.m_isPrepared) { List <string> list = this.m_loadedBanks[(int)bankType]; for (int i = 0; i < list.Count; i++) { AkBankManager.UnloadBank(list[i]); } list.Clear(); } }
public async Task <BankResponse> CheckStatus(string jmbg, string bankPIN, BankType bankType) { switch (bankType) { case BankType.FirstBank: BankResponse response = await FirstBankService.CheckStatus(jmbg, bankPIN); return(response); default: throw new InvalidOperationException("Unsupported bank"); } }
public async Task <BankResponse> CheckStatus(string jmbg, string pin, BankType bankType) { switch (bankType) { case BankType.BrankoBank: var response = await BrankoBankService.CheckStatus(jmbg, pin); return(response); default: throw new ArgumentException("Bank type not supported!"); } }
public Wallet(string firstName, string lastName, string jmbg, BankType bankType, string pin, string bankAccount, string password) { FirstName = firstName; LastName = lastName; Jmbg = jmbg; BankType = bankType; PIN = pin; BankAccount = bankAccount; _password = password; Balance = 0M; Transactions = new List <Transaction>(); WalletCreatedDateTime = DateTime.Now; }
public static IBank getBank(BankType bankType) { switch (bankType) { case BankType.TPBANK: return(new TPBank()); case BankType.VIETCOMBANK: return(new VietcomBank()); default: return(null); } }
public static IBank GetBank(BankType bankType) { switch (bankType) { case BankType.TBBank: return(new TBBank()); case BankType.Vietcombank: return(new Vietcombank()); default: throw new IndexOutOfRangeException(); } }
public static IBank getBank(BankType bankType) { switch (bankType) { case BankType.TPBANK: return(new TPBank()); case BankType.VIETCOMBANK: return(new VietComBank()); default: throw new Exception("This bank type is unsupported"); } }
public GlobalCurrency( CurrencyType fromCurrency, CurrencyType toCurrency, double bankSellsAt, double bankBuysAt, BankType bankType, int filialId = 0 ) { FilialId = filialId; FromCurrency = fromCurrency; ToCurrency = toCurrency; bankSellsAt = BankSellsAt; bankBuysAt = BankBuysAt; BankType = bankType; }
private static BankType[] LoadBankAssets <BankType>() where BankType : ScriptableObject { string[] guids = AssetDatabase.FindAssets("t:" + typeof(BankType).Name); if (guids.Length == 0) { return(null); } BankType[] banks = new BankType[guids.Length]; for (int i = 0; i < guids.Length; i++) { string path = AssetDatabase.GUIDToAssetPath(guids[i]); banks[i] = AssetDatabase.LoadAssetAtPath <BankType>(path); } return(banks); }
public bool UpdateCharges(int rtgs, int imps, BankType type) { if (type.Equals(BankType.Same)) { this.Bank.SameBankIMPS = imps; this.Bank.SameBankRTGS = rtgs; return(true); } else if (type.Equals(BankType.Different)) { this.Bank.DiffBankIMPS = imps; this.Bank.DiffBankRTGS = rtgs; return(true); } return(false); }
public static IBank GetBankName(BankType bankType) { switch (bankType) { case BankType.VIETCOMBANK: { return(new Vietcombank()); } case BankType.TPBANK: { return(new TPBank()); } default: { throw new Exception("Exception here."); }; } }
public Wallet( string jMBG, string firstName, string lastName, BankType bank, string bankAccountNumber, string bankPIN, string password ) { JMBG = jMBG; FirstName = firstName; LastName = lastName; Bank = bank; BankAccountNumber = bankAccountNumber; BankPIN = bankPIN; PASS = password; Transactions = new List <Transaction>(); WalletCreationTime = DateTime.Now; }
private static void ReadSingleCustomerForEdit(int CustomerID) { controller = "BankAccounts"; BankAccount GetBankAccountID = db.BankAccount.ReadByCustomerID(CustomerID); response = GlobalVariable.WebApiClient.GetAsync(string.Concat(controller, $"/{GetBankAccountID.ID}")).Result; BankAccount x = response.Content.ReadAsAsync <BankAccount>().Result; var table = new ConsoleTable("1", "2", "3", "4", "5", "6"); table.AddRow("Fullname", "NRIC", "Date Of Birth", "Age", "Email", "Bank"); BankType bankType = x.Bank; table.AddRow(x.Customer.Fullname, x.Customer.NRIC, string.Format("{0:yyyy/MM/dd}", x.Customer.DateOfBirth), x.Customer.Age, x.Customer.Email, bankType.ToString()); table.Options.EnableCount = false; table.Write(); }
public static void ReadAllCustomer() { controller = "BankAccounts"; response = GlobalVariable.WebApiClient.GetAsync(controller).Result; IEnumerable <BankAccount> bankAccountList = response.Content.ReadAsAsync <IEnumerable <BankAccount> >().Result; var table = new ConsoleTable("CustomerID", "Full Name", "NRIC", "Date Of Birth", "Age", "Email", "Account Type", "AccountNo", "Account Balance", "Bank"); foreach (var item in bankAccountList) { AccountType accountType = item.AccountType; BankType bankType = item.Bank; table.AddRow(item.Customer.ID, item.Customer.Fullname, item.Customer.NRIC, string.Format("{0:yyyy/MM/dd}", item.Customer.DateOfBirth), item.Customer.Age, item.Customer.Email, accountType.ToString(), item.AccountNo, item.AccountBalance, bankType.ToString()); } table.Options.EnableCount = false; table.Write(); }
void OnGUI() { EditorGUIUtility.fieldWidth = 150f; EditorGUIUtility.labelWidth = 80f; _soundBank = ( GATSoundBank )EditorGUILayout.ObjectField( "Sound Bank: ", _soundBank, typeof( GATSoundBank ), false, GUILayout.ExpandWidth( false ) ); if( _soundBank == false ) { EditorGUILayout.HelpBox( __soundBankHelp, MessageType.Info ); GUI.enabled = false; } else { _bankType = ( BankType )EditorGUILayout.EnumPopup( "Bank Type: ", _bankType, GUILayout.ExpandWidth( false ) ); EditorGUILayout.HelpBox( __bankTypesHelp[ ( int )_bankType ], MessageType.Info ); } GUI.color = Color.green; if ( GUILayout.Button( "Create", GUILayout.Width( 70f ) ) ) { GATEditorUtilities.CheckManager(); GATSampleBank bank = null; switch( _bankType ) { case BankType.Simple: bank = GATEditorUtilities.NewChildGO< GATSampleBank >( "Sample Bank" ); break; case BankType.Active: bank = GATEditorUtilities.NewChildGO< GATActiveSampleBank >( "Sample Bank" ); break; } bank.EditorUpdateSoundBank( _soundBank ); this.Close(); } }
/// <summary> /// Fetch the path in Resources to the three different sound banks for loading from the SoundBankType. /// </summary> /// <returns>Path to the Sound Bank.</returns> /// <param name="bankType">Type of sound bank to load.</param> string GetBankFilePath(BankType bankType) { string resourceBankPath = @"UnitySynth/SoundBank/"; string gmBankPath = resourceBankPath + @"GM/gm"; string fmBankPath = resourceBankPath + @"FM/fm"; string analogBankPath = resourceBankPath + @"Analog/analog"; switch (bankType) { case BankType.GeneralMidi: return gmBankPath; case BankType.FMSynthesis: return fmBankPath; case BankType.AnalogSynthesis: return analogBankPath; default: Debug.LogWarning ("BankType " + bankType.ToString() + " not found. Using General MIDI."); return gmBankPath; } }
private static Hashtable GetWhatToLogWithHeaders(BankType bankType, object[] logArray, SortedList kontoEntries) { // Gör om till Arraylist för ordning, det blir i omvänd ordning, alltså först överst. Ex 2009-04-01 sen 2009-04-02 osv. Hashtable logThis = null; // Lägg till överskrifter // y m d n t g s b c if (ProgramSettings.BankType.Equals(BankType.Swedbank) || ProgramSettings.BankType.Equals(BankType.Mobilhandelsbanken) || ProgramSettings.BankType.Equals(BankType.Handelsbanken) ) { logThis = new Hashtable { { kontoEntries.Count + 1, logArray } }; } else { throw new Exception("Bank type not allowed: " + ProgramSettings.BankType.ToString()); } return logThis; }