Esempio n. 1
0
        public Guid SavePalletInfo(List <cstPalletInfo> lsPalletinfo)
        {
            Guid _return = Guid.Empty;

            try
            {
                foreach (var _palletitem in lsPalletinfo)
                {
                    PalletInfo _pallet = new PalletInfo();

                    _pallet.PalletID          = Guid.NewGuid();
                    _pallet.PalletType        = _palletitem.PalletType;
                    _pallet.PalletWeight      = _palletitem.PalletWeight;
                    _pallet.PalletHeight      = _palletitem.PalletHeight;
                    _pallet.PalletWidth       = _palletitem.PalletWeight;
                    _pallet.palletCreatedTime = _palletitem.palletCreatedTime;
                    _pallet.PrintStatus       = _palletitem.PrintStatus;
                    //if (_palletitem.BoxMeasurementTime.Date != Convert.ToDateTime("01/01/001").Date)
                    //{
                    //    _boxPackage.BoxMeasurementTime = _palletitem.BoxMeasurementTime;
                    //}
                    entx3v6.AddToPalletInfoes(_pallet);
                    _return = _pallet.PalletID;
                }
                entx3v6.SaveChanges();
            }
            catch (Exception)
            { }
            return(_return);
        }