예제 #1
0
        /// <summary>
        /// updated the project
        /// </summary>
        public static bool UpdateProject(int minage, int projectStatus, string ProjectContent, int projectID, List <KeyValuePair <int, List <int> > > ProfessionList, int AdminID, int AdminProfession)
        {
            //if (ProjectDB.CheckProfessionPositionAtpos(projectID, AdminID, AdminProfession))
            //{
            //    int AdminCurrProf = returnProjAdminProf(projectID, AdminID);

            //}
            int  Positionsuccess = 0;
            bool Programssuccess = true;

            if (ProfessionList.Count > 0)
            {
                Positionsuccess = ProjectDB.InsertProjPositions(projectID, ProfessionList);
                Programssuccess = ProjectDB.InsertPositionPrograms(projectID, ProfessionList, Positionsuccess);
            }
            bool updateproject = ProjectDB.UpdateProject(minage, projectStatus, ProjectContent, projectID);

            if (!ProjectDB.CheckProfessionPositionAtpos(projectID, AdminID, AdminProfession))
            {
                ProjectDB.UpdatePageAdminPos(AdminID, AdminProfession, projectID);
            }
            return(Positionsuccess != -1 && Programssuccess && updateproject);
        }