Esempio n. 1
0
        public static MovieTypeDO Save(int movieID, string objectName, int userID)
        {
            var objList = TypeBL.GetAllDO( ).Where(q => q.Name == objectName).ToList( );

            TypeDO obj;

            if (objList != null && objList.Count > 0)
            {
                obj = objList[0];
            }
            else
            {
                obj = TypeBL.Save(new TypeDO( )
                {
                    Name = objectName
                }, userID);
            }

            MOV_M_Type objectToAdd = new MOV_M_Type( );

            objectToAdd.MovieID = movieID;
            objectToAdd.TypeID  = obj.ID;

            return(Save(objectToAdd, userID));
        }
Esempio n. 2
0
        private static void InitializeThread( )
        {
            int waitTime = 3;

            Thread.Sleep(500);
            MovieBL.GetAll();

            Thread.Sleep(waitTime);
            ActorBL.GetAll();

            Thread.Sleep(waitTime);
            DirectorBL.GetAll();

            Thread.Sleep(waitTime);
            WriterBL.GetAll();

            Thread.Sleep(waitTime);
            LanguageBL.GetAll();

            Thread.Sleep(waitTime);
            ArchiveBL.GetAll();

            Thread.Sleep(waitTime);
            TypeBL.GetAll();

            Thread.Sleep(waitTime);
            MovieActorBL.GetAll( );
            MovieActorBL.GetAllDO( );

            Thread.Sleep(waitTime);
            MovieUserArchiveBL.GetAll();
            MovieUserArchiveBL.GetAllDO();

            Thread.Sleep(waitTime);
            MovieDirectorBL.GetAll( );
            MovieDirectorBL.GetAllDO( );

            Thread.Sleep(waitTime);
            MovieLanguageBL.GetAll();
            MovieLanguageBL.GetAllDO();

            Thread.Sleep(waitTime);
            MovieNameBL.GetAll();
            MovieNameBL.GetAllAsDO();

            Thread.Sleep(waitTime);
            MovieTypeBL.GetAll();
            MovieTypeBL.GetAllDO();

            Thread.Sleep(waitTime);
            MovieWriterBL.GetAll();
            MovieWriterBL.GetAllDO();

            Thread.Sleep(waitTime);
            MovieUserRatingBL.GetAll();
        }