// GET: Class public ActionResult AddCLass() { ViewBag.ListGroups = GroupActions.listGroups(); ViewBag.ListTeachers = TeacherActions.listTeachers(); ViewBag.ListClasses = ClassActions.listClasses(); return(View()); }
// GET: Group public ActionResult AddGroup() { ViewBag.listParishes = ParishActions.listParishes(); ViewBag.listGroups = GroupActions.listGroups(); return(View()); }
public GroupMessage(GroupActions action, IReadWritableGroupEntity entity, List <JobCriteria> criteria, string message = null) { Action = action; Group = entity; Criteria = criteria; Message = message; GroupId = entity.Id; }
public GroupMessage(GroupActions action, IReadWritableGroupEntity entity, List <JobCriteria> criteria, List <int> processKeys) { Action = action; Group = entity; GroupId = entity.Id; Criteria = criteria; ProcessKeys = processKeys; IsProcessSubmission = true; }
public ActionResult EditClass(int id) { var classbyid = ClassActions.findClassByID(id); ViewBag.Class = classbyid; ViewBag.ListGroups = GroupActions.listGroups(); ViewBag.ListTeachers = TeacherActions.listTeachers(); return(View(classbyid)); }
[HttpDelete("{id}")] // AG.Groups-ic trvac id-ov groupy jnjum em public async Task <String> DeleteGroup(int id) { bool done = await GroupActions.DeleteGroup(id, done : false); if (!done) { return("not exists"); } else { return("deleted"); } }
public ServiceContiner() { TodoActions = new(); TimeActions = new(); GroupActions = new(); MemoryActions = new(); LocationActions = new(); AssistantActions = new(); AssistantActions.Ini(false); TimeActions.Ini(false); TodoActions.Ini(false); GroupActions.Ini(false); MemoryActions.Ini(false); LocationActions.Ini(false); }
[HttpPost] // post em anum trvac group-y AG.Groups-i mej public async Task <ActionResult <List <Group> > > PostGroup(Group group) { if (group.GroupName == null) { return(BadRequest()); } var done = await GroupActions.PostGroup(group, done : false); if (!done) { return(BadRequest()); } else { return(GroupActions.GetGroups()); } }
[HttpPut("{id}")] // Trvac id-ov group-i anunn em poxum,, //Questionneroi het gorc chunenq stex public async Task <ActionResult <List <Group> > > PutGroup(int id, Group group) { if (id <= 0 || group.GroupName == null) // NO FAQS { return(BadRequest()); } bool done = await GroupActions.PutGroup(id, group, done : false); if (!done) { return(BadRequest()); } else { return(AG.Groups); } }
public void TestDeletion() { var mockContext = new Mock <ConcertNotifierEntities1>(); var service = new GroupActions(mockContext.Object); var data = new List <tblGroups> { new tblGroups() { group_id = 111, group_name = "number1" }, new tblGroups() { group_id = 222, group_name = "number2" }, new tblGroups() { group_id = 333, group_name = "number3" }, }; int idToDelete = 111; mockContext .Setup(s => s.tblGroups.Find(idToDelete)) .Returns(data.Single(s => s.group_id == idToDelete)); var MockSet = new Mock <DbSet <tblGroups> >(); MockSet.Setup(c => c.Remove(It.IsAny <tblGroups>())).Callback <tblGroups>((entity) => data.Remove(entity)); MockSet.As <IQueryable <tblGroups> >().Setup(m => m.Provider).Returns(data.AsQueryable().Provider); MockSet.As <IQueryable <tblGroups> >().Setup(m => m.Expression).Returns(data.AsQueryable().Expression); MockSet.As <IQueryable <tblGroups> >().Setup(m => m.ElementType).Returns(data.AsQueryable().ElementType); MockSet.As <IQueryable <tblGroups> >().Setup(m => m.GetEnumerator()).Returns(data.AsQueryable().GetEnumerator()); mockContext.Setup(c => c.tblGroups).Returns(MockSet.Object); service.DeleteGroup(idToDelete); Assert.AreEqual(2, data.Count()); mockContext.Verify(m => m.SaveChanges(), Times.Once); }
public List <Group> GetGroups() { return(GroupActions.GetGroups()); }
public ActionResult EditGroup(int id) { ViewBag.listParishes = ParishActions.listParishes(); ViewBag.Group = GroupActions.findGroupByID(id); return(View()); }
public ActionResult AddGroup(string group_name, string note, int?parishid) { GroupActions.addGroup(group_name, note, parishid); return(RedirectToAction("AddGroup")); }
public ActionResult EditGroup(int id, string group_name, string note , int?parish_id) { GroupActions.editGroup(id, group_name, note, parish_id); return(RedirectToAction("AddGroup")); }
public ActionResult DeleteGroup(int id) { GroupActions.deleteGroup(id); return(RedirectToAction("AddGroup")); }
private void Form1_Load(object sender, EventArgs e) { var elements = new BasicElements(1); var formation = new RowsFormation(12, 5); Show baseProgram = new Show(Combination.Concatenate("Pflichtprogramm", elements.MoveForward("Vorwärts", formation, 24), elements.Wait("Halt im klingenden Spiel", formation, 8), elements.MoveForward("Vorwärts", formation, 16), elements.Schwenkung("Schwenkung", formation, toRight: true), elements.MoveForward("Vorwärts", formation, 8), //TODO add abfallen/aufmarschieren elements.GrosseWendeComplete("Große Wende", formation))); /*Show show = new Show(Combination.Concatenate("Show", * Combination.Parallel("", * trans.MoveForward("v", formation, 8), * trans.BreiteFormation("wide", formation)), * trans.Schwenkung("Schwenkung", formation, toRight: false), * trans.Schwenkung("Schwenkung", formation, toRight: true), * trans.BreiteFormation("wide", formation, sideMarginFactor: 0.5), * trans.Schwenkung("Schwenkung 2", formation, toRight: true), * trans.Schwenkung("Schwenkung 2", formation, toRight: true), * trans.Schwenkung("Schwenkung 2", formation, toRight: true), * trans.Schwenkung("Schwenkung 2", formation, toRight: true), * trans.Schwenkung("Schwenkung 2", formation, toRight: true), * trans.Schwenkung("Schwenkung 2", formation, toRight: true), * trans.Schwenkung("Schwenkung 2", formation, toRight: true), * trans.Schwenkung("Schwenkung 2", formation, toRight: true), * trans.Schwenkung("Schwenkung 2", formation, toRight: true), * trans.Schwenkung("Schwenkung 3", formation, toRight: true) * ));*/ Show show = new Show(elements.GrosseWendeComplete("Große Wende", formation)); Show rotTest = new Show(Combination.Concatenate("show", new Element { Name = "sfd", StartFormation = formation, GroupActions = new GroupAction[] { GroupActions.MoveForward(4), GroupActions.Rotate(90, delay: 4, duration: 2), GroupActions.MoveForward(4, delay: 6), GroupActions.Rotate(90, delay: 10, duration: 2), GroupActions.MoveForward(4, delay: 12), GroupActions.Rotate(90, delay: 16, duration: 2), GroupActions.MoveForward(4, delay: 18), GroupActions.Rotate(90, delay: 22, duration: 2), } }, new Element { Name = "sfd", StartFormation = formation, GroupActions = new GroupAction[] { GroupActions.MoveForward(4), GroupActions.Rotate(-90, delay: 4, duration: 2), GroupActions.MoveForward(4, delay: 6), GroupActions.Rotate(-90, delay: 10, duration: 2), GroupActions.MoveForward(4, delay: 12), GroupActions.Rotate(-90, delay: 16, duration: 2), GroupActions.MoveForward(4, delay: 18), GroupActions.Rotate(-90, delay: 22, duration: 2), } } )); var x = baseProgram.ToJSON(); var formationTypes = new List <Formation> { new BasicFormation(), new RowsFormation() }; Show s = Data.Show.FromJSON(x, formationTypes); simulator = new ShowSimulator(s); }
private async Task UpdateTerrain(SceneContext context, bool async, CancellationToken token) { GroupActions groupActions = null; IReadOnlyPooledDictionary <Vector2i, ITerrainMesh2i> results = null; try { Func <IReadOnlyPooledDictionary <Vector2i, ITerrainMesh2i> > computeAction = () => { using (context.ProfilerFactory.Create("Creating visible groups")) { groupActions = context.GroupSelector.GetGroupsToUpdate(context); } var toRecompute = groupActions?.ToRecompute ?? Enumerable.Empty <Vector2i>(); if (toRecompute.Any()) { using (context.ProfilerFactory.Create("TerrainMeshGenerator")) { return(context.TerrainGenerator.Generate(context, toRecompute)); } } else { return(null); } }; if (async) { results = await Task.Run(computeAction); } else { results = computeAction(); } if (token.IsCancellationRequested) { return; } if (results != null) { using (context.ProfilerFactory.Create("Applying mesh")) { var toKeep = groupActions?.ToKeep ?? Enumerable.Empty <Vector2i>(); context.MeshUpdater.UpdateMesh(context, results, toKeep); } } } catch (Exception ex) { Debug.LogException(ex); } finally { context?.Dispose(); groupActions?.Dispose(); results?.Dispose(); } }
[HttpGet("{search}")] // "search" -- filter em anum anunnerov public async Task <List <Group> > GetGroupsSearch(string search) { return(await GroupActions.GetGroupssSearch(search)); }