Esempio n. 1
0
        public static Commons.FileHeader Update(Commons.FileHeader model)
        {
            Commons.FileHeader result = new Commons.FileHeader();
            using (IndexEntities db = new IndexEntities())
            {
                spu_FileHeader_Result data = db.spu_FileHeader(model.Id, model.IdCustomer, model.IdFileInfoConfig, model.IdDocument, model.AuthorizationDate,
                                                               model.ExpantionDate, model.ExpirationDate, model.DocumentDate, model.ArrivalDate, model.ExchangeRate, model.Insurance,
                                                               model.Cargo, model.IdCustom, model.IdCountry, model.IdWarranty, model.IdCellar, model.IdCurrency,
                                                               model.IdResolution, model.IdAccount, model.CifTotal, model.LinesTotal, model.Facturas, model.RegisterUser).FirstOrDefault();

                result = FileHeader.Tranform(data);
            }

            return(result);
        }
Esempio n. 2
0
        private static Commons.FileHeader Tranform(spu_FileHeader_Result data)
        {
            Commons.FileHeader result = new Commons.FileHeader()
            {
                AccounName        = data.AccountName,
                ArrivalDate       = data.ArrivalDate,
                AuthorizationDate = data.AuthorizationDate,
                Cargo             = data.Cargo,
                CellarName        = data.CellarName,
                CifTotal          = data.CIFTotal,
                CountryName       = data.CountryName,
                CreateDate        = data.CreateDate,
                CurrencyName      = data.CurrencyName,
                CustomName        = data.CustomName,
                DocumentDate      = data.DocumentDate,
                ExchangeRate      = data.ExchangeRate,
                ExpantionDate     = data.ExpantionDate,
                ExpirationDate    = data.ExpirationDate,
                Facturas          = data.Facturas,
                FileInfoName      = data.FileName,
                Id               = data.Id,
                IdAccount        = data.IdAccount,
                IdCellar         = data.IdCellar,
                IdCountry        = data.IdCountry,
                IdCurrency       = data.IdCurrency,
                IdCustom         = data.IdCustom,
                IdCustomer       = data.IdCustomer,
                IdDocument       = data.IdDocument,
                IdFileInfoConfig = data.IdFileInfoConfig,
                IdResolution     = data.IdResolution,
                IdState          = data.IdState,
                IdWarranty       = data.IdWarranty,
                Insurance        = data.Insurance,
                IsSubstract      = data.IsSubstract,
                LinesTotal       = data.LinesTotal,
                LoadRawMaterial  = data.LoadRawMaterial,
                Operation        = data.Operation,
                ResolutionName   = data.ResolutionName,
                Reviewed         = data.Reviewed,
                StateName        = data.StateName,
                UseAttached      = data.UseAttached,
                WarrantyName     = data.WarrantyName,
                UpdateDate       = data.UpdateDate
            };

            return(result);
        }