Пример #1
0
        public PipeIncomeRecord(int key, string code, BusinessCheckNotice notice, Account creator, DateTime dateCreated)
            : base(key)
        {
            if (notice == null)
            {
                throw new ArgumentNullException("notice");
            }

            if (notice.DeliverNotice == null)
            {
                throw new InvalidOperationException("数据有误,来料通知单不能为空");
            }

            this.Code = code;
            this.Creator = creator;
            this.DateCreated = dateCreated;

            this.BusinessCheckNotice = notice;
            this.Company = notice.DetectionCompany;
            this.CompanyContract = notice.DeliverNotice.CompanyContract;
            this.PipeQualityCertification = RepositoryFactory.GetRepository<IPipeQualityCertificationRepository, PipeQualityCertification>().FindBy(notice.DeliverNotice);
            this.PipeType = notice.PipeType;
            this.Producer = notice.DeliverNotice.Producer;
            this.ReciveDate = notice.LastReciveDate;
            this.SendDate = notice.DeliverNotice.DateDelivering;
            this.Supplier = notice.DeliverNotice.Supplier;
        }
Пример #2
0
 public FileShare(string key, Account owner, DateTime dateCreated, bool isLocked)
     : base(key)
 {
     this.owner = owner;
     this.dateCreated = dateCreated;
     this.isLocked = isLocked;
 }
Пример #3
0
 public ReportDetails(string key, DetectionCompany company, PipeType pipeType, Account reporter, DateTime datecreated)
     : base(key)
 {
     this.Company = company;
     this.Reporter = reporter;
     this.DateCreated = datecreated;
     this.PipeType = pipeType;
 }
Пример #4
0
 public DeliverNotice(int key, DetectionCompany company, Account creator, PipeType pipeType, DateTime dateCreated)
     : base(key)
 {
     this.Company = company;
     this.Creator = creator;
     this.DateCreated = dateCreated;
     this.PipeType = pipeType;
 }
Пример #5
0
 public PipeNeedNotice(string key, string code, DetectionCompany company, Account creator, DateTime dateCreated)
     : base(key)
 {
     this.Code = code;
     this.Company = company;
     this.Creator = creator;
     this.DateCreated = dateCreated;
 }
Пример #6
0
        public ReturningNotice(string key, Account creator, DateTime dateCreated, string instruction)
            : base(key)
        {
            this.Creator = creator;
            this.DateCreated = dateCreated;

            this.State = ReturningNoticeState.Created;
            this.Instruction = instruction;
        }
Пример #7
0
 public TransferTask(string key, PipeType pipeType, DetectionCompany company, Account creator, DateTime dateCreated, bool isSysTask)
     : base(key)
 {
     this.PipeType = pipeType;
     this.Company = company;
     this.DateCreated = dateCreated;
     this.Creator = creator;
     this.IsSystemTask = isSysTask;
 }
Пример #8
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;
        }
Пример #9
0
        public OutgoingNotice(string key, DetectionCompany company, PipeType pipeType, Digger digger, Account creator, DateTime dateCreated)
            : base(key)
        {
            this.Company = company;
            this.Digger = digger;
            this.Creator = creator;
            this.DateCreated = dateCreated;
            this.PipeType = pipeType;

            this.State = OutgoingNoticeState.Created;
        }
Пример #10
0
 public Message(string key, MessageReceiveType receiveType,
     Account sender, DateTime dateCreated, bool isNeedHandle,
     bool isSystemMsg)
     : base(key)
 {
     this.receiveType = receiveType;
     this.sender = sender;
     this.dateCreated = dateCreated;
     this.isNeedHandle = isNeedHandle;
     this.isSystemMsg = isSystemMsg;
     this.MessageAccounts = new List<MessageAccount>();
 }
Пример #11
0
 public NormalCheckResult(string key, NormalCheckTask task, int totalCount,
     float totalWorkLength, int validCount, float validWorkLength, float invalidWorkLength,
     Account creator, DateTime dateCreated)
     : base(key)
 {
     this.NormalCheckTask = task;
     this.PipeType = task.PipeType;
     this.Company = task.Company;
     this.TotalCount = totalCount;
     this.TotalWorkLength = totalWorkLength;
     this.ValidCount = validCount;
     this.ValidWorkLength = validWorkLength;
     this.InValidWorkLength = invalidWorkLength;
     this.Creator = creator;
     this.DateCreated = dateCreated;
 }
Пример #12
0
        public BusinessCheckNotice(int key, DeliverNotice deliverNotice, Account creator, DateTime dateCreated, Account keeper,
            DateTime firstReciveDate, DateTime lastReceiveDate, int reciveCount)
            : base(key)
        {
            if (deliverNotice == null)
            {
                throw new ArgumentNullException("deliverNotice");
            }

            this.DeliverNotice = deliverNotice;
            this.PipeType = this.DeliverNotice.PipeType;
            this.DetectionCompany = this.DeliverNotice.Company;
            this.Creator = creator;
            this.DateCreated = dateCreated;
            this.Keeper = keeper;
            this.FirstReciveDate = firstReciveDate;
            this.LastReciveDate = lastReceiveDate;
            this.ReceiveCount = reciveCount;
        }
Пример #13
0
        public NormalCheckTask(string key, string code, DetectionCompany company, PipeType pipeTye, Digger targetDigger,
            TransferTask transferTask, Account creator, DateTime dateCreated)
            : base(key)
        {
            this.Code = code;
            this.Company = company;
            this.PipeType = pipeTye;
            this.TargetDigger = targetDigger;
            this.TransferTask = transferTask;
            this.Creator = creator;
            this.DateCreated = dateCreated;

            this.CheckPressureType = CheckPressureType.NotGiven;
            this.CheckBodyCrackType = PDCPMS.Model.NormalCheck.CheckBodyCrackType.NotGiven;
        }
Пример #14
0
 public AccountRoleAddModel(Account account)
     : this()
 {
     this.Account = account;
 }
Пример #15
0
        public void CacheLoaded()
        {
            if (this.Category != null)
                this.Category = RepositoryFactory.GetRepository<IFileShareCategoryRepository, FileShareCategory>().FindBy(this.Category.Key);

            if (this.Owner != null)
                this.owner = RepositoryFactory.GetRepository<IAccountRepository, Account>().FindBy(owner.Key);
        }
Пример #16
0
        public void CacheLoaded()
        {
            if (this.Company != null)
                this.Company = RepositoryFactory.GetRepository<IDetectionCompanyRepository, DetectionCompany>().FindBy(this.Company.Key);

            if (this.Transfer != null)
                this.Transfer = RepositoryFactory.GetRepository<IAccountRepository, Account>().FindBy(this.Transfer.Key);

            if (this.Verifier != null)
                this.Verifier = RepositoryFactory.GetRepository<IAccountRepository, Account>().FindBy(this.Verifier.Key);

            if (this.PipeType != null)
                this.PipeType = RepositoryFactory.GetRepository<IPipeTypeRepository, PipeType>().FindBy(this.PipeType.Key);
        }
Пример #17
0
 public MessageAccount(Message msg, Account receiver)
 {
     this.message = msg;
     this.receiver = receiver;
 }
Пример #18
0
        public static Boolean CanDelete(Account account)
        {
            if (account == null)
            {
                throw new ArgumentNullException("account");
            }

            return !account.IsLocked;
        }
Пример #19
0
        public void CopyTo(Account account)
        {
            if (account == null)
            {
                throw new ArgumentException("account");
            }

            account.Address = this.Address;
            account.AvatarPath = this.AvatarPath;
            account.Birthday = this.Birthday;
            account.DetectionCompany = this.DetectionCompany;
            account.DetectionGroup = this.DetectionGroup;
            account.Gender = this.Gender;
            account.IsAuthenticated = this.IsAuthenticated;
            account.IsLocked = this.IsLocked;
            account.LoginName = this.LoginName;
            account.Name = this.Name;
            account.Password = this.Password;
            account.SignPath = this.SignPath;
            account.Telephone = this.Telephone;
        }
Пример #20
0
        public void CacheLoaded()
        {
            if (this.Sender != null)
                this.Sender = RepositoryFactory.GetRepository<IAccountRepository, Account>().FindBy(this.Sender.Key);

            if (this.Verifier != null)
                this.Verifier = RepositoryFactory.GetRepository<IAccountRepository, Account>().FindBy(this.Verifier.Key);
        }