Ejemplo n.º 1
0
 public bool IsNew(NotamCode NCode)
 {
     if(NCode == null || string.IsNullOrEmpty(NCode.Subject) || string.IsNullOrEmpty(NCode.Condition))
         return false;
     var item = _NotamCode.Where(n => n.Subject.Equals(NCode.Subject) && n.Condition.Equals(NCode.Condition)).ToList();
     if (item.Count==0)
         return true;
     return false;
 }
Ejemplo n.º 2
0
        public NotamCodeViewModel(NotamCode notamcode, NotamCodeService notamcodeService)
        {
            if (notamcode == null)
                throw new ArgumentNullException("notamcode");

            if (notamcodeService == null)
                throw new ArgumentNullException("notamcodeService");

            _notamcode = notamcode;
            _notamcodeService = notamcodeService;
           
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Places the specified origin into the repository.
        /// If the origin is already in the repository, an
        /// exception is not thrown.
        /// </summary>
        public void Insert(NotamCode NCode)
        {
            if (NCode == null)
                throw new ArgumentNullException("NotamCode");

            if (!_NotamCode.Contains(NCode))
            {
                _NotamCode.Add(NCode);
                _dataContext.NotamCodes.InsertOnSubmit(NCode);
                _dataContext.SubmitChanges();
                if (this.NotamCodesAdded != null)
                    this.NotamCodesAdded(this, new EntityAddedEventArgs<NotamCode>(NCode));
            }
        }
Ejemplo n.º 4
0
 public NotamCodeViewModel(NotamCode notamcode, NotamCodeService notamcodeService, ObservableCollection<WorkspaceViewModel> parent)
     : this(notamcode, notamcodeService)
 {
     parentWorkSpaces = parent;
 }
Ejemplo n.º 5
0
        /// <summary>
        /// Returns true if the specified origin exists in the
        /// repository, or false if it is not.
        /// </summary>
        public bool ContainsNotamCode(NotamCode NCode)
        {
            if (NCode == null)
                throw new ArgumentNullException("NotamCode");

            return _NotamCode.Contains(NCode);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="origin"></param>
        public void Delete(NotamCode NCode)
        {

        }
Ejemplo n.º 7
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="origin"></param>
 public void Update(NotamCode NCode)
 {
    _dataContext.SubmitChanges();
 }