// GET: Technology
        public ActionResult Index()
        {
            tabledbEntities entities        = new tabledbEntities();
            var             technolgyResult = entities.technolgies.ToList();

            return(View(technolgyResult));
        }
Exemplo n.º 2
0
        // GET: Country
        public ActionResult Index()
        {
            tabledbEntities entities      = new tabledbEntities();
            var             countryResult = entities.countries.ToList();

            return(View(countryResult));
        }
Exemplo n.º 3
0
        public ActionResult Details(int id)
        {
            tabledbEntities entities   = new tabledbEntities();
            backend         backendObj = entities.backends.First(x => x.backendid == id);

            return(View(backendObj));
        }
Exemplo n.º 4
0
        public ActionResult Details(int id)
        {
            tabledbEntities entities   = new tabledbEntities();
            country         countryObj = entities.countries.First(x => x.countryid == id);

            return(View(countryObj));
        }
Exemplo n.º 5
0
        // GET: Latestvideo
        public ActionResult Index()
        {
            tabledbEntities entities  = new tabledbEntities();
            var             videoList = entities.videos.ToList();

            return(View(videoList));
        }
        public ActionResult Details(int id)
        {
            tabledbEntities entities     = new tabledbEntities();
            technolgy       technolgyObj = entities.technolgies.First(x => x.technologyid == id);

            return(View(technolgyObj));
        }
Exemplo n.º 7
0
        public ActionResult Details(int id)
        {
            tabledbEntities entities = new tabledbEntities();
            User            userObj  = entities.Users.First(x => x.UsersID == id);

            return(View(userObj));
        }
Exemplo n.º 8
0
        public ActionResult Index()
        {
            tabledbEntities entities      = new tabledbEntities();
            var             backendResult = entities.backends.ToList();

            return(View(backendResult));
        }
Exemplo n.º 9
0
        public ActionResult Details(int id)
        {
            tabledbEntities entities    = new tabledbEntities();
            frontend        frontendObj = entities.frontends.First(x => x.frontendid == id);

            return(View(frontendObj));
        }
Exemplo n.º 10
0
        // GET: Project
        public ActionResult Index()
        {
            int             userid   = Convert.ToInt32(Session["userid"]);
            tabledbEntities entities = new tabledbEntities();
            List <ProjectWithFrontEndBackEnd> ProjectObjList = new List <ProjectWithFrontEndBackEnd>();

            var projectlst = entities.Projects
                             .Join(entities.frontends, p => p.FrontendId, f => f.frontendid,
                                   (p, f) => new { p.Name,
                                                   p.Description, p.Projectfile, f.frontendname, p.ProjectID, p })
                             .Join(entities.backends, p => p.p.BackendId, b => b.backendid,
                                   (p, b) => new { p, b.backendname }).Where(o => o.p.p.UserId == userid).ToList();


            foreach (var proj in projectlst)
            {
                ProjectWithFrontEndBackEnd prj = new ProjectWithFrontEndBackEnd();
                prj.ProjectName        = proj.p.Name;
                prj.ProjectId          = proj.p.ProjectID;
                prj.ProjectDescription = proj.p.Description;
                prj.ProjectFile        = proj.p.Projectfile;
                prj.FrontEndName       = proj.p.frontendname;
                prj.BackEndName        = proj.backendname;

                ProjectObjList.Add(prj);
            }

            return(View(ProjectObjList));
        }
Exemplo n.º 11
0
        public ActionResult Edit(int id)
        {
            tabledbEntities entities = new tabledbEntities();
            User            userObj  = entities.Users.Where(x => x.UsersID == id).FirstOrDefault();

            return(View(userObj));
        }
Exemplo n.º 12
0
        public ActionResult create(country countryObj)
        {
            tabledbEntities entities = new tabledbEntities();

            entities.countries.Add(countryObj);
            entities.SaveChanges();
            return(RedirectToAction("index"));
        }
Exemplo n.º 13
0
        public ActionResult Create()
        {
            tabledbEntities entities = new tabledbEntities();

            ViewBag.Technology = entities.technolgies.ToList();

            return(View());
        }
Exemplo n.º 14
0
        public ActionResult Edit(frontend frontendObj)
        {
            tabledbEntities entities = new tabledbEntities();

            entities.Entry(frontendObj).State = System.Data.Entity.EntityState.Modified;
            entities.SaveChanges();
            return(RedirectToAction("index"));
        }
Exemplo n.º 15
0
        public ActionResult create(frontend frontendObj)
        {
            tabledbEntities entities = new tabledbEntities();

            entities.frontends.Add(frontendObj);
            entities.SaveChanges();
            return(RedirectToAction("index"));
        }
Exemplo n.º 16
0
        public ActionResult delete(country countryObj)
        {
            tabledbEntities entities = new tabledbEntities();

            entities.Entry(countryObj).State = System.Data.Entity.EntityState.Deleted;
            entities.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 17
0
        public ActionResult Delete(backend backendObj)
        {
            tabledbEntities entities = new tabledbEntities();

            entities.Entry(backendObj).State = EntityState.Deleted;
            entities.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 18
0
        public ActionResult create(technolgy technolgyObj)
        {
            tabledbEntities entities = new tabledbEntities();

            entities.technolgies.Add(technolgyObj);
            entities.SaveChanges();
            return(RedirectToAction("index"));
        }
Exemplo n.º 19
0
        public ActionResult Index()
        {
            tabledbEntities entities = new tabledbEntities();
            var             userList = entities.Users.ToList();

            ViewBag.TotalUsers = entities.Users.Count();
            return(View(userList));
        }
Exemplo n.º 20
0
        public ActionResult Create()
        {
            tabledbEntities entities = new tabledbEntities();

            //List<SelectListItem> frontend =
            ViewBag.FrontEnd = entities.frontends.ToList();
            ViewBag.BackEnd  = entities.backends.ToList();
            return(View());
        }
Exemplo n.º 21
0
        // GET: Video
        public ActionResult Index()
        {
            int             userid    = Convert.ToInt32(Session["userid"]);
            tabledbEntities entities  = new tabledbEntities();
            var             videolist = entities.videos.Join
                                            (entities.technolgies, r => r.technologyid, p => p.technologyid, (r, p)
                                            => new VideoWithTechnology {
                video = r, technolgy = p
            }).Where(t => t.video.userid == userid);

            return(View(videolist.ToList()));
        }
Exemplo n.º 22
0
        public ActionResult Create(video videoss, HttpPostedFileBase uploadfile)
        {
            tabledbEntities entities = new tabledbEntities();

            if (uploadfile != null)
            {
                string file = Guid.NewGuid().ToString().Substring(0, 6) + uploadfile.FileName;
                uploadfile.SaveAs(Server.MapPath("~/UploadedImages/") + file);
                videoss.uploadfile = file;
            }
            videoss.userid = Convert.ToInt32(Session["userid"]);

            entities.Entry(videoss).State = System.Data.Entity.EntityState.Added;
            entities.SaveChanges();
            return(RedirectToAction("Create"));
        }
Exemplo n.º 23
0
        public ActionResult Create(Project project, HttpPostedFileBase projectFile)
        {
            tabledbEntities entities = new tabledbEntities();

            if (projectFile != null)
            {
                string file = Guid.NewGuid().ToString().Substring(0, 6) + projectFile.FileName;
                projectFile.SaveAs(Server.MapPath("~/UploadedImages/") + file);
                project.Projectfile = file;
            }

            project.UserId = Convert.ToInt32(Session["userid"]);

            entities.Entry(project).State = System.Data.Entity.EntityState.Added;
            entities.SaveChanges();
            return(RedirectToAction("Create"));
        }