Пример #1
0
 public void FireEmployee(MySqlConnection connection, Int64 employee_id, Int64 project_id)
 {
     Team_memberDAO.DeleteTeam_members(connection, new List <Team_member> ()
     {
         new Team_member(employee_id, project_id)
     });
 }
Пример #2
0
        public void Cancel(MySqlConnection connection)
        {
            List <Team_member> team_members = Team_memberDAO.GetTeam_members(connection);

            foreach (Team_member team_member in team_members)
            {
                if (team_member.Project_id != this.Id)
                {
                    team_members.Remove(team_member);
                }
            }
            Team_memberDAO.DeleteTeam_members(connection, team_members);

            this.State = 3;
            List <Project> projects = new List <Project> ();

            projects.Add(this);
            ProjectDAO.UpdateProjects(connection, projects);
        }