Beispiel #1
0
        public ActionResult saveGroup(int CID, int YID, string groupname)
        {
            var dataContext = new lb3dataDataContext();

            //gp
            LB3.Models.Group group = new LB3.Models.Group();
            group.GroupName = groupname;
            group.CourseID  = CID;
            group.YearID    = YID;

            dataRepository.Add(group);
            dataRepository.Save();

            var data = from c in dataContext.Groups
                       where c.CourseID == CID
                       where c.YearID == YID
                       //orderby u.Timestamp descending
                       select c;

            return(PartialView("GroupPartial", data));
        }
Beispiel #2
0
        public ActionResult saveGroup(int CID, int YID, string groupname)
        {
            var dataContext = new lb3dataDataContext();
            //gp
            LB3.Models.Group group = new LB3.Models.Group();
            group.GroupName = groupname;
            group.CourseID = CID;
            group.YearID = YID;

            dataRepository.Add(group);
            dataRepository.Save();

            var userList = (from u in dataContext.Users
                            orderby u.Name ascending

                            select new
                            {
                                name = u.Name,
                                id = u.UserID,

                            }).ToArray();

            var dd_items = "";

            dd_items = "<option>Select User</option>";

            foreach (var item in userList)
            {
                dd_items = dd_items + "<option value=" + item.id + ">" + item.name + "</option>";
            }

            ViewData["dd_vals"] = dd_items;

            ViewData["YID"] = YID;
            ViewData["courseID"] = CID;

            var data = from c in dataContext.Groups
                       where c.CourseID == CID
                       where c.YearID == YID
                       //orderby u.Timestamp descending
                       select c;

            return PartialView("GroupPartial", data);
        }
 partial void DeleteGroup(Group instance);
		private void detach_Groups(Group entity)
		{
			this.SendPropertyChanging();
			entity.Year = null;
		}
		private void attach_Groups(Group entity)
		{
			this.SendPropertyChanging();
			entity.Year = this;
		}
 partial void UpdateGroup(Group instance);
 partial void InsertGroup(Group instance);
Beispiel #8
0
 public void Add(LB3.Models.Group group)
 {
     db.Groups.InsertOnSubmit(group);
 }
Beispiel #9
0
        public ActionResult saveGroup(int CID, int YID, string groupname)
        {
            var dataContext = new lb3dataDataContext();
            //gp
            LB3.Models.Group group = new LB3.Models.Group();
            group.GroupName = groupname;
            group.CourseID = CID;
            group.YearID = YID;

            dataRepository.Add(group);
            dataRepository.Save();

            var data = from c in dataContext.Groups
                       where c.CourseID == CID
                       where c.YearID == YID
                       //orderby u.Timestamp descending
                       select c;

            return PartialView("GroupPartial", data);
        }