Example #1
0
        public TransferNotice(string key, DetectionCompany company, PipeType pipeType, PipePosition position,Account creator, DateTime dateCreated)
            : base(key)
        {
            this.Company = company;
            this.Creator = creator;
            this.DateCreated = dateCreated;
            this.PipeType = pipeType;
            this.Position = position;

            this.State = TransferNoticeState.Created;
        }
Example #2
0
        public static Boolean Exist(PipePosition pos)
        {
            IList<PipePosition> postions = RepositoryFactory.GetRepository<IPipePositionRepository, PipePosition>().FindAll();

            return postions.Where(p => string.Equals(pos.Company.Key.ToString(), p.Company.Key.ToString(), StringComparison.InvariantCultureIgnoreCase) &&
                p.ToString().Equals(pos.ToString())).Count() != 0;
        }
Example #3
0
        public static bool CanDelete(PipePosition pos)
        {
            if (pos.IsLocked)
                return false;

            // TODO: Other Check

            return true;
        }
Example #4
0
        public void CopyTo(PipePosition pos)
        {
            if (pos == null)
            {
                throw new ArgumentNullException("pos");
            }

            pos.Area = this.Area;
            pos.Column = this.Column;
            pos.Field = this.Field;
            pos.Height = this.Height;
            pos.Length = this.Length;
            pos.Name = this.Name;
            pos.Row = this.Row;
            pos.Type = this.Type;
            pos.Width = this.Width;
        }