Exemplo n.º 1
0
        public List<ActivityModel> RecallDelegatedActivity(ActivityModel da)
        {
            aimsDbIatiDAL.RecallDelegatedActivity(da);

            var das = aimsDbIatiDAL.GetDelegatedActivities(Sessions.DP.ID);
            das.ForEach(f => f.AssignedOrgName = Sessions.FundSources?.Find(k => k.IATICode == f.AssignedOrgId)?.Name);
            return das;
        }
Exemplo n.º 2
0
        public int RecallDelegatedActivity(ActivityModel activity)
        {
            var a = dbContext.Activities.FirstOrDefault(x => x.IatiIdentifier == activity.IatiIdentifier);
            if (a != null)
            {
                a.AssignedOrgId = a.OrgId;
                a.AssignedDate = DateTime.Now;
            }

            return dbContext.SaveChanges();
        }