示例#1
0
        /// <summary>
        /// Get MB Object and Put it into Session.SessionKeys.MB
        /// </summary>
        /// <param name="executionContext"></param>
        /// <returns></returns>
        protected internal override ActivityExecutionStatus DoExecute(ActivityExecutionContext executionContext)
        {

            IMB curMb = (IMB)CurrentSession.GetValue(Session.SessionKeys.MB);
            string reworkStation = (string)CurrentSession.GetValue(Session.SessionKeys.Remark);

            IMBRepository mbRepository = RepositoryFactory.GetInstance().GetRepository<IMBRepository, IMB>();

            MBRptRepair newMb = new MBRptRepair();
            newMb.MBSn = curMb.Sn;
            newMb.Tp = "BGA";
            newMb.Status = "1";
            newMb.Mark = "0";
            newMb.Remark = reworkStation;
            newMb.Cdt = DateTime.Now;
            newMb.Udt = DateTime.Now;
            newMb.UserName = this.Editor;

            curMb.AddRptRepair(newMb);
            mbRepository.Update(curMb, CurrentSession.UnitOfWork);

            CurrentSession.AddValue(Session.SessionKeys.NewMB, newMb);

            return base.DoExecute(executionContext);
        }
示例#2
0
文件: MB.cs 项目: wra222/testgit
        /// <summary>
        /// 在MBRepair列表中添加Repair record
        /// </summary>
        /// <param name="rptRepair">Repair record</param>
        public void AddRptRepair(MBRptRepair rptRepair)
        {
            if (rptRepair == null)
                return;

            lock (_syncObj_rptRepair)
            {
                rptRepair.Tracker = this._tracker.Merge(rptRepair.Tracker);
                this._rptRepair.Add(rptRepair);
                this._tracker.MarkAsAdded(rptRepair);
                this._tracker.MarkAsModified(this);
            }
        }
示例#3
0
        /// <summary>
        /// Insert [rpt_PCARep]
        /// </summary>
        /// <param name="executionContext"></param>
        /// <returns></returns>
        protected internal override ActivityExecutionStatus DoExecute(ActivityExecutionContext executionContext)
        {
            IMB mb = (IMB)CurrentSession.GetValue(Session.SessionKeys.MB);
            string mbStn = mb.MBStatus.Station;
            string tp = "";
            if (mbStn == "10" || mbStn == "15" || mbStn == "19") tp = "SA";
            if (mbStn == "25" || mbStn == "33" || mbStn == "33A") tp = "MP";

            MBRptRepair item = new MBRptRepair();
            item.Tp = tp;
            item.Remark = "~";
            item.Mark = "1";
            item.Status = "0";
            item.UserName = CurrentSession.Editor;
            mb.AddRptRepair(item);
            return base.DoExecute(executionContext);
        }