示例#1
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="origin"></param>
 public void Update(Origin origin)
 {
    if (origin == null)
         throw new ArgumentNullException("origin");
    _dataContext.SubmitChanges();
         
 }
示例#2
0
        public OriginViewModel(Origin origin, OriginService originService)
        {
            if (origin == null)
                throw new ArgumentNullException("origin");

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

            _origin = origin;
            _originService = originService;
           // _customerType = Strings.CustomerViewModel_CustomerTypeOption_NotSpecified;
        }
示例#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(Origin origin)
        {
            if (origin == null)
                throw new ArgumentNullException("origin");

            if (!_origins.Contains(origin))
            {
                _origins.Add(origin);
                _dataContext.Origins.InsertOnSubmit(origin);
                _dataContext.SubmitChanges();
                if (this.OriginAdded != null)
                    this.OriginAdded(this, new EntityAddedEventArgs<Origin>(origin));
            }
        }
示例#4
0
  public OriginViewModel(Origin origin, OriginService originService, ObservableCollection<WorkspaceViewModel> parent):this(origin,originService)
 {
     parentWorkSpaces = parent;
 }
示例#5
0
        /// <summary>
        /// Returns true if the specified origin exists in the
        /// repository, or false if it is not.
        /// </summary>
        public bool ContainsOrigin(Origin origin)
        {
            if (origin == null)
                throw new ArgumentNullException("origin");

            return _origins.Contains(origin);
        }
示例#6
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="origin"></param>
        public void Delete(Origin origin)
        {

        }