public void AddSite(int contractID, int siteDetailID)
        {
            var siteDetailRepo = new SiteDetailRepository()
            {
                DB = DB
            };
            var siteDetail = siteDetailRepo.Get(siteDetailID);

            ContractDetail e = new ContractDetail();

            e.ContractID = contractID;
            e.SiteID     = siteDetail.SiteID;

            e.Format         = siteDetail.Format;
            e.Type           = siteDetail.Type;
            e.Height         = siteDetail.Height;
            e.Width          = siteDetail.Width;
            e.SiteDetailName = siteDetail.Name;

            DB.ContractDetails.AddObject(e);

            Save();

            ContractDetailRepository contractDetailRepository = new ContractDetailRepository();

            contractDetailRepository.CopyTimeline(e.ID);
        }
Beispiel #2
0
        public void AddSite(int contractID, int siteDetailID)
        {
            var siteDetailRepo = new SiteDetailRepository() { DB = DB };
            var siteDetail = siteDetailRepo.Get(siteDetailID);

            ContractDetail e = new ContractDetail();
            e.ContractID = contractID;
            e.SiteID = siteDetail.SiteID;

            e.Format = siteDetail.Format;
            e.SiteDetailName = siteDetail.Name;

            DB.ContractDetails.AddObject(e);

            Save();

            ContractDetailRepository contractDetailRepository = new ContractDetailRepository();
            contractDetailRepository.CopyTimeline(e.ID);
        }
Beispiel #3
0
        public void AddSite(int QuoteID, int siteDetailID)
        {
            var siteDetailRepo = new SiteDetailRepository()
            {
                DB = DB
            };
            var siteDetail = siteDetailRepo.Get(siteDetailID);

            QuoteDetail e = new QuoteDetail();

            e.QuoteID = QuoteID;
            e.SiteID  = siteDetail.SiteID;

            e.Format         = siteDetail.Format;
            e.Type           = siteDetail.Type;
            e.SiteDetailName = siteDetail.Name;

            DB.QuoteDetails.AddObject(e);

            Save();

            //QuoteDetailRepository quoteDetailRepository = new QuoteDetailRepository();
            //QuoteDetailRepository.CopyTimeline(e.ID);
        }