Exemplo n.º 1
0
 public bool Delete(string partId)
 {
     if (partId != string.Empty)
     {
         //Call Remoting Service
         try
         {
             IServerObjFactory factor = CallRemotingService.GetRemoteObject();
             if (null != factor)
             {
                 string  msg      = string.Empty;
                 DataSet dsReturn = factor.CreateIByProductPartEngine().Delete(partId);
                 msg = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(dsReturn);
                 if (msg != string.Empty)
                 {
                     MessageService.ShowError(msg);
                     return(false);
                 }
                 else
                 {
                     MessageService.ShowMessage("${res:Global.SuccessMessage}", "${res:Global.SystemInfo}");  //系统提示删除成功
                 }
             }
         }
         catch (Exception)
         {
         }
         finally
         {
             CallRemotingService.UnregisterChannel();
         }
     }
     return(true);
 }
Exemplo n.º 2
0
        public DataSet GetByPartId()
        {
            DataSet dsReturn = new DataSet();

            try
            {
                IServerObjFactory serverFactory = CallRemotingService.GetRemoteObject();
                if (null != serverFactory)
                {
                    dsReturn  = serverFactory.CreateIByProductPartEngine().GetByPartId();
                    _errorMsg = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(dsReturn);
                }
            }
            catch (Exception ex)
            {
                _errorMsg = ex.Message;
            }
            finally
            {
                CallRemotingService.UnregisterChannel();
            }
            return(dsReturn);
        }
Exemplo n.º 3
0
        public DataSet GetByFourParameters(string partId, string partType, string partModule, string partClass, ref PagingQueryConfig pconfig)
        {
            DataSet dsReturn = new DataSet();

            try
            {
                IServerObjFactory serverFactory = CallRemotingService.GetRemoteObject();
                if (null != serverFactory)
                {
                    dsReturn  = serverFactory.CreateIByProductPartEngine().GetByFourParameters(partId, partType, partModule, partClass, ref pconfig);
                    _errorMsg = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(dsReturn);
                }
            }
            catch (Exception ex)
            {
                _errorMsg = ex.Message;
            }
            finally
            {
                CallRemotingService.UnregisterChannel();
            }
            return(dsReturn);
        }
Exemplo n.º 4
0
        public DataSet GetInfFromPorPartAndProductPart(string name, string partNum, DataTable dtGvlist)
        {
            DataSet dsReturn = new DataSet();

            try
            {
                IServerObjFactory serverFactory = CallRemotingService.GetRemoteObject();
                if (null != serverFactory)
                {
                    dsReturn  = serverFactory.CreateIByProductPartEngine().GetInfFromPorPartAndProductPart(name, partNum, dtGvlist);
                    _errorMsg = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(dsReturn);
                }
            }
            catch (Exception ex)
            {
                _errorMsg = ex.Message;
            }
            finally
            {
                CallRemotingService.UnregisterChannel();
            }
            return(dsReturn);
        }