Пример #1
0
        public void Alert()
        {
            if (_res.IsNull())
            {
                return;
            }
            if (_res.HasErrors)
            {
                _uv.Html +=
                    $@"<div class=""container-fluid alert alert-danger""><button type=""button"" class=""close"" data-dismiss=""alert"" aria-label=""Close"">
                     <span aria-hidden=""true"">×</span> </button>
                    <h4 class=""text-danger""><i class=""fa fa-window-close""></i> رسالة خطأ</h4> <li>";
                foreach (var x in _res.Errors)
                {
                    _uv.Html += $"<i> {x} </i>";
                }
                _uv.Html += "</li></div>";
            }

            foreach (var x in _res.Alerts.Data())
            {
                _uv.Html +=
                    $@"<div class=""container-fluid alert alert-{x.Style}""> <i class=""ti-user""></i> {x.Message}
                             <button type=""button"" class=""close"" data-dismiss=""alert"" aria-label=""Close""> <span aria-hidden=""true"">×</span> </button></div>";
                _uv.Html += "</li></div>";
            }
        }