Example #1
0
        /// <summary>
        /// 查询界面返回参数
        /// </summary>
        /// <param name="_lupFactoryRoom">工厂车间</param>
        /// <param name="_cmbGongXuName">工序名称</param>
        /// <param name="_lupJiaoBanShife">交接班次</param>
        /// <param name="_lupJieBanShife">接班班次</param>
        /// <param name="_timJiaoBanStart">交接时间起</param>
        /// <param name="_timJiaoBanEnd">交接时间末</param>
        /// <param name="_lupZhuangTai">状态</param>
        /// <param name="operations">用户拥有权限的工序</param>
        /// <param name="dt">工厂车间</param>
        /// <returns></returns>
        public DataSet GetOperationHandoverByReturn(string _lupFactoryRoom, string _cmbGongXuName, string _lupJiaoBanShife, string _lupJieBanShife,
                                                    string _timJiaoBanStart, string _timJiaoBanEnd, string _lupZhuangTai, string operations, DataTable dt)
        {
            DataSet dsOperationHandover = new DataSet();

            try
            {
                //创建远程调用的工厂对象。
                IServerObjFactory serverFactory = CallRemotingService.GetRemoteObject();
                if (null != serverFactory)//创建远程调用的工厂对象成功。
                {
                    //调用远程方法,并处理远程方法的执行结果。
                    dsOperationHandover = serverFactory.CreateIOperationHandoverEngine().GetOperationHandoverByReturn(_lupFactoryRoom, _cmbGongXuName, _lupJiaoBanShife, _lupJieBanShife, _timJiaoBanStart, _timJiaoBanEnd, _lupZhuangTai, operations, dt);
                    _errorMsg           = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(dsOperationHandover);
                }
            }
            catch (Exception ex)
            {
                _errorMsg = ex.Message;
            }
            finally
            {
                CallRemotingService.UnregisterChannel();
            }
            return(dsOperationHandover);
        }
Example #2
0
        public DataSet GetFacKeyByFacName(string facName)
        {
            DataSet dsFacKey = new DataSet();

            try
            {
                //创建远程调用的工厂对象。
                IServerObjFactory serverFactory = CallRemotingService.GetRemoteObject();
                if (null != serverFactory)//创建远程调用的工厂对象成功。
                {
                    //调用远程方法,并处理远程方法的执行结果。
                    dsFacKey  = serverFactory.CreateIOperationHandoverEngine().GetFacKeyByFacName(facName);
                    _errorMsg = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(dsFacKey);
                }
            }
            catch (Exception ex)
            {
                _errorMsg = ex.Message;
            }
            finally
            {
                CallRemotingService.UnregisterChannel();
            }
            return(dsFacKey);
        }
Example #3
0
        /// <summary>
        /// 交班后更新工序交接班内容
        /// </summary>
        /// <param name="dsSetIn1"></param>
        public bool UpdateHandOver(DataSet dsSetIn1)
        {
            DataSet dsRerurn;

            try
            {//创建远程调用的工厂对象。
                IServerObjFactory serverFactory = CallRemotingService.GetRemoteObject();

                if (serverFactory != null)
                {//调用远程方法,并处理远程方法的执行结果。
                    dsRerurn  = serverFactory.CreateIOperationHandoverEngine().UpdateHandOver(dsSetIn1);
                    _errorMsg = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(dsRerurn);
                    //执行失败。
                    if (_errorMsg != string.Empty)
                    {
                        return(false);
                    }
                    return(true);
                }
            }
            catch (Exception ex)
            {
                MessageService.ShowError(ex);
                return(false);
            }
            finally
            {
                CallRemotingService.UnregisterChannel();
            }
            return(false);
        }
Example #4
0
        /// <summary>
        /// 获取上一班的交接记录
        /// </summary>
        /// <param name="shift">当前班次</param>
        /// <param name="operation">工序名称</param>
        /// <param name="factRoom">工厂主键</param>
        /// <returns></returns>
        public DataSet GetShangYiBanHandOver(string shift, string operation, string factRoom)
        {
            DataSet dsShangBanShift = new DataSet();

            try
            {
                //创建远程调用的工厂对象。
                IServerObjFactory serverFactory = CallRemotingService.GetRemoteObject();
                if (null != serverFactory)//创建远程调用的工厂对象成功。
                {
                    //调用远程方法,并处理远程方法的执行结果。
                    dsShangBanShift = serverFactory.CreateIOperationHandoverEngine().GetShangYiBanHandOver(shift, operation, factRoom);
                    _errorMsg       = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(dsShangBanShift);
                }
            }
            catch (Exception ex)
            {
                _errorMsg = ex.Message;
            }
            finally
            {
                CallRemotingService.UnregisterChannel();
            }
            return(dsShangBanShift);
        }
Example #5
0
        /// <summary>
        /// 根据上一工序交接班主键获取上一工序交接班的期末数量插入到新生成的数据中的期初数量
        /// </summary>
        /// <param name="handDangqianOverKey">当前工序交接班主键</param>
        /// <param name="handOverKey">上一工序交接班主键</param>
        public void InsertMatWipQiChu(string handDangqianOverKey, string handOverKey)
        {
            DataSet dsRerurn;

            try
            {//创建远程调用的工厂对象。
                IServerObjFactory serverFactory = CallRemotingService.GetRemoteObject();

                if (serverFactory != null)
                {//调用远程方法,并处理远程方法的执行结果。
                    dsRerurn  = serverFactory.CreateIOperationHandoverEngine().InsertMatWipQiChu(handDangqianOverKey, handOverKey);
                    _errorMsg = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(dsRerurn);
                }
            }
            catch (Exception ex)
            {
                MessageService.ShowError(ex);
            }
            finally
            {
                CallRemotingService.UnregisterChannel();
            }
        }