• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# FisException类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中FisException的典型用法代码示例。如果您正苦于以下问题:C# FisException类的具体用法?C# FisException怎么用?C# FisException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



FisException类属于命名空间,在下文中一共展示了FisException类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: DoExecute

 /// <summary>
 /// 
 /// </summary>
 /// <param name="executionContext"></param>
 /// <returns></returns>
 protected internal override ActivityExecutionStatus DoExecute(ActivityExecutionContext executionContext)
 {
     Product currentProduct = (Product)CurrentSession.GetValue(Session.SessionKeys.Product);
     if (currentProduct.ProductLogs != null)
     {
         foreach (var log in currentProduct.ProductLogs)
         {
             if (string.Compare(log.Station, PakCosmetic) == 0)
             {
                 if (!string.IsNullOrEmpty(log.Line)
                     && !string.IsNullOrEmpty(this.Line)
                     && string.Compare(this.Line.Substring(0, 1), log.Line.Substring(0, 1)) != 0)
                 {
                     //报告错误:“此Product 不应在此线生产! 该Product 在PAK Cosmetic 时选择的线别是” + @Line
                     FisException ex;
                     var erpara = new List<string>();
                     erpara.Add(log.Line);
                     ex = new FisException("CHK868", erpara);   
                     throw ex;
                 }
                 else
                 {
                     return base.DoExecute(executionContext);
                 }
             }
         }
     }
     return base.DoExecute(executionContext);
 }
开发者ID:wra222,项目名称:testgit,代码行数:34,代码来源:PizzaKittingLineCheck.cs


示例2: DoExecute

        /// <summary>
        /// 
        /// </summary>
        /// <param name="executionContext"></param>
        /// <returns></returns>
        protected internal override ActivityExecutionStatus DoExecute(ActivityExecutionContext executionContext)
        {
            string type = (string)CurrentSession.GetValue("VCode");
            string data = (string)CurrentSession.GetValue("DeliveryNo");
            IPizzaRepository repPizza = RepositoryFactory.GetInstance().GetRepository<IPizzaRepository, Pizza>();
            //bool flag=false, flag1=false;

            if (type == "DN")
            {
                return base.DoExecute(executionContext);
            }
             
            if (type == "Shipment")
            {
                if (repPizza.CheckExistPakShipmentWeightFis(data) == false)
                {
                    if (repPizza.CheckExistFisToSpaWeight(data) == true)
                    {
                        repPizza.CopyFisToSapWeightToPakShipmentWeightFisDefered(CurrentSession.UnitOfWork, data);
                    }
                    else {
                        List<string> errpara = new List<string>();
                        errpara.Add("该shipment未称重!");
                        FisException ex = new FisException("CHK275", errpara);
                        throw ex;
                    }
                }               
            }


            return base.DoExecute(executionContext);

        }      
开发者ID:wra222,项目名称:testgit,代码行数:38,代码来源:CheckWeightForScaningList.cs


示例3: AddITCNDDefectCheck

        public void AddITCNDDefectCheck(IMES.DataModel.ITCNDDefectCheckDef item)
        {
            try 
            {
                Boolean existFamily=false;
               ITCNDDefectCheckDef dataLst =itemRepository.CheckExistByFamilyAndCode(item.family,item.code);
                //IList<ITCNDDefectCheckDef> dataLst=GetAllITCNDDefectCheckItems();
                //foreach(ITCNDDefectCheckDef def in dataLst)
                {
                    if (dataLst != null)
                    {
                        FisException fe=null;
                        List<string> param = new List<string>();
                        fe = new FisException("DMT117",param);
                        throw fe;
                    }
                }
            //    if(!existFamily)
                {
                    itemRepository.AddITCNDDefectCheck(item);
                }
            }
            catch(Exception)
            {
                throw;
            }

        }
开发者ID:wra222,项目名称:testgit,代码行数:28,代码来源:ITCNDDefectCheckManager.cs


示例4: Check

        //a)检查Base 的状态为69 ,Status为1(检查Docking 数据库的ProductStatus)        
        public void Check(object partUnit, object bomItem, string station)
        {
            if (partUnit != null)
            {
                string dockingSn = ((PartUnit) partUnit).Sn;
                string dockingPn = ((PartUnit)partUnit).Pn;
                if (!string.IsNullOrEmpty(dockingSn))
                {
                    IProductRepository productRepository =
                        RepositoryFactory.GetInstance().GetRepository<IProductRepository, IProduct>();
                    DataTable tb = productRepository.ExecSpForQuery(SqlHelper.ConnectionString_PAK, 
                                                                                                "PC_CombineBaseforCheckProductStatus", 
                                                                                                new SqlParameter("DockingSn", dockingSn));

                    if (tb == null || tb.Rows.Count == 0)
                    {
                        List<string> errpara = new List<string>();
                        FisException ex =new FisException("CHK320", errpara);
                        ex.stopWF=false;
                        throw ex;//status is error.
                    }

                    //DataTable tb1 = productRepository.ExecSpForQuery(SqlHelper.ConnectionString_PAK, "PC_CombinePizzaforCheckQCStatus", new SqlParameter("DockingSn", dockingSn));

                    //if (tb1 == null || tb1.Rows.Count == 0)
                    //{
                    //    List<string> errpara = new List<string>();
                    //    FisException ex = new FisException("CHK321", errpara);
                    //    ex.stopWF = false;
                    //    throw ex;//QCstatus is error.
                    //}
                  
                }
            }
        }
开发者ID:wra222,项目名称:testgit,代码行数:36,代码来源:CheckModule.cs


示例5: DoExecute

         /// <summary>
        /// 
        /// </summary>
        /// <param name="executionContext"></param>
        /// <returns></returns>
        protected internal override ActivityExecutionStatus DoExecute(ActivityExecutionContext executionContext)
        {
            MB currenMB = CurrentSession.GetValue(Session.SessionKeys.MB) as MB;
            string family = currenMB.Family.Trim();
            string mbCode = currenMB.MBCode.Trim();
            IPCBVersionRepository pcbRep = RepositoryFactory.GetInstance().GetRepository<IPCBVersionRepository>();
            IList<PCBVersion> pcbVerList = pcbRep.GetPCBVersion(family, mbCode);
            CurrentSession.AddValue(ExtendSession.SessionKeys.HasPCBVer, false);
            if (pcbVerList.Count > 0)
            {
                string pcbVer = (string)CurrentSession.GetValue(ExtendSession.SessionKeys.PCBVer);
                if (string.IsNullOrEmpty(pcbVer))
                {
                    FisException e = new FisException("SA002", new string[] { ExtendSession.SessionKeys.PCBVer });
                    throw e;
                }

                PCBVersion pcbVerObj = pcbRep.Find(new string[] { family, mbCode, pcbVer });
                if (pcbVerObj == null)
                {
                    FisException e = new FisException("SA003", new string[] { family, mbCode, pcbVer });
                    throw e;
                }
                currenMB.CUSTVER = pcbVer;
                CurrentSession.AddValue(ExtendSession.SessionKeys.HasPCBVer, true);
                CurrentSession.AddValue(ExtendSession.SessionKeys.Revision, pcbVerObj.CTVer);
                CurrentSession.AddValue(ExtendSession.SessionKeys.Supplier, pcbVerObj.Supplier);
            }
               
            return base.DoExecute(executionContext);
        }
开发者ID:wra222,项目名称:testgit,代码行数:36,代码来源:GetPCBVersion.cs


示例6: DoExecute

 /// <summary>
 /// DoExecute
 /// </summary>
 /// <param name="executionContext"></param>
 /// <returns></returns>
 protected internal override ActivityExecutionStatus DoExecute(ActivityExecutionContext executionContext)
 {
     //MB
     IMB mb = (IMB)CurrentSession.GetValue(Session.SessionKeys.MB);
      if (mb == null )
     {
         FisException e = new FisException("CHK002", new string[] { });
         e.stopWF = true;
         throw e;
     }
      string fixtureId = (string)CurrentSession.GetValue(Session.SessionKeys.FixtureID);
     if (!IsAllowDoTest(mb.Sn.Substring(0,2), fixtureId) )
     {
         FisException e = new FisException("CHK1098", new string[] { fixtureId, mb.MBCode });
         e.stopWF = true;
         throw e;
     }
    if(!CheckAOI(mb))
    {
        FisException e = new FisException("CHK1099", new string[] {});
         e.stopWF = true;
         throw e;
    }
    return base.DoExecute(executionContext);
 }
开发者ID:wra222,项目名称:testgit,代码行数:30,代码来源:CheckAutoICT.cs


示例7: DoExecute

 /// <summary>
 /// 
 /// </summary>
 /// <param name="executionContext"></param>
 /// <returns></returns>
 protected internal override ActivityExecutionStatus DoExecute(ActivityExecutionContext executionContext)
 {
     IPizzaRepository repPizza = RepositoryFactory.GetInstance().GetRepository<IPizzaRepository, Pizza>();
     string type = (string)CurrentSession.GetValue("Doc_type");
     //ITC-1360-1090  "Pack List-Shipment"->"Pack List- Shipment"
     //ITC-1360-1136  "Pack List-Shipment"->"Pack List- Shipment"
     if (type == "Pack List- Shipment" || type == "ALL")
     {
         IList<VShipmentPakComnInfo> comnList = (IList<VShipmentPakComnInfo>)CurrentSession.GetValue("ComnList");
         foreach (VShipmentPakComnInfo temp in comnList)
         {
             //if @Doc_Type = 'Pack List- Shipment' and @region = 'NA' and @sales_chan = 'Consumer' 
             //and @order_type = 'CTO' and @intl_carrier = 'FDE'
             if (temp.region == "NA" && temp.sales_chan == "Consumer"
                 && temp.order_type == "CTO" && temp.intl_carrier == "FDE")
             {
                 string data = (string)CurrentSession.GetValue("Data");
                 bool bExist = false;
                 //exists (select * from dbo.PAK_PackkingData nolock where InternalID = @deliveryno and TRACK_NO_PARCEL <> '')
                 bExist = repPizza.CheckExistPakPackkingData(data);
                 if (bExist == false)
                 {
                     FisException ex;
                     List<string> erpara = new List<string>();
                     erpara.Add(data);
                     ex = new FisException("CHK826", erpara);
                     //ex.stopWF = false;
                     throw ex;
                 }
             }
         }
     }
     return base.DoExecute(executionContext);
 }
开发者ID:wra222,项目名称:testgit,代码行数:39,代码来源:CheckTrackForPackingList.cs


示例8: AddCustomer

        public void AddCustomer(CustomerInfo customerInfo)
        {
            FisException ex;
            List<string> paraError = new List<string>();

            try
            {
                IMiscRepository itemRepository = RepositoryFactory.GetInstance().GetRepository<IMiscRepository>();

                if (itemRepository.GetCustomerInfo(customerInfo.customer) == null)
                {
                    UnitOfWork uow = new UnitOfWork();
                    itemRepository.AddCustomerDefered(uow, customerInfo);
                    uow.Commit();
                }
                else
                {
                    ex = new FisException("DMT056", paraError);
                    throw ex;
                }
            }
            catch (Exception)
            {
                throw;
            }

        }
开发者ID:wra222,项目名称:testgit,代码行数:27,代码来源:CommonImpl.cs


示例9: DoExecute

 /// <summary>
 /// 
 /// </summary>
 /// <param name="executionContext"></param>
 /// <returns></returns>
 protected internal override ActivityExecutionStatus DoExecute(ActivityExecutionContext executionContext)
 {
     bool existDDRCT = false;
     string ddrct = CurrentSession.GetValue("DDRCT") as string;
     if (null != ddrct){
         Product currentProduct = ((Product)CurrentSession.GetValue(Session.SessionKeys.Product));
         IList<IProductPart> productParts = currentProduct.ProductParts;
         foreach (ProductPart part in productParts)
         {
             if ("DDR".Equals(part.CheckItemType) && ddrct.Equals(part.PartSn))
             {
                 existDDRCT = true;
                 break;
             }
         }
     }
     if (!existDDRCT)
     {
         List<string> errpara = new List<string>();
         FisException e = new FisException("CHK1014", errpara); // 请核对流程卡
         throw e;
     }
     
     return base.DoExecute(executionContext);
 }
开发者ID:wra222,项目名称:testgit,代码行数:30,代码来源:CheckDDRCT.cs


示例10: DoExecute

        /// <summary>
        /// 
        /// </summary>
        /// <param name="executionContext"></param>
        /// <returns></returns>
        protected internal override ActivityExecutionStatus DoExecute(ActivityExecutionContext executionContext)
        {

            //从Session里取得Product对象
            Product currentProduct = (Product)CurrentSession.GetValue(Session.SessionKeys.Product);

            if (String.IsNullOrEmpty(currentProduct.Status.StationId))
            {
                FisException ex;
                List<string> erpara = new List<string>();
                ex = new FisException("CHK809", erpara);
                throw ex;
            }
            if(currentProduct.Status.StationId == "99")
            {
                FisException ex;
                List<string> erpara = new List<string>();                
                ex = new FisException("CHK810", erpara);
                throw ex;
            }
            else
            {
            }

            return base.DoExecute(executionContext);
        }
开发者ID:wra222,项目名称:testgit,代码行数:31,代码来源:CheckProductStation.cs


示例11: DoExecute

        /// <summary>
        /// 
        /// </summary>
        /// <param name="executionContext"></param>
        /// <returns></returns>
        protected internal override ActivityExecutionStatus DoExecute(ActivityExecutionContext executionContext)
        {

            string model1 = (string)CurrentSession.GetValue(Session.SessionKeys.Model1);
            string model2 = (string)CurrentSession.GetValue(Session.SessionKeys.Model2);

            ASTInfo info = (ASTInfo)CurrentSession.GetValue(Session.SessionKeys.ASTInfoList);

            if (model1 != model2)
            {
                IBOMRepository ibomRepository = RepositoryFactory.GetInstance().GetRepository<IMES.FisObject.Common.FisBOM.IBOMRepository>();

                MoBOMInfo cond = new MoBOMInfo();
                cond.material = model2;
                cond.component = info.PartNo;
                cond.flag = 1;
                IList<MoBOMInfo> list = new List<MoBOMInfo>();
                list = ibomRepository.GetModelBomList(cond);
                if (list == null || list.Count == 0)
                {
                    FisException ex;
                    List<string> erpara = new List<string>();
                    ex = new FisException("CHK895", erpara);
                    throw ex;
                }
            }
            
            return base.DoExecute(executionContext);
        }
开发者ID:wra222,项目名称:testgit,代码行数:34,代码来源:CheckModelForChangeAST.cs


示例12: DoExecute

        /// <summary>
        /// 
        /// </summary>
        /// <param name="executionContext"></param>
        /// <returns></returns>
        protected internal override ActivityExecutionStatus DoExecute(ActivityExecutionContext executionContext)
        {
            //Left(Product.Model,3)=’173’
            //1)Model下阶BM阶的描述包含LCM,该Product不存在Product_Part.PartSn like ‘C%’ and Product_Part.BomNodeType=’KP’的数据,则报错:“请去结合LCM”

            var currentProduct = (IProduct)CurrentSession.GetValue(Session.SessionKeys.Product);
            var model = currentProduct.Model;
            if (model.IndexOf("173") == 0)
            {
                IBOMRepository ibomRepository = RepositoryFactory.GetInstance().GetRepository<IMES.FisObject.Common.FisBOM.IBOMRepository>();
                IList<MoBOMInfo> list = new List<MoBOMInfo>();
                list = ibomRepository.GetPnListByModelAndBomNodeTypeAndDescr(model, "BM", "LCM");
                if (list != null && list.Count > 0)
                {
                    IProductRepository currentProductRepository = RepositoryFactory.GetInstance().GetRepository<IProductRepository, IProduct>();
                    IList<ProductPart> partList = currentProductRepository.GetProductPartByBomNodeTypeAndPartSnLike(currentProduct.ProId, "KP", "C");

                    if (partList == null || partList.Count <= 0)
                    {
                        FisException ex;
                        List<string> erpara = new List<string>();
                        ex = new FisException("CHK948", erpara);
                        throw ex;

                    }

                }
            }
            
            return base.DoExecute(executionContext);
        }
开发者ID:wra222,项目名称:testgit,代码行数:36,代码来源:CheckLCMforRCTO.cs


示例13: deleteMB_Test

        public void deleteMB_Test(string code, string family, bool type)
        {
            IList<MBTestDef> lstMBtestDef = new List<MBTestDef>();
            lstMBtestDef = itestMB.GetMBTestByCodeFamilyAndType(code, family, type);
            try
            {

                if (lstMBtestDef == null || lstMBtestDef.Count <= 0)
                {   //已经不存在此testMb记录,不能删除
                    List<string> erpara = new List<string>();
                    FisException ex;
                    ex = new FisException("DMT114", erpara);
                    throw ex;
                }
                else
                {
                    itestMB.DeleteMBTest(code, family, type);
                }
            }
            catch (FisException e)
            {
                logger.Error(e.mErrmsg);
                throw e;
            }
            catch (Exception e)
            {
                logger.Error(e.Message);
                throw;
            }
        }
开发者ID:wra222,项目名称:testgit,代码行数:30,代码来源:TestMBManager.cs


示例14: DoExecute

        /// <summary>
        /// Check Product Is CleanRoom
        /// </summary>
        /// <param name="executionContext"></param>
        /// <returns></returns>
        protected internal override ActivityExecutionStatus DoExecute(ActivityExecutionContext executionContext)
        {
            var currentProduct = CurrentSession.GetValue(Session.SessionKeys.Product) as IProduct;
            if (currentProduct == null)
            {
                var ex1 = new FisException("SFC002", new string[] { "" });
                throw ex1;
            }

            CurrentSession.AddValue(CheckedResultVariable, "N");

            IProductRepository prodRep = RepositoryFactory.GetInstance().GetRepository<IProductRepository, IMES.FisObject.FA.Product.IProduct>();
          //  IList<ProductPart> pp = prodRep.GetProductPartByPartTypeLike(currentProduct.ProId, "Clean Room");
              IList<ProductPart> pp = prodRep.GetProductPartByPartTypeLike(currentProduct.ProId, "LCM");
            if (pp != null && pp.Count > 0)
            {
                IProduct cleanroomProduct = prodRep.GetProductByIdOrSn(pp[0].PartSn);
                if (cleanroomProduct != null)
                {
                    CurrentSession.AddValue(CheckedResultVariable, "Y");
                    CurrentSession.AddValue("Backup" + Session.SessionKeys.Product, currentProduct);
                    CurrentSession.AddValue(Session.SessionKeys.Product, cleanroomProduct);
                }
            }

            return base.DoExecute(executionContext);
        }
开发者ID:wra222,项目名称:testgit,代码行数:32,代码来源:CheckProductIsCleanRoom.cs


示例15: DoExecute

        /// <summary>
        /// 
        /// </summary>
        /// <param name="executionContext"></param>
        /// <returns></returns>
        protected internal override ActivityExecutionStatus DoExecute(ActivityExecutionContext executionContext)
        {
            string data = (string)CurrentSession.GetValue("DeliveryNo");
            IPizzaRepository repPizza = RepositoryFactory.GetInstance().GetRepository<IPizzaRepository, Pizza>();
            bool flag = false;            
            flag = repPizza.CheckExistPakDashPakComnByInternalID(data.Substring(0,10));

            if (flag == true)
            {
                CurrentSession.AddValue(Session.SessionKeys.VCode, "DN");
                CurrentSession.AddValue(Session.SessionKeys.DeliveryNo, data.Substring(0, 10));
                return base.DoExecute(executionContext);                
            }
            
            flag = repPizza.CheckExistVShipmentPakComnByConsolInvoiceOrShipment(data);
            if (flag == true)
            {
                CurrentSession.AddValue(Session.SessionKeys.VCode, "Shipment");
                return base.DoExecute(executionContext);                
            }
            
            CurrentSession.AddValue(Session.SessionKeys.VCode, "Unknown");
            List<string> errpara = new List<string>();
            errpara.Add(data);
            FisException ex = new FisException("CHK277", errpara);
            //ex.stopWF = false;
            throw ex;

        }        
开发者ID:wra222,项目名称:testgit,代码行数:34,代码来源:CheckInputForScaningList.cs


示例16: DoExecute

        /// <summary>
        /// check CUST SN是否为空或未产生
        /// </summary>
        /// <param name="executionContext"></param>
        /// <returns></returns>
        protected internal override ActivityExecutionStatus DoExecute(ActivityExecutionContext executionContext)
        {          
            Product curProduct = (Product)CurrentSession.GetValue(Session.SessionKeys.Product);

            PrintLog condition = new PrintLog();
            condition.Name = curProduct.Customer + "SNO";
            condition.BeginNo = curProduct.ProId;

            var repository = RepositoryFactory.GetInstance().GetRepository<IPrintLogRepository, PrintLog>();
            IList<PrintLog> printLogList = repository.GetPrintLogListByCondition(condition);

            FisException ex;
            List<string> erpara = new List<string>();
            if (printLogList.Count == 0)
            {
                erpara.Add(curProduct.ProId);
                ex = new FisException("CHK860", erpara);//此Product没有打印过,无需重印
                throw ex;
            }

            CurrentSession.AddValue(Session.SessionKeys.PrintLogName, curProduct.Customer + "SNO");
            CurrentSession.AddValue(Session.SessionKeys.PrintLogBegNo, curProduct.ProId);
            CurrentSession.AddValue(Session.SessionKeys.PrintLogEndNo, curProduct.ProId);
            CurrentSession.AddValue(Session.SessionKeys.PrintLogDescr, curProduct.CUSTSN);

            return base.DoExecute(executionContext);
        }
开发者ID:wra222,项目名称:testgit,代码行数:32,代码来源:CheckCUSTSNForDocking.cs


示例17: DoExecute

 /// <summary>
 /// 
 /// </summary>
 /// <param name="executionContext"></param>
 /// <returns></returns>
 protected internal override ActivityExecutionStatus DoExecute(ActivityExecutionContext executionContext)
 {            
     IDeliveryRepository DeliveryRepository = RepositoryFactory.GetInstance().GetRepository<IDeliveryRepository, Delivery>();
     string type = (string)CurrentSession.GetValue("Doc_type");
     IList<VShipmentPakComnInfo> comnList = (IList<VShipmentPakComnInfo>)CurrentSession.GetValue("ComnList");
     //ITC-1360-1089 "Pack List-Addition"->"Pack List- Addition"
     if (type == "Pack List- Addition" || type == "ALL")
     {
         IList<string> tList = new List<string>();
         foreach (VShipmentPakComnInfo temp in comnList)
         {
             tList.Add(temp.internalID);
         }
         string dn = (string)CurrentSession.GetValue(Session.SessionKeys.DeliveryNo);
         if (!DeliveryRepository.CheckExistPakPackkingData(tList))
         {
             FisException ex;
             List<string> erpara = new List<string>();
             erpara.Add(dn);
             ex = new FisException("CHK821", erpara);
             throw ex;
         }
     }
     return base.DoExecute(executionContext);
 }
开发者ID:wra222,项目名称:testgit,代码行数:30,代码来源:CheckBindForPL.cs


示例18: DeleteDefectCode

 /// <summary>
 /// 根据type,defect删除一条数据
 /// </summary>
 /// <param name="type"></param>
 /// <param name="defect"></param>
 public void DeleteDefectCode(string type, string defect)
 {
     try
     {
         IDefectRepository itemRepository = RepositoryFactory.GetInstance().GetRepository<IDefectRepository>();
         int count = itemRepository.CheckExistsRecord(defect);
         if (count <= 0)
         {
             //已经不存在具有相同的defectCode记录
             List<string> erpara = new List<string>();
             FisException ex;
             ex = new FisException("DMT119", erpara);
             throw ex;
         }
         else
         {
             IUnitOfWork unitWork = new UnitOfWork();
             Defect defectInfo = itemRepository.Find(defect);
             itemRepository.Remove(defectInfo, unitWork);
             unitWork.Commit();
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
开发者ID:wra222,项目名称:testgit,代码行数:32,代码来源:DefectMaintainManager.cs


示例19: DoExecute

        /// <summary>
        /// check label是否需要reprint
        /// </summary>
        /// <param name="executionContext"></param>
        /// <returns></returns>
        protected internal override ActivityExecutionStatus DoExecute(ActivityExecutionContext executionContext)
        {
            FisException ex;
            List<string> erpara = new List<string>();
            
            var repository = RepositoryFactory.GetInstance().GetRepository<IProductRepository, IProduct>();
            IProduct curProduct = (IProduct)CurrentSession.GetValue(Session.SessionKeys.Product);

            IModelRepository modelRep = RepositoryFactory.GetInstance().GetRepository<IModelRepository, Model>();
            Model curModel = modelRep.Find(curProduct.Model);

            string stage = curModel.GetAttribute("STAG");
            if (stage == "S")
            {
                erpara.Add(this.Key);
                ex = new FisException("CHK865", erpara);//此Product设置为在Master Label Print中打印Customer SN,打印请求无效,请Check
                throw ex;
            }
            else if (stage == "T")
            {   //如果STAG=T 检查 Master Label 是否打印(查找WC=59的记录)
                IList<ProductLog> logList = repository.GetProductLogs(curProduct.ProId, "59");
                if (logList.Count == 0)
                {
                    erpara.Add(this.Key);
                    ex = new FisException("CHK866", erpara);//机器需要贴附Master Label,请先去打印Master Label
                    throw ex;
                }
            }

            return base.DoExecute(executionContext);
        }
开发者ID:wra222,项目名称:testgit,代码行数:36,代码来源:BlockForCenerateCustSN.cs


示例20: DoExecute

        /// <summary>
        /// 
        /// </summary>
        /// <param name="executionContext"></param>
        /// <returns></returns>
        protected internal override ActivityExecutionStatus DoExecute(ActivityExecutionContext executionContext)
        {
            var productRepository = RepositoryFactory.GetInstance().GetRepository<IProductRepository, IProduct>();
           // IProduct currentProduct = null;
            RepairDefect defect = null;
            string ProductID = "";
            IProduct CurrentProduct = (IProduct)CurrentSession.GetValue(Session.SessionKeys.Product);
            defect = (RepairDefect)CurrentSession.GetValue(Session.SessionKeys.CurrentRepairdefect);
            if (defect == null)
            {
                List<string> errpara = new List<string>();

                errpara.Add("CurrentRepairdefect");
                FisException e = new FisException("CHK194", errpara);
                e.stopWF = this.IsStopWF;
                throw e;
            }
            // 0001494 用旧LCM CT 查询Product.CUSTSN,如果有值,才需要把新的LCM 更新到CUSTSN 栏位。
            if (productRepository.GetProductByIdOrSn(defect.OldPartSno) != null)
            {
                if (CurrentProduct == null)
                {
                    List<string> errpara = new List<string>();

                    errpara.Add(ProductID);
                    FisException e = new FisException("SFC002", errpara);
                    e.stopWF = this.IsStopWF;
                    throw e;
                }
                CurrentProduct.CUSTSN = defect.NewPartSno;

                productRepository.Update(CurrentProduct, CurrentSession.UnitOfWork);
            }
            return base.DoExecute(executionContext);
        }
开发者ID:wra222,项目名称:testgit,代码行数:40,代码来源:UpdateProductSNCLeanRoom.cs



注:本文中的FisException类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Fish类代码示例发布时间:2022-05-24
下一篇:
C# FirstFloor类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap