示例#1
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);
        }
        public static AgreementDataSet_CompanyDTO GetInstance(object key, string jbID)
        {
            if (key == null)
            {
                return(null);
            }
            var rawKey     = key.ToString();
            var parsedKey  = int.Parse(rawKey);
            var foundEntry = new DAL.Repository().GetById <DSS1_RetailerDriverStockOptimisation.BO.Company>(parsedKey, false);

            if (foundEntry == null && !string.IsNullOrWhiteSpace(jbID))
            {
                if (int.TryParse(rawKey, out int _uniqueKey))
                {
                    var controller = new AgreementListController();
                    var method     = controller.GetType().GetMethod($"Get_{jbID}_DatasourceQueryable");
                    var records    = method.Invoke(controller, new object[] { null }) as IQueryable <DSS1_RetailerDriverStockOptimisation.BO.Company>;
                    foundEntry = records.Where(c => c._GetUniqueIdentifier() == _uniqueKey).FirstOrDefault();
                }
            }
            if (foundEntry != null)
            {
                return(new AgreementDataSet_CompanyDTO(foundEntry));
            }
            return(null);
        }
示例#3
0
 public static bool Guardar(Entidades.Facturas Facturag, List <Entidades.FacturasProductos> listaRelaciones)
 {
     using (var repositorio = new DAL.Repository <Entidades.Facturas>())
     {
         bool FacuraGuardada;
         bool relacionesGuardadas = false;
         if (Buscar(P => P.FacturaId == Facturag.FacturaId) == null)
         {
             FacuraGuardada = repositorio.Guardar(Facturag);
         }
         else
         {
             FacuraGuardada = repositorio.Modificar(Facturag);
         }
         if (FacuraGuardada)
         {
             relacionesGuardadas = true;
             if (listaRelaciones != null)
             {
                 foreach (var relacion in listaRelaciones)
                 {
                     relacion.FacturaId = Facturag.FacturaId;
                     if (!BLL.FacturasProductosBLL.Guardar(relacion))
                     {
                         relacionesGuardadas = false;
                     }
                 }
             }
         }
         return(relacionesGuardadas);
     }
 }
示例#4
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);
        }
        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);
        }
示例#6
0
        public new static ProofOfDeliveryDataSet_SupplierDTO GetInstance(object key, string jbID)
        {
            if (key == null)
            {
                return(null);
            }
            var rawKey     = key.ToString();
            var parsedKey  = (rawKey);
            var foundEntry = new DAL.Repository().GetById <DSS5_SupplyChainFinancialsOptimisation.BO.Supplier>(parsedKey, false);

            if (foundEntry == null && !string.IsNullOrWhiteSpace(jbID))
            {
                if (int.TryParse(rawKey, out int _uniqueKey))
                {
                    var controller = new AdminProofOfDeliveryListController();
                    var method     = controller.GetType().GetMethod($"Get_{jbID}_DatasourceQueryable");
                    var records    = method.Invoke(controller, new object[] { null }) as IQueryable <DSS5_SupplyChainFinancialsOptimisation.BO.Supplier>;
                    foundEntry = records.Where(c => c._GetUniqueIdentifier() == _uniqueKey).FirstOrDefault();
                }
            }
            if (foundEntry != null)
            {
                return(new ProofOfDeliveryDataSet_SupplierDTO(foundEntry));
            }
            return(null);
        }
示例#7
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);
        }
示例#8
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);
        }
示例#9
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);
        }
示例#10
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);
        }
        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);
        }
示例#12
0
        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.TransactionDateOccured = TransactionDateOccured;
            model.TransactionValue       = TransactionValue;
            model.FundedAmount           = FundedAmount;
            model.ToBePaidAmount         = ToBePaidAmount;
            model.PaymentStatus          = PaymentStatus;
            model.PaymentDate            = PaymentDate;
            model.RestPaymentAmount      = RestPaymentAmount;
            DTOHelper.UpdateSeenModelInstances(this, model);
            return(model);
        }
示例#13
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);
        }
        public static CalendarSet_ApplicationUserDTO GetInstance(object key, string jbID)
        {
            if (key == null)
            {
                return(null);
            }
            var rawKey     = key.ToString();
            var parsedKey  = (rawKey);
            var foundEntry = new DAL.Repository().GetById <zAppDev.DotNet.Framework.Identity.Model.ApplicationUser>(parsedKey, false);

            if (foundEntry == null && !string.IsNullOrWhiteSpace(jbID))
            {
                if (int.TryParse(rawKey, out int _uniqueKey))
                {
                    var controller = new ThemePreviewController();
                    var method     = controller.GetType().GetMethod($"Get_{jbID}_DatasourceQueryable");
                    var records    = method.Invoke(controller, new object[] { null }) as IQueryable <zAppDev.DotNet.Framework.Identity.Model.ApplicationUser>;
                    foundEntry = records.Where(c => c._GetUniqueIdentifier() == _uniqueKey).FirstOrDefault();
                }
            }
            if (foundEntry != null)
            {
                return(new CalendarSet_ApplicationUserDTO(foundEntry));
            }
            return(null);
        }
示例#15
0
 public static Entidades.Retenciones Buscar(Expression <Func <Entidades.Retenciones, bool> > criterio)
 {
     using (var conec = new DAL.Repository <Entidades.Retenciones>())
     {
         try
         {
             return(conec.Buscar(criterio));
         }
         catch (Exception)
         {
             throw;
         }
     }
 }
 public static List <Entidades.EmpleadosEmails> GetList(Expression <Func <Entidades.EmpleadosEmails, bool> > criterio)
 {
     using (var conec = new DAL.Repository <Entidades.EmpleadosEmails>())
     {
         try
         {
             return(conec.GetList(criterio));
         }
         catch (Exception)
         {
             throw;
         }
     }
 }
 public static List <Entidades.EmpleadosEmails> GetListAll()
 {
     using (var conec = new DAL.Repository <Entidades.EmpleadosEmails>())
     {
         try
         {
             return(conec.GetListAll());
         }
         catch (Exception)
         {
             throw;
         }
     }
 }
示例#18
0
        public static Investor_Investor_AnnualTransactionVolumes_AnnualTransactionVolumeDTO GetInstance(object key, string jbID)
        {
            if (key == null)
            {
                return(null);
            }
            var rawKey     = key.ToString();
            var parsedKey  = int.Parse(rawKey);
            var foundEntry = new DAL.Repository().GetById <DSS5_SupplyChainFinancialsOptimisation.BO.AnnualTransactionVolume>(parsedKey, true);

            if (foundEntry != null)
            {
                return(new Investor_Investor_AnnualTransactionVolumes_AnnualTransactionVolumeDTO(foundEntry));
            }
            return(null);
        }
示例#19
0
        public static bool Modificar(Entidades.Retenciones retencion)
        {
            using (var conec = new DAL.Repository <Entidades.Retenciones>())
            {
                try
                {
                    return(conec.Modificar(retencion));
                }
                catch (Exception)
                {
                    throw;
                }
            }

            return(false);
        }
示例#20
0
        public static Warehouse_WarehouseDTO GetInstance(object key, string jbID)
        {
            if (key == null)
            {
                return(null);
            }
            var rawKey     = key.ToString();
            var parsedKey  = int.Parse(rawKey);
            var foundEntry = new DAL.Repository().GetById <DSS1_RetailerDriverStockOptimisation.BO.Warehouse>(parsedKey, true);

            if (foundEntry != null)
            {
                return(new Warehouse_WarehouseDTO(foundEntry));
            }
            return(null);
        }
示例#21
0
        public static ApplicationOperation_ApplicationOperation_Permissions_ApplicationPermissionDTO GetInstance(object key, string jbID)
        {
            if (key == null)
            {
                return(null);
            }
            var rawKey     = key.ToString();
            var parsedKey  = int.Parse(rawKey);
            var foundEntry = new DAL.Repository().GetById <zAppDev.DotNet.Framework.Identity.Model.ApplicationPermission>(parsedKey, true);

            if (foundEntry != null)
            {
                return(new ApplicationOperation_ApplicationOperation_Permissions_ApplicationPermissionDTO(foundEntry));
            }
            return(null);
        }
示例#22
0
        public static LetterOfCredit_LetterOfCredit_Transaction_Transaction_ImportedBuyer_ImportedBuyerDTO GetInstance(object key, string jbID)
        {
            if (key == null)
            {
                return(null);
            }
            var rawKey     = key.ToString();
            var parsedKey  = int.Parse(rawKey);
            var foundEntry = new DAL.Repository().GetById <DSS5_SupplyChainFinancialsOptimisation.BO.ImportedBuyer>(parsedKey, true);

            if (foundEntry != null)
            {
                return(new LetterOfCredit_LetterOfCredit_Transaction_Transaction_ImportedBuyer_ImportedBuyerDTO(foundEntry));
            }
            return(null);
        }
        public static CustomsClearingDocumentation_CustomsClearingDocumentation_Transaction_TransactionDTO GetInstance(object key, string jbID)
        {
            if (key == null)
            {
                return(null);
            }
            var rawKey     = key.ToString();
            var parsedKey  = int.Parse(rawKey);
            var foundEntry = new DAL.Repository().GetById <DSS5_SupplyChainFinancialsOptimisation.BO.Transaction>(parsedKey, true);

            if (foundEntry != null)
            {
                return(new CustomsClearingDocumentation_CustomsClearingDocumentation_Transaction_TransactionDTO(foundEntry));
            }
            return(null);
        }
        public static Supplier_SupplierDTO GetInstance(object key, string jbID)
        {
            if (key == null)
            {
                return(null);
            }
            var rawKey     = key.ToString();
            var parsedKey  = (rawKey);
            var foundEntry = new DAL.Repository().GetById <DSS5_SupplyChainFinancialsOptimisation.BO.Supplier>(parsedKey, true);

            if (foundEntry != null)
            {
                return(new Supplier_SupplierDTO(foundEntry));
            }
            return(null);
        }
        public static bool Modificar(Entidades.EmpleadosEmails email)
        {
            using (var conec = new DAL.Repository <Entidades.EmpleadosEmails>())
            {
                try
                {
                    return(conec.Modificar(email));
                }
                catch (Exception)
                {
                    throw;
                }
            }

            return(false);
        }
示例#26
0
        public static CommercialAgreement_CommercialAgreement_Supplier_Supplier_SupplierExtraInformation_SupplierExtraInformationDTO GetInstance(object key, string jbID)
        {
            if (key == null)
            {
                return(null);
            }
            var rawKey     = key.ToString();
            var parsedKey  = int.Parse(rawKey);
            var foundEntry = new DAL.Repository().GetById <DSS5_SupplyChainFinancialsOptimisation.BO.SupplierExtraInformation>(parsedKey, true);

            if (foundEntry != null)
            {
                return(new CommercialAgreement_CommercialAgreement_Supplier_Supplier_SupplierExtraInformation_SupplierExtraInformationDTO(foundEntry));
            }
            return(null);
        }
        public static Users_ApplicationUserDTO GetInstance(object key, string jbID)
        {
            if (key == null)
            {
                return(null);
            }
            var rawKey     = key.ToString();
            var parsedKey  = (rawKey);
            var foundEntry = new DAL.Repository().GetById <zAppDev.DotNet.Framework.Identity.Model.ApplicationUser>(parsedKey, true);

            if (foundEntry != null)
            {
                return(new Users_ApplicationUserDTO(foundEntry));
            }
            return(null);
        }
        public static ProofOfDelivery_ProofOfDelivery_Transaction_Transaction_CommercialAgreement_CommercialAgreement_ImportedBuyer_ImportedBuyerDTO GetInstance(object key, string jbID)
        {
            if (key == null)
            {
                return(null);
            }
            var rawKey     = key.ToString();
            var parsedKey  = int.Parse(rawKey);
            var foundEntry = new DAL.Repository().GetById <DSS5_SupplyChainFinancialsOptimisation.BO.ImportedBuyer>(parsedKey, true);

            if (foundEntry != null)
            {
                return(new ProofOfDelivery_ProofOfDelivery_Transaction_Transaction_CommercialAgreement_CommercialAgreement_ImportedBuyer_ImportedBuyerDTO(foundEntry));
            }
            return(null);
        }
示例#29
0
        public static Agreements_Agreement_Items_ItemDTO GetInstance(object key, string jbID)
        {
            if (key == null)
            {
                return(null);
            }
            var rawKey     = key.ToString();
            var parsedKey  = (rawKey);
            var foundEntry = new DAL.Repository().GetById <DSS1_RetailerDriverStockOptimisation.BO.Item>(parsedKey, true);

            if (foundEntry != null)
            {
                return(new Agreements_Agreement_Items_ItemDTO(foundEntry));
            }
            return(null);
        }
示例#30
0
        public static bool Eliminar(Entidades.Empleados empleado)
        {
            using (var conec = new DAL.Repository <Entidades.Empleados>())
            {
                try
                {
                    return(conec.Eliminar(empleado));
                }
                catch (Exception)
                {
                    throw;
                }
            }

            return(false);
        }