Пример #1
0
        private ReworkProcessMaintainInfo convertToMaintainInfoFromObj(ReworkProcess temp)
        {
            ReworkProcessMaintainInfo reworkProcess = new ReworkProcessMaintainInfo();

            reworkProcess.ReworkCode = temp.ReworkCode;
            reworkProcess.Process = temp.Process;
            reworkProcess.Editor = temp.Editor;
            reworkProcess.Cdt = temp.Cdt;
            reworkProcess.Udt = temp.Udt;

            return reworkProcess;
        }
Пример #2
0
        public void addReworkProcesses(IList<string> arrCheckedReworkCode, ReworkProcessMaintainInfo reworkProcessInfo)
        {
            try
            {

                IUnitOfWork work = new UnitOfWork();

                processRepository.DeleteReworkProcessByProcessDefered(work, reworkProcessInfo.Process);

                for (int i = 0; i < arrCheckedReworkCode.Count(); i++)
                {
                    ReworkProcess reworkProcessObj = new ReworkProcess();

                    reworkProcessInfo.ReworkCode = arrCheckedReworkCode[i];

                    reworkProcessObj = convertToObjFromMaintainInfo(reworkProcessObj, reworkProcessInfo);

                    processRepository.AddReworkProcessDefered(work, reworkProcessObj);

                }

                work.Commit();

            }
            catch (FisException e)
            {
                logger.Error(e.mErrmsg);
                throw e;
            }
            catch (Exception e)
            {
                logger.Error(e.Message);
                throw;
            }
        }
Пример #3
0
        private ReworkProcess convertToObjFromMaintainInfo(ReworkProcess obj, ReworkProcessMaintainInfo temp)
        {

            obj.ReworkCode = temp.ReworkCode;
            obj.Process = temp.Process;
            obj.Udt = temp.Udt;
            obj.Cdt = temp.Cdt;
            obj.Editor = temp.Editor;

            return obj;
        }
Пример #4
0
 /// <summary>
 ///设置strReworkCode与strProcess相关联 
 /// </summary>
 /// <returns></returns>
 public void SetProcess(string strProcess, string reworkCode, string editor)
 {
     string reworkStatus = productRepository.GetReworkStatus(reworkCode);
     if (reworkStatus == null)
     {
         return;
     }
     //判断rework的当前状态
     if (!reworkStatus.Equals("0"))
     {
         List<string> erpara = new List<string>();
         FisException ex1 = new FisException("DMT025", erpara);
         throw ex1;
     }
     //保存rework 和 process的关系
     ReworkProcess reworkProcess = new ReworkProcess();
     reworkProcess.ReworkCode = reworkCode;
     reworkProcess.Process = strProcess;
     reworkProcess.Editor = editor;
     reworkProcess.Cdt = DateTime.Now; 
     reworkProcess.Udt = DateTime.Now; 
     productRepository.SetReworkProcess(reworkProcess);
 }