예제 #1
0
 /// <summary>
 /// 根据工步主键获取工步数据。
 /// </summary>
 /// <param name="stepKey">工步主键。</param>
 /// <param name="dctype">数据采集时刻。</param>
 /// <returns>包含工步数据的数据集对象。</returns>
 public DataSet GetStepBaseDataAndParamDataByKey(string stepKey, OperationParamDCType dctype)
 {
     try
     {
         this.ErrorMsg = string.Empty;
         IServerObjFactory factor   = CallRemotingService.GetRemoteObject();
         DataSet           dsReturn = factor.CreateIRouteEngine().GetStepBaseDataAndParamDataByKey(stepKey, (int)dctype);
         this.ErrorMsg = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(dsReturn);
         return(dsReturn);
     }
     catch (Exception ex)
     {
         this.ErrorMsg = ex.Message;
         LoggingService.Error(this.ErrorMsg, ex);
     }
     finally
     {
         CallRemotingService.UnregisterChannel();
     }
     return(null);
 }
예제 #2
0
        /// <summary>
        /// 获取指定工步采集参数对应的工单参数设定数据。用于比对在采集时输入的数据是否符合工单参数设定。
        /// </summary>
        /// <param name="workorderKey">工单主键。</param>
        /// <param name="stepKey">工步主键。</param>
        /// <param name="dcType">数据采集时刻。0:进站时采集 1:出站时采集</param>
        /// <returns>包含工单参数设定数据的数据集对象。</returns>
        public DataSet GetWorkOrderParam(string workorderKey, string stepKey, OperationParamDCType dcType)
        {
            DataSet dsReturn = new DataSet();

            try
            {
                //调用远程对象
                IServerObjFactory factor = CallRemotingService.GetRemoteObject();
                dsReturn       = factor.CreateIWorkOrders().GetWorkOrderParam(workorderKey, stepKey, (int)dcType);
                this._errorMsg = ReturnMessageUtils.GetServerReturnMessage(dsReturn);
            }
            catch (Exception e)
            {
                this._errorMsg = e.Message;
            }
            finally
            {
                //注销通道
                CallRemotingService.UnregisterChannel();
            }
            return(dsReturn);
        }