Ejemplo n.º 1
0
        public async Task <IActionResult> Index()
        {
            AboutWelcome          aboutWelcome = _db.AboutWelcomes.FirstOrDefault();
            ICollection <Teacher> teachers     = await _db.Teachers.Include(t => t.TeacherContact).Take(4).ToListAsync();

            AboutSlider aboutSlider = await _db.AboutSliders.FirstOrDefaultAsync();

            AboutVideo aboutVideo = await _db.AboutVideos.FirstOrDefaultAsync();

            ICollection <AboutNotice> aboutNotices = await _db.AboutNotices.Take(6).ToListAsync();

            Bio bio = await _db.Bios.FirstOrDefaultAsync();

            AboutVM aboutVM = new AboutVM()
            {
                AboutWelcome = aboutWelcome,
                Teachers     = teachers,
                Bio          = bio,
                AboutSlider  = aboutSlider,
                AboutVideo   = aboutVideo,
                AboutNotices = aboutNotices
            };

            return(View(aboutVM));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SettingsWindow"/> class
        /// with the settings viewmodel.
        /// </summary>
        /// <param name="vm">The settings window viewmodel.</param>
        /// <param name="audioBandVM">The audioband view model</param>
        /// <param name="albumArtPopupVM">The album art popup view model</param>
        /// <param name="albumArtVM">The album art view model</param>
        /// <param name="customLabelsVM">The custom labels view model</param>
        /// <param name="aboutVm">The about dialog view model</param>
        /// <param name="nextButtonVM">The next button view model</param>
        /// <param name="playPauseButtonVM">The play/pause button view model</param>
        /// <param name="previousButtonVM">The previous button view model</param>
        /// <param name="progressBarVM">The progress bar view model</param>
        public SettingsWindow(
            SettingsWindowVM vm,
            AudioBandVM audioBandVM,
            AlbumArtPopupVM albumArtPopupVM,
            AlbumArtVM albumArtVM,
            CustomLabelsVM customLabelsVM,
            AboutVM aboutVm,
            NextButtonVM nextButtonVM,
            PlayPauseButtonVM playPauseButtonVM,
            PreviousButtonVM previousButtonVM,
            ProgressBarVM progressBarVM)
        {
            AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
            ElementHost.EnableModelessKeyboardInterop(this);

            CancelCloseCommand = new RelayCommand(CancelCloseCommandOnExecute);
            SaveCloseCommand   = new RelayCommand(SaveCloseCommandOnExecute);

            AudioBandVM       = audioBandVM;
            AlbumArtPopupVM   = albumArtPopupVM;
            AlbumArtVM        = albumArtVM;
            CustomLabelsVM    = customLabelsVM;
            AboutVM           = aboutVm;
            NextButtonVM      = nextButtonVM;
            PlayPauseButtonVM = playPauseButtonVM;
            PreviousButtonVM  = previousButtonVM;
            ProgressBarVM     = progressBarVM;

            InitializeComponent();
            DataContext = vm;
            _vm         = vm;

            Activated += OnActivated;
        }
Ejemplo n.º 3
0
        // GET: About
        public ActionResult Index()
        {
            AboutVM page = new AboutVM();

            page.About   = Manager.AboutManager.GetAbout();
            page.Authors = Manager.AuthorManager.GetAllLambda(x => x.IsDelete == false && x.IsActive == true).OrderByDescending(x => x.CreatedDate).Take(3).ToList();
            return(View(page));
        }
        //QUESTIONS CRUD

        public IActionResult Question()
        {
            AboutVM aboutVM = new AboutVM
            {
                faqCollapses = _db.FaqCollapses
            };

            return(View(aboutVM));
        }
 public JsonResult About(AboutVM model)
 {
     if (ModelState.IsValid)
     {
         var message = staticDataService.UpdateAbout(model);
         return(Json(message));
     }
     return(Json(false));
 }
        ///TEAM CRUD

        public IActionResult Team()
        {
            AboutVM aboutVM = new AboutVM
            {
                teams = _db.Teams,
            };

            return(View(aboutVM));
        }
Ejemplo n.º 7
0
        public IActionResult Index()
        {
            AboutVM aboutVM = new AboutVM
            {
                AboutCompanies = _db.AboutCompanies,
                AboutCompany   = _db.AboutCompanies.FirstOrDefault()
            };

            return(View(aboutVM));
        }
Ejemplo n.º 8
0
        public IActionResult About()
        {
            var model = new AboutVM
            {
                Brands  = UnitOfWork.Brands.Random(),
                Product = UnitOfWork.StoredProcedures.GetItemsInfo(1, saleItems: true).FirstOrDefault()
            };

            return(View(model));
        }
Ejemplo n.º 9
0
        public IActionResult About()
        {
            AboutVM about = new AboutVM();

            about.LowerTitle   = "Strong Tea, Strong Roots";
            about.UpperTitle   = "About Our Cafe";
            about.Description1 = "Founded in 1986 by the Hernandez brothers, our establishment has been serving up rich coffee sourced from artisan farmers in various regions of South and Central America. We are dedicated to travelling the world, finding the best coffee, and bringing back to you here in our cafe.";
            about.Description2 = "We guarantee that you will fall in lust with our decadent blends the moment you walk inside until you finish your last sip. Join us for your daily routine, an outing with friends, or simply just to enjoy some alone time.";

            return(View(about));
        }
Ejemplo n.º 10
0
        public IActionResult Index()
        {
            AboutVM aboutVM = new AboutVM
            {
                About       = _db.Abouts.FirstOrDefault(),
                Testimonial = _db.Testimonial.FirstOrDefault(),
                NoticeBoard = _db.NoticeBoards.ToList(),
                VideoTour   = _db.VideoTour.FirstOrDefault()
            };

            return(View(aboutVM));
        }
Ejemplo n.º 11
0
        public IActionResult Index()
        {
            AboutVM aboutVM = new AboutVM
            {
                FitnessDetail = _db.FitnessDetails.Where(fd => fd.IsDeleted == false).FirstOrDefault(),
                About         = _db.Abouts.Where(a => a.IsDeleted == false).FirstOrDefault(),
                Success       = _db.Successes.Where(s => s.IsDeleted == false).FirstOrDefault(),
                SuccessDetail = _db.SuccessDetails.Where(sd => sd.IsDeleted == false).FirstOrDefault()
            };

            return(View(aboutVM));
        }
Ejemplo n.º 12
0
        public IActionResult Index()
        {
            AboutVM about = new AboutVM
            {
                teams        = _db.Teams,
                faqCollapses = _db.FaqCollapses,
                mainAbout    = _db.MainAbouts.First(b => b.Id == 1),
                aboutInfo    = _db.AboutInfos.First(a => a.Id == 1)
            };

            return(View(about));
        }
        public IActionResult Index()
        {
            AboutVM aboutVM = new AboutVM
            {
                AboutIntro   = _context.AboutIntros.FirstOrDefault(),
                Teachers     = _context.Teachers.Where(t => t.IsDeleted == false).Include(t => t.TeacherBios).ToList(),
                Testimonials = _context.Testimonials.FirstOrDefault(),
                AboutVideo   = _context.AboutVideos.FirstOrDefault(),
                NoticeBoards = _context.NoticeBoards.Where(nb => nb.IsDeleted == false).ToList(),
            };

            return(View(aboutVM));
        }
Ejemplo n.º 14
0
        public IActionResult Index()
        {
            AboutVM model = new AboutVM()
            {
                Background   = _db.Backgrounds.FirstOrDefault(),
                About        = _db.About.FirstOrDefault(),
                Testimonials = _db.Testimonials,
                Video        = _db.NoticeVideos.FirstOrDefault(),
                NoticeBoards = _db.NoticeBoards
            };

            return(View(model));
        }
Ejemplo n.º 15
0
        public IActionResult Index()
        {
            AboutVM aboutVM = new AboutVM
            {
                WelcomeToEdus  = _db.WelcomeToEdus.Where(we => we.IsDeleted == false).ToList(),
                AboutCarousels = _db.AboutCarousels.Where(ab => ab.IsDeleted == false).ToList(),
                AboutNotices   = _db.AboutNotices.Where(an => an.IsDeleted == false).ToList(),
                AboutVideos    = _db.AboutVideos.Where(av => av.IsDeleted == false).ToList(),
                Teachers       = _db.Teachers.Take(4).Where(t => t.IsDeleted == false).ToList()
            };

            return(View(aboutVM));
        }
        //public ActionResult ContactUs()
        //{
        //    AppInfo contactUs = _context.AppInfo
        //        .Where(a => a.Name == "Contact Us")
        //        .FirstOrDefault();

        //    return View(contactUs);
        //}

        //[HttpPost]
        //public ActionResult ContactUs(IFormCollection collection)
        //{
        //    AppInfo contactUs = _context.AppInfo
        //        .Where(a => a.Name == "Contact Us")
        //        .FirstOrDefault();

        //    contactUs.Content = collection["Content"];
        //    contactUs.ContentAR = collection["ContentAR"];

        //    _context.Update(contactUs);
        //    _context.SaveChanges();

        //    return RedirectToAction("Index", "Home");
        //}

        public ActionResult AboutApplication()
        {
            AboutVM aboutVM = new AboutVM();

            aboutVM.AppInfo = _context.AppInfo
                              .Where(a => a.Name == "About Application")
                              .FirstOrDefault();

            aboutVM.SocialMediaAccounts = _context.SocialMediaAccounts
                                          .Where(s => s.AppInfo.Name == "About Application")
                                          .ToList();

            return(View(aboutVM));
        }
Ejemplo n.º 17
0
        public AboutView()
        {
            InitializeComponent();
            vm = new AboutVM();
            this.DataContext = vm;

            vm.GetData();
            txtItem.Text = vm.ItemDatatitle;

            description.Text = vm.ItemDatadescription;


            quote.Text = vm.quote + vm.quoteAuthor;
        }
Ejemplo n.º 18
0
        public IActionResult Index()
        {
            AboutVM aboutVM = new AboutVM
            {
                Background    = _db.Backgrounds.FirstOrDefault(),
                AboutUs       = _db.AboutUs.FirstOrDefault(),
                Teachers      = _db.Teachers.Take(4),
                AboutTeachers = _db.AboutTeachers,
                Testimonials  = _db.Testimonials,
                NoticeVideo   = _db.NoticeVideos.FirstOrDefault(),
                NoticeBoards  = _db.NoticeBoards.OrderByDescending(p => p.Id)
            };

            return(View(aboutVM));
        }
Ejemplo n.º 19
0
        public IActionResult Index(int?id)
        {
            TempData["controllerName"] = this.ControllerContext.RouteData.Values["controller"].ToString();

            AboutVM aboutVM = new AboutVM {
                WelcomeToEduHome = _context.WelcomeToEduHomes.Where(wte => wte.IsDeleted == false).FirstOrDefault(),
                OurTeachers      = _context.OurTeachers.Where(t => t.IsDeleted == false).Take(4).ToList(),

                Students       = _context.Students.Where(stu => stu.IsDeleted == false).ToList(),
                NoticeBoards   = _context.NoticeBoards.Where(stu => stu.IsDeleted == false).ToList(),
                TakeAVideoTour = _context.TakeAVideoTours.Where(stu => stu.IsDeleted == false).FirstOrDefault()
            };

            return(View(aboutVM));
        }
Ejemplo n.º 20
0
        public IActionResult About()
        {
            List <AboutVM> abouts    = new List <AboutVM>();
            var            aboutList = aboutService.GetAbouts().ToList();

            foreach (var item in aboutList)
            {
                AboutVM about = new AboutVM();
                about.ID          = item.Id;
                about.Title       = item.Title;
                about.Description = item.Description;
                abouts.Add(about);
            }
            return(View(abouts));
        }
Ejemplo n.º 21
0
        public IActionResult About()
        {
            AboutVM about = new AboutVM();
            var     abt   = aboutService.GetAbouts().FirstOrDefault();

            if (abt != null)
            {
                about.Title       = abt.Title;
                about.Description = abt.Description;
                return(View(about));
            }
            else
            {
                return(View(about));
            }
        }
Ejemplo n.º 22
0
        public AboutVM GetAbout(int?id)
        {
            using (var db = new ProjectWebEntities())
            {
                var info  = db.Tbl_AboutUs.Find(1);
                var model = new AboutVM();
                var intro = id > 0 ? db.Tbl_Introduce.FirstOrDefault(p => p.Id == id) : db.Tbl_Introduce.FirstOrDefault(p => p.IsHome);
                model.Introduces = intro ?? db.Tbl_Introduce.FirstOrDefault(p => p.IsDisable);

                model.ListIntroduces = db.Tbl_Introduce.Where(p => p.IsDisable == false).ToList();
                model.Address        = info.Address;
                model.Email          = info.Email;
                model.Phone          = info.Phone;
                model.ListBanner     = db.Tbl_BannerDetail.Where(p => p.TypeId == GlobalVariables.Introduce).OrderBy(p => p.Sequence).ToList();
                return(model);
            }
        }
Ejemplo n.º 23
0
        public AboutPage()
        {
            InitializeComponent();

            BindingContext = new AboutVM();

            var source = new HtmlWebViewSource {
                Html = this.GetFlaticonHTML()
            };

            Flaticon.Source      = source;
            Flaticon.Navigating += Flaticon_Navigating;

            if (!App.HasMasterDetailPage)
            {
                NavigationPage.SetHasNavigationBar(this, false);
            }
        }
Ejemplo n.º 24
0
        public ActionResult AddAbout(IFormCollection form)
        {
            AboutVM about = JsonConvert.DeserializeObject <AboutVM>(form["aboutInfo"]);

            try
            {
                About data = new About();
                data.Title       = about.Title;
                data.Description = about.Description;
                data.AddDate     = DateTime.Now;
                data.Status      = 1;
                aboutService.InsertAbout(data);
                return(Json(new { success = true }));
            }
            catch (Exception ex)
            {
                return(Json(new { success = false }));
            }
        }
Ejemplo n.º 25
0
        public MessageVM UpdateAbout(AboutVM about)
        {
            var message = new MessageVM
            {
                Title       = "აბოუთის shecva",
                Description = "warmatebiT sheicvala",
                Success     = true,
            };

            var aboutTitle       = InsertStaticData("AboutTitle", about.Title);
            var aboutDescription = InsertStaticData("AboutDescription", about.Description);

            if (!aboutTitle && !aboutDescription)
            {
                message.Description = "dafiqsirda shecdoma";
                message.Success     = false;
            }

            return(message);
        }
Ejemplo n.º 26
0
        public async Task <IActionResult> Index()
        {
            var     rqf     = Request.HttpContext.Features.Get <IRequestCultureFeature>();
            var     culture = rqf.RequestCulture.Culture;
            AboutVM model   = new AboutVM {
                Breadcrumb = new Breadcrumb
                {
                    Path = new Dictionary <string, string> {
                        { "Home", Url.Action("Index", "Home") },
                        { "About Us", null }
                    },
                    Page = Page.About
                },
                AboutSettingTranslate = await _db.AboutSettingTranslates.Include("AboutSetting").FirstOrDefaultAsync(a => a.Language.LanguageCode == culture.ToString()),
                WhatDoTranslates      = await _db.WhatDosTranslates.Include("WhatDo").Where(w => w.Language.LanguageCode == culture.ToString() && w.WhatDo.Status == true).OrderByDescending(w => w.WhatDo.ModifiedAt).Take(2).ToListAsync(),
                OurServiceTranslates  = await _db.OurServiceTranslates.Include("OurService").Where(o => o.Language.LanguageCode == culture.ToString() && o.OurService.Status == true).OrderBy(o => o.OurService.Order).Take(3).ToListAsync(),
                AdminManagers         = await _db.AdminManagers.Include("Category.AdminCategoryTranslates").Where(w => w.Status == true).ToListAsync()
            };

            return(View(model));
        }
 private void Help_OnClick(object sender, RoutedEventArgs e)
 {
     DataContext = new AboutVM();
 }
 private void About_MouseDoubleClick(object sender, MouseButtonEventArgs e)
 {
     DataContext = new AboutVM();
 }
Ejemplo n.º 29
0
 public AboutVW()
 {
     InitializeComponent();
     BindingContext = new AboutVM();
 }
Ejemplo n.º 30
0
        public async Task <IActionResult> About(int?id)
        {
            var currentUser = await _userManager.GetUserAsync(User);

            Profile currentProfile = null;
            int     currentId      = 0;
            int     profileId      = 0;

            if (_signInManager.IsSignedIn(User))
            {
                currentProfile = db.Profile.FirstOrDefault(p => p.UsersId == currentUser.Id);
                currentId      = currentProfile.id;
            }

            if (id == null)
            {
                if (_signInManager.IsSignedIn(User))
                {
                    profileId = currentId;
                }
                else
                {
                    return(RedirectToAction("Index", "Home"));
                }
            }
            else
            {
                profileId = (int)id;
            }

            var profile = db.Profile.FirstOrDefault(p => p.id == profileId);
            var user    = db.Users.FirstOrDefault(u => u.Id == profile.UsersId);

            if (_signInManager.IsSignedIn(User))
            {
                var block = db.Blocklist.FirstOrDefault(b => b.blockedId == user.Id && b.blockerId == currentUser.Id || b.blockerId == user.Id && b.blockedId == currentUser.Id);

                if (block != null)
                {
                    return(RedirectToAction("Index", "Home"));
                }
            }

            if (currentUser == null)
            {
                profile.View = profile.View + 1;
                await db.SaveChangesAsync();
            }
            else if (_signInManager.IsSignedIn(User) && user.Id != currentUser.Id)
            {
                profile.View = profile.View + 1;
                await db.SaveChangesAsync();
            }


            if (profile.Disabled && profile.UsersId != currentUser.Id)
            {
                return(RedirectToAction("Index", "Home"));
            }
            if (currentProfile != null && currentProfile.Disabled)
            {
                return(RedirectToAction("Ban", "Home", new { profile.id }));
            }

            var usersActs = db.SocialAct.Where(s => s.UsersId == profile.UsersId).ToList();

            usersActs.Reverse();
            // Get profile Cover information
            bool isfolowing = false;

            if (currentUser != null)
            {
                var folow = db.Follow.FirstOrDefault(f => f.folowerId == currentProfile.id && f.folowingId == profile.id);
                if (folow != null)
                {
                    isfolowing = true;
                }
            }

            var coverClass = new CoverClass()
            {
                Profile    = profile,
                User       = db.Users.FirstOrDefault(u => u.Id == profile.UsersId),
                folowings  = db.Follow.Where(f => f.folowerId == profile.id).Count(),
                folowers   = db.Follow.Where(f => f.folowingId == profile.id).Count(),
                views      = profile.View,
                isFolowing = isfolowing
            };

            // preparing model
            var model = new AboutVM()
            {
                CoverClass   = coverClass,
                SosialActs   = usersActs,
                Universities = db.University.Where(u => u.UserId == profile.UsersId).ToList()
            };

            bool isAjaxCall = Request.Headers["x-requested-with"] == "XMLHttpRequest";

            if (isAjaxCall)
            {
                return(PartialView("_About", model));
            }
            else
            {
                return(View(model));
            }
        }