Ejemplo n.º 1
0
        public void AddPicture(Model.Models.Unit unit, int uploaderid, string photoPath, int rank)
        {
            var unitgallery = new UnitGallery
            {
                Path = photoPath,
                Caption = "",
                Rank = rank,
                Unit = unit
            };

            if (!ModelState.IsValid) return;
            UnitofWork.UnitGalleryRepository.Add(unitgallery);
            UnitofWork.Save();
        }
        public UnitGallery SecondUnitGallery()
        {
            var secondUnitGallery = new UnitGallery {

                 UnitGalleryId = new Int32()
            ,
                 Path = null,
                 Caption = null,
                 Rank = new Int32()
            ,
                 UnitId = new Int32()
            ,
                 Unit = new Unit()

             };

            return secondUnitGallery;
        }
        public UnitGallery FirstUnitGallery()
        {
            var firstUnitGallery = new UnitGallery {

                 UnitGalleryId = new Int32()
            ,
                 Path = null,
                 Caption = null,
                 Rank = new Int32()
            ,
                 UnitId = new Int32()
            ,
                 Unit = new Unit()

             };

            return firstUnitGallery;
        }
        public UnitGallery ThirdUnitGallery()
        {
            var thirdUnitGallery = new UnitGallery {

                 UnitGalleryId = new Int32()
            ,
                 Path = null,
                 Caption = null,
                 Rank = new Int32()
            ,
                 UnitId = new Int32()
            ,
                 Unit = new Unit()

             };

            return thirdUnitGallery;
        }