Exemplo n.º 1
0
        /// <summary>
        /// This actions returns FundAccount view in My Accounts section
        /// </summary>
        /// <param name="accountNumber"></param>
        /// <returns></returns>
        public ActionResult FundAccount(string accountNumber)
        {
            try
            {
                if (SessionManagement.UserInfo != null)
                {
                    LoginInformation      loginInfo = SessionManagement.UserInfo;
                    AccountNumberRuleInfo ruleInfo  = SessionManagement.AccountRuleInfo;

                    ViewData["Country"]           = new SelectList(countryBO.GetCountries(), "PK_CountryID", "CountryName");
                    ViewData["ReceivingBankInfo"] = new SelectList(receivingBankInfoBO.GetReceivingBankInfo((int)SessionManagement.OrganizationID), "PK_RecievingBankID", "RecievingBankName");

                    var model = new TransfersModel();
                    model.BankInformation       = new List <BankInformation>();
                    model.LandingAccInformation = new List <LandingAccInformation>();
                    model.AccountNumber         = accountNumber;

                    //Get all bank accounts
                    var userBankInfos = bankBO.GetAllBankInfosForUser(loginInfo.LogAccountType, loginInfo.UserID);
                    foreach (var bank in userBankInfos)
                    {
                        var bankInfo = new BankInformation();
                        bankInfo.BankName      = bank.BankName;
                        bankInfo.BankAccNumber = bank.AccountNumber;
                        model.BankInformation.Add(bankInfo);
                    }

                    //Get all landing accounts
                    var landingAccs = clientAccBo.GetAllLandingAccountForUser(loginInfo.LogAccountType, loginInfo.UserID);
                    foreach (var lAcc in landingAccs)
                    {
                        var lAccInfo = new LandingAccInformation();
                        lAccInfo.LCurrencyName = lCurrValueBO.GetCurrencySymbolFromCurrencyAccountCode(lAcc.LandingAccount.Split('-')[ruleInfo.CurrencyPosition - 1]);
                        lAccInfo.LAccNumber    = lAcc.LandingAccount;

                        lAccInfo.LAccBalance = Utility.FormatCurrencyValue((decimal)lAcc.CurrentBalance, "");

                        model.LandingAccInformation.Add(lAccInfo);
                    }

                    return(View(model));
                }
                else
                {
                    return(RedirectToAction("Login", "Account"));
                }
            }
            catch (Exception ex)
            {
                CurrentDeskLog.Error(ex.Message, ex);
                return(View("ErrorMessage"));
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// This actions returns FundSourceManagement view
        /// with required data
        /// </summary>
        /// <returns></returns>
        public ActionResult FundingSourceManagement()
        {
            try
            {
                if (SessionManagement.UserInfo != null)
                {
                    var model = new FundingSourceModel();
                    ViewData["ReceivingBankInfo"] = new SelectList(receivingBankInfoBO.GetReceivingBankInfo((int)SessionManagement.OrganizationID), "PK_RecievingBankID", "RecievingBankName");
                    ViewData["Country"]           = new SelectList(countryBO.GetCountries(), "PK_CountryID", "CountryName");
                    ViewData["Currency"]          = new SelectList(currencyBO.GetCurrencies(), "PK_CurrencyValueID", "CurrencyValue");
                    ViewData["SourceType"]        = new SelectList(ExtensionUtility.GetAllSourceTypes(), "ID", "Value");

                    return(View(model));
                }
                else
                {
                    return(RedirectToAction("Login", "Account", new { Area = "" }));
                }
            }
            catch (Exception ex)
            {
                CurrentDeskLog.Error(ex.Message, ex);
                return(View("ErrorMessage"));
            }
        }
        /// <summary>
        /// This action returns Index view to show list
        /// of agents under a particular IB
        /// </summary>
        /// <returns></returns>
        public ActionResult Index()
        {
            try
            {
                if (SessionManagement.UserInfo != null)
                {
                    ViewData["Country"]           = new SelectList(countryBO.GetCountries(), "PK_CountryID", "CountryName");
                    ViewData["ReceivingBankInfo"] = new SelectList(receivingBankInfoBO.GetReceivingBankInfo((int)SessionManagement.OrganizationID), "PK_RecievingBankID", "RecievingBankName");

                    return(View());
                }
                else
                {
                    return(RedirectToAction("Login", "Account", new { Area = "" }));
                }
            }
            catch (Exception ex)
            {
                CurrentDeskLog.Error(ex.Message, ex);
                return(View("ErrorMessage"));
            }
        }
 public List <L_Country> GetCountry()
 {
     countryBO = new L_CountryBO();
     return(countryBO.GetCountries());
 }