Example #1
0
 public void SaveTPCBInfo(TPCBInfo item)
 {
     try
     {
         ITPCBInfoRepository itemRepository = RepositoryFactory.GetInstance().GetRepository<ITPCBInfoRepository>();
         itemRepository.SaveTPCBInfo(item);
     }
     catch (Exception)
     {
         throw;
     }
 }
Example #2
0
 public IList<TPCBInfo> CheckSameList(TPCBInfo item)
 {
     IList<TPCBInfo> retLst = null;
     try
     {
         ITPCBInfoRepository itemRepository = RepositoryFactory.GetInstance().GetRepository<ITPCBInfoRepository>();
         retLst = itemRepository.CheckSameList(item);
         return retLst;
     }
     catch (Exception)
     {
         throw;
     }
 }
Example #3
0
    /// <summary>
    /// 保存TPCB信息
    /// </summary>
    /// <param name="executionContext"></param>
    /// <returns>TPCBInfoLst</returns>
    protected internal override ActivityExecutionStatus DoExecute(ActivityExecutionContext executionContext)
    {
 
        ITPCBInfoRepository TPCBInfoRepository = RepositoryFactory.GetInstance().GetRepository<ITPCBInfoRepository, TPCB_Info>();
        TPCBInfo CurrentTPCBInfo = new TPCBInfo();
        CurrentTPCBInfo.Family = (string)CurrentSession.GetValue(Session.SessionKeys.FamilyName);
        CurrentTPCBInfo.PdLine = (string)CurrentSession.GetValue(Session.SessionKeys.LineCode);
        CurrentTPCBInfo.Type = (string)CurrentSession.GetValue(Session.SessionKeys.TPCBType);
        CurrentTPCBInfo.PartNo = (string)CurrentSession.GetValue(Session.SessionKeys.PartNo);
        CurrentTPCBInfo.Vendor = (string)CurrentSession.GetValue(Session.SessionKeys.VendorSN); 
        CurrentTPCBInfo.DCode = (string)CurrentSession.GetValue(Session.SessionKeys.DCode); 
        CurrentTPCBInfo.Editor = (string)CurrentSession.GetValue(Session.SessionKeys.Editor);
        TPCBInfoRepository.SaveTPCB(CurrentTPCBInfo);
        //CurrentSession.AddValue(Session.SessionKeys.CreateDateTime, CurrentTPCBInfo.Cdt);   // add "cdt" as return value
        IList<TPCBInfo> ReturnCurrentTPCBInfoLst = TPCBInfoRepository.Query(CurrentTPCBInfo.Family, CurrentTPCBInfo.PdLine, CurrentTPCBInfo.PartNo);
        CurrentSession.AddValue(Session.SessionKeys.TPCBInfoLst, ReturnCurrentTPCBInfoLst);
        return base.DoExecute(executionContext);
    }