コード例 #1
0
        public DSS5_SupplyChainFinancialsOptimisation.BO.ProofOfDelivery Convert()
        {
            var model = new DSS5_SupplyChainFinancialsOptimisation.BO.ProofOfDelivery();

            if (_key != null && _key.ToString() != "0")
            {
                var rawKey    = _key.ToString();
                var parsedKey = int.Parse(rawKey);
                model = new DAL.Repository().GetById <DSS5_SupplyChainFinancialsOptimisation.BO.ProofOfDelivery>(parsedKey, false) ?? model;
            }
            if (!DTOHelper.SeenModelInstances.ContainsKey(this))
            {
                DTOHelper.SeenModelInstances.Add(this, model);
            }
            model.Id          = Id ?? 0;
            model.Transaction = Transaction == null
                                ? null
                                : DTOHelper.GetModelFromDTO <DSS5_SupplyChainFinancialsOptimisation.BO.Transaction>(Transaction);
            model.PODNumber      = PODNumber;
            model.DateIssued     = DateIssued;
            model.QualityStatus  = QualityStatus;
            model.QuantityStatus = QuantityStatus;
            model.DeliveryStatus = DeliveryStatus;
            DTOHelper.UpdateSeenModelInstances(this, model);
            return(model);
        }
コード例 #2
0
        public DSS5_SupplyChainFinancialsOptimisation.BO.Order Convert()
        {
            var model = new DSS5_SupplyChainFinancialsOptimisation.BO.Order();

            if (_key != null && _key.ToString() != "0")
            {
                var rawKey    = _key.ToString();
                var parsedKey = int.Parse(rawKey);
                model = new DAL.Repository().GetById <DSS5_SupplyChainFinancialsOptimisation.BO.Order>(parsedKey, false) ?? model;
            }
            if (!DTOHelper.SeenModelInstances.ContainsKey(this))
            {
                DTOHelper.SeenModelInstances.Add(this, model);
            }
            model.Id          = Id ?? 0;
            model.Transaction = Transaction == null
                                ? null
                                : DTOHelper.GetModelFromDTO <DSS5_SupplyChainFinancialsOptimisation.BO.Transaction>(Transaction);
            model.OrderNumber  = OrderNumber;
            model.DateOfOrder  = DateOfOrder;
            model.PaymentTerms = PaymentTerms;
            model.OrderAmount  = OrderAmount;
            model.TotalPrice   = TotalPrice;
            model.DeliveryTo   = DeliveryTo;
            DTOHelper.UpdateSeenModelInstances(this, model);
            return(model);
        }
コード例 #3
0
        public DSS5_SupplyChainFinancialsOptimisation.BO.Invoice Convert()
        {
            var model = new DSS5_SupplyChainFinancialsOptimisation.BO.Invoice();

            if (_key != null && _key.ToString() != "0")
            {
                var rawKey    = _key.ToString();
                var parsedKey = int.Parse(rawKey);
                model = new DAL.Repository().GetById <DSS5_SupplyChainFinancialsOptimisation.BO.Invoice>(parsedKey, false) ?? model;
            }
            if (!DTOHelper.SeenModelInstances.ContainsKey(this))
            {
                DTOHelper.SeenModelInstances.Add(this, model);
            }
            model.Id          = Id ?? 0;
            model.Transaction = Transaction == null
                                ? null
                                : DTOHelper.GetModelFromDTO <DSS5_SupplyChainFinancialsOptimisation.BO.Transaction>(Transaction);
            model.InvoiceNumber = InvoiceNumber;
            model.Description   = Description;
            model.DateIssued    = DateIssued;
            model.TotalPrice    = TotalPrice;
            DTOHelper.UpdateSeenModelInstances(this, model);
            return(model);
        }
コード例 #4
0
        public DSS1_RetailerDriverStockOptimisation.BO.OrderForecastDetails Convert()
        {
            var model = new DSS1_RetailerDriverStockOptimisation.BO.OrderForecastDetails();

            if (_key != null && _key.ToString() != "0")
            {
                var rawKey    = _key.ToString();
                var parsedKey = int.Parse(rawKey);
                model = new DAL.Repository().GetById <DSS1_RetailerDriverStockOptimisation.BO.OrderForecastDetails>(parsedKey, false) ?? model;
            }
            if (!DTOHelper.SeenModelInstances.ContainsKey(this))
            {
                DTOHelper.SeenModelInstances.Add(this, model);
            }
            model.Id            = Id ?? 0;
            model.OrderForecast = OrderForecast == null
                                  ? null
                                  : DTOHelper.GetModelFromDTO <DSS1_RetailerDriverStockOptimisation.BO.OrderForecast>(OrderForecast);
            model.Item = Item == null
                         ? null
                         : DTOHelper.GetModelFromDTO <DSS1_RetailerDriverStockOptimisation.BO.Item>(Item);
            model.Warehouse = Warehouse == null
                              ? null
                              : DTOHelper.GetModelFromDTO <DSS1_RetailerDriverStockOptimisation.BO.Warehouse>(Warehouse);
            model.Quantity             = Quantity;
            model.RecommendedOrderDate = RecommendedOrderDate;
            model.SalesForecastDate    = SalesForecastDate;
            DTOHelper.UpdateSeenModelInstances(this, model);
            return(model);
        }
コード例 #5
0
        public new DSS5_SupplyChainFinancialsOptimisation.BO.Supplier Convert()
        {
            var model = new DSS5_SupplyChainFinancialsOptimisation.BO.Supplier();

            if (_key != null && _key.ToString() != "")
            {
                var rawKey    = _key.ToString();
                var parsedKey = (rawKey);
                model = new DAL.Repository().GetById <DSS5_SupplyChainFinancialsOptimisation.BO.Supplier>(parsedKey, false) ?? model;
            }
            if (!DTOHelper.SeenModelInstances.ContainsKey(this))
            {
                DTOHelper.SeenModelInstances.Add(this, model);
            }
            model.UserName = UserName ?? "";
            model.Company  = Company;
            model.Email    = Email;
            model.Business = Business;
            model.SupplierContactInformation = SupplierContactInformation == null
                                               ? null
                                               : DTOHelper.GetModelFromDTO <DSS5_SupplyChainFinancialsOptimisation.BO.SupplierContactInformation>(SupplierContactInformation);
            model.SupplierStatus = SupplierStatus;
            DTOHelper.UpdateSeenModelInstances(this, model);
            return(model);
        }
コード例 #6
0
        public DSS5_SupplyChainFinancialsOptimisation.BO.Agreement Convert()
        {
            var model = new DSS5_SupplyChainFinancialsOptimisation.BO.Agreement();

            if (_key != null && _key.ToString() != "0")
            {
                var rawKey    = _key.ToString();
                var parsedKey = int.Parse(rawKey);
                model = new DAL.Repository().GetById <DSS5_SupplyChainFinancialsOptimisation.BO.Agreement>(parsedKey, false) ?? model;
            }
            if (!DTOHelper.SeenModelInstances.ContainsKey(this))
            {
                DTOHelper.SeenModelInstances.Add(this, model);
            }
            model.Id       = Id ?? 0;
            model.Supplier = Supplier == null
                             ? null
                             : DTOHelper.GetModelFromDTO <DSS5_SupplyChainFinancialsOptimisation.BO.Supplier>(Supplier);
            model.Investor = Investor == null
                             ? null
                             : DTOHelper.GetModelFromDTO <DSS5_SupplyChainFinancialsOptimisation.BO.Investor>(Investor);
            model.StartDate              = StartDate;
            model.EndDate                = EndDate;
            model.FundedRate             = FundedRate;
            model.CurrentAgreementStatus = CurrentAgreementStatus;
            DTOHelper.UpdateSeenModelInstances(this, model);
            return(model);
        }
コード例 #7
0
        public DSS5_SupplyChainFinancialsOptimisation.BO.CommercialAgreement Convert()
        {
            var model = new DSS5_SupplyChainFinancialsOptimisation.BO.CommercialAgreement();

            if (_key != null && _key.ToString() != "0")
            {
                var rawKey    = _key.ToString();
                var parsedKey = int.Parse(rawKey);
                model = new DAL.Repository().GetById <DSS5_SupplyChainFinancialsOptimisation.BO.CommercialAgreement>(parsedKey, false) ?? model;
            }
            if (!DTOHelper.SeenModelInstances.ContainsKey(this))
            {
                DTOHelper.SeenModelInstances.Add(this, model);
            }
            model.Id       = Id ?? 0;
            model.Supplier = Supplier == null
                             ? null
                             : DTOHelper.GetModelFromDTO <DSS5_SupplyChainFinancialsOptimisation.BO.Supplier>(Supplier);
            model.ImportedBuyer = ImportedBuyer == null
                                  ? null
                                  : DTOHelper.GetModelFromDTO <DSS5_SupplyChainFinancialsOptimisation.BO.ImportedBuyer>(ImportedBuyer);
            model.PaymentTerms = PaymentTerms;
            DTOHelper.UpdateSeenModelInstances(this, model);
            return(model);
        }
        public DSS5_SupplyChainFinancialsOptimisation.BO.Transaction Convert()
        {
            var model = new DSS5_SupplyChainFinancialsOptimisation.BO.Transaction();

            if (_key != null && _key.ToString() != "0")
            {
                var rawKey    = _key.ToString();
                var parsedKey = int.Parse(rawKey);
                model = new DAL.Repository().GetById <DSS5_SupplyChainFinancialsOptimisation.BO.Transaction>(parsedKey, false) ?? model;
            }
            if (!DTOHelper.SeenModelInstances.ContainsKey(this))
            {
                DTOHelper.SeenModelInstances.Add(this, model);
            }
            model.Id       = Id ?? 0;
            model.Supplier = Supplier == null
                             ? null
                             : DTOHelper.GetModelFromDTO <DSS5_SupplyChainFinancialsOptimisation.BO.Supplier>(Supplier);
            model.ImportedBuyer = ImportedBuyer == null
                                  ? null
                                  : DTOHelper.GetModelFromDTO <DSS5_SupplyChainFinancialsOptimisation.BO.ImportedBuyer>(ImportedBuyer);
            model.TransactionDateOccured = TransactionDateOccured;
            model.TransactionValue       = TransactionValue;
            model.TransactionStatus      = TransactionStatus == null
                                      ? null
                                      : DTOHelper.GetModelFromDTO <DSS5_SupplyChainFinancialsOptimisation.BO.TransactionStatus>(TransactionStatus);
            DTOHelper.UpdateSeenModelInstances(this, model);
            return(model);
        }
        public DSS5_SupplyChainFinancialsOptimisation.BO.SupplierStatistic Convert()
        {
            var model = new DSS5_SupplyChainFinancialsOptimisation.BO.SupplierStatistic();

            if (_key != null && _key.ToString() != "0")
            {
                var rawKey    = _key.ToString();
                var parsedKey = int.Parse(rawKey);
                model = new DAL.Repository().GetById <DSS5_SupplyChainFinancialsOptimisation.BO.SupplierStatistic>(parsedKey, false) ?? model;
            }
            if (!DTOHelper.SeenModelInstances.ContainsKey(this))
            {
                DTOHelper.SeenModelInstances.Add(this, model);
            }
            model.Id       = Id ?? 0;
            model.Supplier = Supplier == null
                             ? null
                             : DTOHelper.GetModelFromDTO <DSS5_SupplyChainFinancialsOptimisation.BO.Supplier>(Supplier);
            model.OnTimeDeliveries    = OnTimeDeliveries;
            model.AsOrderedDeliveries = AsOrderedDeliveries;
            model.InFullDeliveries    = InFullDeliveries;
            model.TotalImpeachments   = TotalImpeachments;
            DTOHelper.UpdateSeenModelInstances(this, model);
            return(model);
        }
        public DSS1_RetailerDriverStockOptimisation.BO.Agreement Convert()
        {
            var model = new DSS1_RetailerDriverStockOptimisation.BO.Agreement();

            if (_key != null && _key.ToString() != "0")
            {
                var rawKey    = _key.ToString();
                var parsedKey = int.Parse(rawKey);
                model = new DAL.Repository().GetById <DSS1_RetailerDriverStockOptimisation.BO.Agreement>(parsedKey, false) ?? model;
            }
            if (!DTOHelper.SeenModelInstances.ContainsKey(this))
            {
                DTOHelper.SeenModelInstances.Add(this, model);
            }
            model.Id       = Id ?? 0;
            model.Supplier = Supplier == null
                             ? null
                             : DTOHelper.GetModelFromDTO <DSS1_RetailerDriverStockOptimisation.BO.Supplier>(Supplier);
            model.DateCreated = DateCreated;
            DTOHelper.UpdateSeenModelInstances(this, model);
            return(model);
        }
        public DSS5_SupplyChainFinancialsOptimisation.BO.SupplierStatistic Convert()
        {
            var model = new DSS5_SupplyChainFinancialsOptimisation.BO.SupplierStatistic();

            if (_key != null && _key.ToString() != "0")
            {
                var rawKey    = _key.ToString();
                var parsedKey = int.Parse(rawKey);
                model = new DAL.Repository().GetById <DSS5_SupplyChainFinancialsOptimisation.BO.SupplierStatistic>(parsedKey, false) ?? model;
            }
            if (!DTOHelper.SeenModelInstances.ContainsKey(this))
            {
                DTOHelper.SeenModelInstances.Add(this, model);
            }
            model.Id       = Id ?? 0;
            model.Supplier = Supplier == null
                             ? null
                             : DTOHelper.GetModelFromDTO <DSS5_SupplyChainFinancialsOptimisation.BO.Supplier>(Supplier);
            model.DataAvailability = DataAvailability;
            DTOHelper.UpdateSeenModelInstances(this, model);
            return(model);
        }