void LoadRelatedInfo(bool paymentGateway = false, LangType langType = LangType.Fa_En)
        {
            if (paymentGateway)
            {
                ViewBag.PaymentGatewaies = _paymentGatewayBusiness.GetAll(true);
            }

            ViewBag.Setting = _settingBusiness.Get();

            ViewBag.OfficeAddress = _officeAddressBusiness.Get(langType);
            #region GetLangType

            var list = new List <ItemTextValueModel <string, string> >();
            EnumExtension.FilterEnumWithAttributeOf <LangType, VisibleAttribute>().ForEach(item =>
            {
                list.Add(new ItemTextValueModel <string, string>()
                {
                    Key = item.GetLocalizeDescription(), Value = item.GetDisplayName()
                });
            });

            ViewBag.LangTypes = list.Select(s => new SelectListItem
            {
                Text     = s.Key,
                Value    = s.Value.ToString(),
                Selected = s.Value == "1"
            }).ToList();
            #endregion
        }
Пример #2
0
        public virtual ActionResult Manage()
        {
            var response = new ActionResponse <Setting>();
            var result   = _settingBusiness.Get();

            response.IsSuccessful = result.IsNotNull();
            response.Message      = response.IsSuccessful ? string.Empty : LocalMessage.RecordsNotFound;
            response.Result       = result;
            return(View(response));
        }
Пример #3
0
        public ActionResult Index()
        {
            Setting setting = _settingBusiness.Get();

            return(View(setting));
        }