Esempio n. 1
0
        /// <summary>
        /// Save data to the StationMaster Table.
        /// </summary>
        /// <param name="lsStationMaster">List<cstStationMasterTbl></param>
        /// <returns>Boolean </returns>
        public Boolean SaveSationMaster(List <cstStationMasterTbl> lsStationMaster)
        {
            Boolean _return = false;

            try
            {
                foreach (var Stationitem in lsStationMaster)
                {
                    Station _Station = new Station();
                    _Station.StationID        = Guid.NewGuid();
                    _Station.StationName      = Stationitem.StationName;
                    _Station.DeviceNumber     = Stationitem.DeviceNumber;
                    _Station.RequestedUserID  = Stationitem.RequestedUserID;
                    _Station.StationAlive     = Stationitem.StationAlive;
                    _Station.StationLocation  = Stationitem.StaionLocation;
                    _Station.RegistrationDate = Stationitem.RegistrationDate;
                    _Station.CreatedDateTime  = DateTime.UtcNow;
                    _Station.CreatedBy        = GlobalClasses.ClGlobal.UserID;
                    entx3v6.AddToStations(_Station);
                }
                entx3v6.SaveChanges();
                _return = true;
            }
            catch (Exception)
            { }
            return(_return);
        }