Exemple #1
0
        /// <summary>
        /// 为LCM绑定一个ME
        /// </summary>
        /// <param name="me"></param>
        public void AddMEParts(LCMME me)
        {
            if (me == null)
                return;

            lock (_syncObj_mePart)
            {
                me.Tracker = this._tracker.Merge(me.Tracker);
                this._meParts.Add(me);
                this._tracker.MarkAsAdded(me);
                this._tracker.MarkAsModified(this);
            }
        }
Exemple #2
0
        /// <summary>
        /// Save BTDL	
        /// A.记录KP/CT的绑定关系
        /// Update PartSN.VendorSN
        /// PartSnRepository.update
        /// B.保存LCM与BTDL的绑定
        /// Insert LCMBind: LCMSno=LCM CT#, MESno=BTDL SN#, METype=’BTDL’ 
        /// </summary>
        /// <param name="executionContext"></param>
        /// <returns></returns>
        protected internal override ActivityExecutionStatus DoExecute(ActivityExecutionContext executionContext)
        { 
            IPartSnRepository currentPartSNRepository = RepositoryFactory.GetInstance().GetRepository<IPartSnRepository, PartSn>();
            PartSn currentPartSN = (PartSn)CurrentSession.GetValue(Session.SessionKeys.PartSN);
            string currentVendorSN = CurrentSession.GetValue(Session.SessionKeys.VendorSN).ToString();
            currentPartSN.VendorSn = currentVendorSN;
            currentPartSN.Editor = Editor;
            currentPartSNRepository.Update(currentPartSN, CurrentSession.UnitOfWork);

            string ctno = CurrentSession.GetValue(Session.SessionKeys.BTDLLCMCTNO).ToString();
            string btdlsn = CurrentSession.GetValue(Session.SessionKeys.BTDLSN).ToString();

            ILCMRepository lcmRepository = RepositoryFactory.GetInstance().GetRepository<ILCMRepository, LCM>();
            LCMME lcmmeobj=new LCMME();
            lcmmeobj.LCMSn =ctno;
            lcmmeobj.MESn = btdlsn;
            lcmmeobj.METype ="BTDL";
            lcmmeobj.Editor = this.Editor;
            lcmRepository.InsertLCMBindDefered(CurrentSession.UnitOfWork, lcmmeobj);
            CurrentSession.AddValue(Session.SessionKeys.IsComplete, true);
            return base.DoExecute(executionContext);
        }
Exemple #3
0
        /// <summary>
        /// 保存LCM与TPDL的绑定
        /// Insert LCMBind: LCMSno=LCM CT#, MESno=TPDL SN#, METype=’TPDL’
        /// </summary>
        /// <param name="executionContext"></param>
        /// <returns></returns>
        protected internal override ActivityExecutionStatus DoExecute(ActivityExecutionContext executionContext)
        {
            string ctno = CurrentSession.GetValue(Session.SessionKeys.TPDLLCMCTNO).ToString();
            string tpdlsn = CurrentSession.GetValue(Session.SessionKeys.TPDLSN).ToString();
            ILCMRepository lcmRepository = RepositoryFactory.GetInstance().GetRepository<ILCMRepository, LCM>();
            LCMME lcmmeobj = new LCMME();
            lcmmeobj.LCMSn = ctno;
            lcmmeobj.MESn = tpdlsn;
            lcmmeobj.METype = "TPDL";
            lcmmeobj.Editor = this.Editor;
            lcmRepository.InsertLCMBindDefered(CurrentSession.UnitOfWork, lcmmeobj);

            CurrentSession.AddValue(Session.SessionKeys.IsComplete, true);
            return base.DoExecute(executionContext);
        }