コード例 #1
0
        public async Task UpdateEvent(int EventId, string name, DateTime begDate, DateTime endDate)
        {
            await _controller.ExecuteAsync("update IPR.tEventSchool set BegDate=@BegDate, EndDate=@EndDate where EventId=@Id"
                                           , new { BegDate = begDate, EndDate = endDate, Id = EventId });

            await _controller.ExecuteAsync("update CK.tGroup set GroupName = @Name where GroupId = @Id"
                                           , new { Name = name, Id = EventId });
        }
コード例 #2
0
        public async Task <List <int> > SavePlan(Project[] plan)
        {
            List <int> results = new List <int>();

            for (int i = 0; i < plan.Length; i += 1)
            {
                int res = await _controller.ExecuteAsync(
                    "update IPR.tForumInfos " +
                    "set ClassRoom = @Class," +
                    "CoordinatesX = @X," +
                    "CoordinatesY = @Y," +
                    "Width = @W," +
                    "Height = @H " +
                    "where ForumNumber = @ForumNumber",
                    new {
                    Class       = plan[i].ClassRoom,
                    X           = plan[i].PosX,
                    Y           = plan[i].PosY,
                    W           = plan[i].Width,
                    H           = plan[i].Height,
                    ForumNumber = plan[i].ForumNumber
                }
                    );

                results.Add(res);
            }
            return(results);
        }
コード例 #3
0
 public async Task UpdatePeriodDate(int periodID, DateTime begDate, DateTime endDate)
 {
     await _controller.ExecuteAsync("UPDATE IPR.tTimePeriod set BegDate=@BegDate, EndDate=@EndDate where TimePeriodId=@TimePeriodId ", new { BegDate = begDate, EndDate = endDate, TimePeriodId = periodID });
 }