Пример #1
0
        public EntityInstalledBase Insert(int FK_ClientID, int?PK_ProductID, int?FK_ShopPlaceID, string IDBaseInstalada, string NumeroSerie, string fechaCompra, string Model, string ProductName)
        {
            var      objRepository = new RepositoryInstalledBase();
            string   numSerie      = NumeroSerie != null ? NumeroSerie : "";
            DateTime?ShopDate      = string.IsNullOrEmpty(fechaCompra) ? new Nullable <DateTime>() : DateTime.Parse(fechaCompra);

            EntityInstalledBase data = new EntityInstalledBase()
            {
                PK_InstalledBaseID = 0,
                FK_ClientID        = FK_ClientID,
                FK_ProductID       = PK_ProductID,
                FK_ShopPlaceID     = FK_ShopPlaceID,
                InstalledBaseID    = IDBaseInstalada,
                SerialNumber       = numSerie,
                ShopDate           = ShopDate,
                ShopPlaceIDFlag    = false,
                ShopDateFlag       = false,
                SerialNumberFlag   = false,
                ProductIDFlag      = false,
                Model       = Model,
                ProductName = ProductName,
                Status      = true,
                CreateDate  = DateTime.UtcNow.ToLocalTime(),
                ModifyDate  = DateTime.UtcNow.ToLocalTime()
            };

            data = objRepository.Insert(data);
            return(data);
        }
Пример #2
0
        public EntityInstalledBase GetByInstalledBase(string InstalledBaseID)
        {
            var objRepository = new RepositoryInstalledBase();

            return(objRepository.GetByInstalledBase(InstalledBaseID));
        }
Пример #3
0
        public EntityInstalledBase GetByID(int FK_InstalledBaseID)
        {
            var objRepository = new RepositoryInstalledBase();

            return(objRepository.Get(FK_InstalledBaseID));
        }