Exemplo n.º 1
0
        public SiteMonitoring Create(Action <SiteMonitoring> updateMethod, IEnumerable <HttpPostedFileBase> files, int?contractDetailID, string[] noteList)
        {
            var contractDetailRepository = new ContractDetailRepository()
            {
                DB = DB
            };

            var contractDetail = contractDetailRepository.Get(contractDetailID.Value);

            SiteMonitoring e = new SiteMonitoring();

            updateMethod(e);

            e.ContractDetail = contractDetail;

            Save();

            PicasaRepository picasaRepository = new PicasaRepository();

            picasaRepository.DB = DB;

            picasaRepository.UploadPhoto(e, files, noteList, false);

            Save();

            return(e);
        }
Exemplo n.º 2
0
        public SiteMonitoring Update(int ID, Action <SiteMonitoring> updateMethod, IEnumerable <HttpPostedFileBase> files, List <int> DeletePhotoList, IEnumerable <HttpPostedFileBase> filesOfFixed, string[] noteList, string[] noteOfFixedList)
        {
            SiteMonitoring e = Get(ID);

            updateMethod(e);

            Save();

            PicasaRepository picasaRepository = new PicasaRepository();

            picasaRepository.DB = DB;

            picasaRepository.UploadPhoto(e, files, noteList, false);
            picasaRepository.UploadPhoto(e, filesOfFixed, noteOfFixedList, false, true);

            DeletePhoto(DeletePhotoList);

            Save();

            return(e);
        }
Exemplo n.º 3
0
        public Site Add(Action<Site> updateMethod, IEnumerable<HttpPostedFileBase> files, string[] noteList)
        {
            Site e = new Site();
            updateMethod(e);

            UpdateFrontBackLit(e);
            UpdateGeo(e);
            //UpdateCategory(e);

            DB.Sites.AddObject(e);

            Save();

            PicasaRepository picasaRepository = new PicasaRepository();
            picasaRepository.DB = DB;

            picasaRepository.UploadPhoto(e, files, noteList);

            Save();

            return e;
        }
Exemplo n.º 4
0
        public SiteMonitoring Create(Action<SiteMonitoring> updateMethod, IEnumerable<HttpPostedFileBase> files, int? contractDetailID, string[] noteList)
        {
            var contractDetailRepository = new ContractDetailRepository() { DB = DB };

            var contractDetail = contractDetailRepository.Get(contractDetailID.Value);

            SiteMonitoring e = new SiteMonitoring();

            updateMethod(e);

            e.ContractDetail = contractDetail;

            Save();

            PicasaRepository picasaRepository = new PicasaRepository();
            picasaRepository.DB = DB;

            picasaRepository.UploadPhoto(e, files, noteList, false);

            Save();

            return e;
        }
Exemplo n.º 5
0
        public void Update(int ID, Action <Site> updateMethod, IEnumerable <HttpPostedFileBase> files, List <int> DeletePhotoList, string[] noteList)
        {
            Site e = Get(ID);

            updateMethod(e);

            UpdateGeo(e);
            //UpdateCategory(e);

            UpdateFrontBackLit(e);

            Save();


            PicasaRepository picasaRepository = new PicasaRepository();

            picasaRepository.DB = DB;

            picasaRepository.UploadPhoto(e, files, noteList);

            DeletePhoto(DeletePhotoList);

            Save();
        }
Exemplo n.º 6
0
        public Site Add(Action <Site> updateMethod, IEnumerable <HttpPostedFileBase> files, string[] noteList)
        {
            Site e = new Site();

            updateMethod(e);

            UpdateFrontBackLit(e);
            UpdateGeo(e);
            //UpdateCategory(e);

            DB.Sites.AddObject(e);

            Save();

            PicasaRepository picasaRepository = new PicasaRepository();

            picasaRepository.DB = DB;

            picasaRepository.UploadPhoto(e, files, noteList);

            Save();

            return(e);
        }
Exemplo n.º 7
0
        public void Update(int ID, Action<Site> updateMethod, IEnumerable<HttpPostedFileBase> files, List<int> DeletePhotoList, string[] noteList)
        {
            Site e = Get(ID);

            updateMethod(e);

            UpdateGeo(e);
            //UpdateCategory(e);

            UpdateFrontBackLit(e);

            Save();

            PicasaRepository picasaRepository = new PicasaRepository();
            picasaRepository.DB = DB;

            picasaRepository.UploadPhoto(e, files, noteList);

            DeletePhoto(DeletePhotoList);

            Save();
        }
Exemplo n.º 8
0
        public SiteMonitoring Update(int ID, Action<SiteMonitoring> updateMethod, IEnumerable<HttpPostedFileBase> files, List<int> DeletePhotoList, IEnumerable<HttpPostedFileBase> filesOfFixed, string[] noteList, string[] noteOfFixedList)
        {
            SiteMonitoring e = Get(ID);

            updateMethod(e);

            Save();

            PicasaRepository picasaRepository = new PicasaRepository();
            picasaRepository.DB = DB;

            picasaRepository.UploadPhoto(e, files, noteList, false);
            picasaRepository.UploadPhoto(e, filesOfFixed, noteOfFixedList, false, true);

            DeletePhoto(DeletePhotoList);

            Save();

            return e;
        }