コード例 #1
0
        public static async Task <ProjectsViewModel> GetDataProjects(WebAtSolutionContext webContext)
        {
            ProjectsViewModel model = new ProjectsViewModel();

            model.listProj      = webContext.Project.ToList();
            model.listProjType  = webContext.ProjectType.ToList();
            model.listProjImage = webContext.ProjectImage.ToList();
            return(model);
        }
コード例 #2
0
        public static async Task <HomeViewModel> GetDataSetting(WebAtSolutionContext webContext)
        {
            HomeViewModel model = new HomeViewModel();

            model.listSetting     = webContext.Setting.ToList();
            model.listimg         = webContext.ImageSlide.ToList();
            model.listsetingtitle = webContext.SettingType.ToList();
            return(model);
        }
コード例 #3
0
        public IActionResult Index()
        {
            WebAtSolutionContext      _webcontext = new WebAtSolutionContext();
            OperationHistoryViewModel model       = new OperationHistoryViewModel();

            model.listOperation = _webcontext.OperationHistory.OrderBy(p => p.CreateDate).ToList();
            model.listPeople    = _webcontext.People.ToList();
            model.about         = _webcontext.AboutUs.Single();
            return(View(model));
        }
コード例 #4
0
        public IActionResult Index(string id)
        {
            WebAtSolutionContext     _webcontext = new WebAtSolutionContext();
            PortfolioSingleViewModel model       = new PortfolioSingleViewModel();

            model.proj         = _webcontext.Project.SingleOrDefault(u => u.Id == id);
            model.listproj     = _webcontext.Project.ToList();
            model.listprojType = _webcontext.ProjectType.ToList();
            return(View(model));
        }
コード例 #5
0
        public static async Task <ServicesViewModel> GetDataServices(WebAtSolutionContext webContext)
        {
            ServicesViewModel model = new ServicesViewModel();

            model.listService = webContext.Service
                                .OrderByDescending(p => p.CreatedDate)
                                .ToList();;
            model.listProj     = webContext.Project.ToList();
            model.listProjType = webContext.ProjectType.ToList();
            return(model);
        }
コード例 #6
0
        public static async Task <HomeViewModel> GetDataBlog(WebAtSolutionContext webContext)
        {
            HomeViewModel model = new HomeViewModel();

            model.listBlog = webContext.News
                             .OrderByDescending(p => p.CreatedDate)
                             .ToList();
            model.listBlogT = webContext.NewsType.ToList();

            return(model);
        }
コード例 #7
0
        public IActionResult Index(string id, string type)
        {
            WebAtSolutionContext _webcontext = new WebAtSolutionContext();
            HomeViewModel        model       = new HomeViewModel();

            model.BlogT     = _webcontext.NewsType.SingleOrDefault(p => p.Id == type);
            model.Blog      = _webcontext.News.SingleOrDefault(p => p.Id == id);
            model.listBlog  = _webcontext.News.ToList();
            model.listBlogT = _webcontext.NewsType.ToList();
            return(View(model));
        }
コード例 #8
0
        public IActionResult Index(string id)
        {
            WebAtSolutionContext _webcontext = new WebAtSolutionContext();
            ServicesViewModel    model       = new ServicesViewModel();

            model.service     = _webcontext.Service.SingleOrDefault(p => p.Id == id && p.RowStatus != 1);
            model.listService = _webcontext.Service
                                .OrderByDescending(p => p.CreatedDate)
                                .ToList();
            return(View(model));
        }
コード例 #9
0
        public IActionResult Index()
        {
            WebAtSolutionContext _webcontext = new WebAtSolutionContext();
            HomeViewModel        model       = new HomeViewModel();

            model.listProj = _webcontext.Project.ToList();
            model.listBlog = _webcontext.News
                             .OrderByDescending(p => p.CreatedDate)
                             .ToList();
            model.listservice  = _webcontext.Service.ToList();
            model.imageProject = _webcontext.ProjectImage.ToList();
            return(View(model));
        }
コード例 #10
0
        public static async Task <MenuViewModel> GetDataMenu(WebAtSolutionContext webContext)
        {
            MenuViewModel model = new MenuViewModel();

            model.listMenu = await webContext.Menu.ToListAsync();

            model.listService = await webContext.Service.ToListAsync();

            model.listContact = await webContext.Contact.Where(p => p.Id == "CT001").ToListAsync();

            model.listPartner = await webContext.AboutCustomer.ToListAsync();

            model.listNewType = await webContext.NewsType.ToListAsync();

            return(model);
        }
コード例 #11
0
 public RoleController(WebAtSolutionContext context)
 {
     _context = context;
 }
コード例 #12
0
 public GsControllerBase(WebAtSolutionContext webContext)
 {
     _webContext = webContext;
 }
コード例 #13
0
 public GrantRightsController(WebAtSolutionContext context)
 {
     _context = context;
 }
コード例 #14
0
 public NewsTypesController(WebAtSolutionContext context)
 {
     _webcontext = context;
 }
コード例 #15
0
 public SettingController(WebAtSolutionContext context)
 {
     _context = context;
 }
コード例 #16
0
 public AboutUsController(WebAtSolutionContext context)
 {
     _context = context;
 }
コード例 #17
0
 public ImageSlidesController(WebAtSolutionContext context)
 {
     _context = context;
 }
コード例 #18
0
 public NewsController(WebAtSolutionContext context)
 {
     _context = context;
 }
コード例 #19
0
 public FAQController(WebAtSolutionContext webContext) : base(webContext)
 {
 }
コード例 #20
0
 public BaseAdminController(WebAtSolutionContext atSolutionContext)
 {
     AtSolutionContext = atSolutionContext;
 }
コード例 #21
0
 public ContactsController(WebAtSolutionContext context)
 {
     _context = context;
 }
コード例 #22
0
 public ContactController(WebAtSolutionContext webContext) : base(webContext)
 {
 }
コード例 #23
0
 public ProjectTypeController(WebAtSolutionContext context)
 {
     _context = context;
 }
コード例 #24
0
 public ServiceController(WebAtSolutionContext context)
 {
     _context = context;
 }