コード例 #1
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"));
            }
        }
コード例 #2
0
        /// <summary>
        /// This method returns source type value from ID
        /// </summary>
        /// <param name="sourceTypeID">sourceTypeID</param>
        /// <returns></returns>
        public string GetSourceTypeValueFromID(int sourceTypeID)
        {
            var allSourceTypes = ExtensionUtility.GetAllSourceTypes();

            foreach (var source in allSourceTypes)
            {
                if (source.ID == sourceTypeID)
                {
                    return(source.Value);
                }
            }

            return(String.Empty);
        }