public void DeleteResource() { DataSet dsReturn = new DataSet(); try { IServerObjFactory serverFactory = CallRemotingService.GetRemoteObject(); if (null != serverFactory) { dsReturn = serverFactory.CreateIResourceEngine().DeleteResource(_resourceKey); _errorMsg = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(dsReturn); } } catch (Exception ex) { _errorMsg = ex.Message; } finally { CallRemotingService.UnregisterChannel(); } }
/// <summary> /// 通过分档代码获取对应的分档规则 /// </summary> /// <param name="powerSetCode">分档代码</param> /// <returns>分档代码对应的功率分档的集合</returns> public DataSet GetPowerSetByPowerSetCode(string powerSetCode, string partMinPower, string partMaxPower) { DataSet dsReturn = new DataSet(); try { //调用远程对象 IServerObjFactory factor = CallRemotingService.GetRemoteObject(); dsReturn = factor.CreateIWorkOrders().GetPowerSetByPowerSetCode(powerSetCode, partMinPower, partMaxPower); _errorMsg = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(dsReturn); } catch (Exception e) { _errorMsg = e.Message; } finally { //注销通道 CallRemotingService.UnregisterChannel(); } return(dsReturn); }
//工单打印信息 public DataTable GetWoPrint(string orderNumber) { DataSet dsReturn = new DataSet(); try { //调用远程对象 IServerObjFactory factor = CallRemotingService.GetRemoteObject(); dsReturn = factor.CreateIWorkOrders().GetWoPrint(orderNumber); _errorMsg = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(dsReturn); } catch (Exception e) { _errorMsg = e.Message; } finally { //注销通道 CallRemotingService.UnregisterChannel(); } return(dsReturn.Tables[0]); }
/// <summary> /// 通过主产品料号获取工单对应的料号信息 /// </summary> /// <param name="mainPartNumber">主产品料号</param> /// <returns>工单对应的料号信息</returns> public DataSet GetPartNumberByMainPartNumber(string mainPartNumber) { DataSet dsPartNumber = new DataSet(); try { //调用远程对象 IServerObjFactory factor = CallRemotingService.GetRemoteObject(); dsPartNumber = factor.CreateIWorkOrders().GetPartNumberByMainPartNumber(mainPartNumber); _errorMsg = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(dsPartNumber); } catch (Exception e) { _errorMsg = e.Message; } finally { //注销通道 CallRemotingService.UnregisterChannel(); } return(dsPartNumber); }
/// <summary> /// 对工单对应的产品信息进行保存 /// </summary> /// <param name="workOrderProInfo">工单对应的产品信息的集合</param> /// <returns>操作结果</returns> public DataSet SaveWorkOrderProInfo(DataSet workOrderProInfo) { DataSet dsReturn = new DataSet(); try { //调用远程对象 IServerObjFactory factor = CallRemotingService.GetRemoteObject(); dsReturn = factor.CreateIWorkOrders().SaveWorkOrderProInfo(workOrderProInfo); _errorMsg = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(dsReturn); } catch (Exception e) { _errorMsg = e.Message; } finally { //注销通道 CallRemotingService.UnregisterChannel(); } return(dsReturn); }
/// <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); }
/// <summary> /// 根据工厂车间名称获取工单号 /// </summary> /// <param name="roomName">车间名称</param> /// <returns>包含工单号信息的数据集。</returns> public DataSet GetWorkOrderByFactoryRoom(string roomName) { DataSet retDS = new DataSet(); try { //调用远程对象 IServerObjFactory factor = CallRemotingService.GetRemoteObject(); retDS = factor.CreateIWorkOrders().GetWorkOrderByFactoryRoom(roomName); _errorMsg = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(retDS); } catch (Exception e) { _errorMsg = e.Message; } finally { //注销通道 CallRemotingService.UnregisterChannel(); } return(retDS); }
public void InsertPrintInf(string number, string name) { DataSet dsReturn = new DataSet(); try { IServerObjFactory serverFactory = CallRemotingService.GetRemoteObject(); if (null != serverFactory) { dsReturn = serverFactory.CreateIWarehouseEngine().InsertPrintInf(number, name); _errorMsg = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(dsReturn); } } catch (Exception ex) { _errorMsg = ex.Message; } finally { CallRemotingService.UnregisterChannel(); } }
/// <summary> /// 绑定已有的原因代码数据。 /// </summary> public void ListCategoryBind() { string msg = string.Empty; DataSet dsReturn = new DataSet(); //远程调用 IServerObjFactory serverFactory = CallRemotingService.GetRemoteObject(); if (serverFactory != null) { dsReturn = serverFactory.CreateIReasonCodeEngine().GetReasonCategory(categoryKey); msg = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(dsReturn); if (msg != string.Empty) { MessageService.ShowError(msg); } else { lbxCategory.DataSource = dsReturn.Tables[FMM_REASON_CODE_FIELDS.DATABASE_TABLE_NAME]; } } CallRemotingService.UnregisterChannel(); }
/// <summary> /// Validate param name exist or not /// </summary> public bool ParamNameValidate() { try { string msg = string.Empty; DataSet dsReturn = null; IServerObjFactory factor = CallRemotingService.GetRemoteObject(); if (null != factor) { dsReturn = factor.CreateIParamEngine().GetDistinctParamName(); msg = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(dsReturn); if (msg != string.Empty) { MessageService.ShowError(msg); } else { foreach (DataRow dataRow in dsReturn.Tables[BASE_PARAMETER_FIELDS.DATABASE_TABLE_NAME].Rows) { if (_paramName == dataRow[BASE_PARAMETER_FIELDS.FIELD_PARAM_NAME].ToString()) { return(false); } } } } } catch (Exception ex) { MessageService.ShowError(ex); } finally { CallRemotingService.UnregisterChannel(); } return(true); }
public string GetPrivilegeOfUser() { string privileges = ""; try { IServerObjFactory serverFactory = CallRemotingService.GetRemoteObject(); if (null != serverFactory) { DataSet dsReturn = new DataSet(); dsReturn = serverFactory.CreateIUserEngine().GetPrivilegeOfUser(_userKey); if (dsReturn.Tables.Count > 0) { for (int i = 0; i < dsReturn.Tables[0].Rows.Count; i++) { if (i == 0) { privileges = dsReturn.Tables[0].Rows[i]["PRIVILEGE_CODE"].ToString(); } else { privileges = privileges + "," + dsReturn.Tables[0].Rows[i]["PRIVILEGE_CODE"].ToString(); } } } _errorMsg = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(dsReturn); } } catch (Exception ex) { _errorMsg = ex.Message; } finally { CallRemotingService.UnregisterChannel(); } return(privileges); }
/// <summary> /// Validate reason code category name exist or not /// </summary> public bool CodeCategoryNameValidate() { try { string msg = string.Empty; DataSet dsReturn = null; IServerObjFactory factor = CallRemotingService.GetRemoteObject(); if (null != factor) { dsReturn = factor.CreateIReasonCodeEngine().GetDistinctReasonCodeCategoryName(); msg = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(dsReturn); if (msg != string.Empty) { MessageService.ShowError(msg); } else { foreach (DataRow dataRow in dsReturn.Tables[0].Rows) { if (_codeCategoryName == dataRow[FMM_REASON_CODE_CATEGORY_FIELDS.FIELD_REASON_CODE_CATEGORY_NAME].ToString()) { return(false); } } } } } catch (Exception ex) { MessageService.ShowError(ex); } finally { CallRemotingService.UnregisterChannel(); } return(true); }
/// <summary> /// Search button click /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btSearch_Click(object sender, EventArgs e) { Hashtable mainDataHashTable = new Hashtable(); DataSet dataSet = new DataSet(); mainDataHashTable.Add(FMM_PRODUCTION_LINE_FIELDS.FIELD_LINE_NAME, this.txtAttributeName.Text.Trim()); DataTable mainDataTable = FanHai.Hemera.Share.Common.CommonUtils.ParseToDataTable(mainDataHashTable); mainDataTable.TableName = FMM_PRODUCTION_LINE_FIELDS.DATABASE_TABLE_NAME; dataSet.Tables.Add(mainDataTable); //Call Remoting Service try { IServerObjFactory factor = CallRemotingService.GetRemoteObject(); if (null != factor) { DataSet retDS = factor.CreateIUdaCommonControlEx().SearchLineAttribute(dataSet); string returnMessage = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(retDS); if (null == returnMessage || returnMessage.Length > 0) { MessageService.ShowError(returnMessage); } else { BindDataSourceToGrid(retDS.Tables[FMM_PRODUCTION_LINE_FIELDS.DATABASE_TABLE_NAME]); } } } catch (Exception ex) { MessageService.ShowError(ex); } finally { CallRemotingService.UnregisterChannel(); } }
/// <summary>通过领料单号判定领料单号是否已经存在 /// 通过领料单号判定领料单号是否已经存在 /// </summary> /// <param name="number">领料单号</param> /// <returns>数量的数据集</returns> public DataSet GetCountByNumToCheck(string number, int flag) { DataSet dsReturn = new DataSet(); try { IServerObjFactory serverFactory = CallRemotingService.GetRemoteObject(); if (null != serverFactory) { dsReturn = serverFactory.CreateIMaterialReqOrReturnEngine().GetCountByNumToCheck(number, flag); _errorMsg = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(dsReturn); } } catch (Exception ex) { _errorMsg = ex.Message; } finally { CallRemotingService.UnregisterChannel(); } return(dsReturn); }
public DataSet GetContainerDetailInf(string key) { DataSet dsReturn = new DataSet(); try { IServerObjFactory serverFactory = CallRemotingService.GetRemoteObject(); if (null != serverFactory) { dsReturn = serverFactory.CreateIGroupArkEngine().GetContainerDetailInf(key); _errorMsg = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(dsReturn); } } catch (Exception ex) { _errorMsg = ex.Message; } finally { CallRemotingService.UnregisterChannel(); } return(dsReturn); }
public DataSet QueryInfHaveArked(string _teEntryNo, string _lciStatus) { DataSet dsReturn = new DataSet(); try { IServerObjFactory serverFactory = CallRemotingService.GetRemoteObject(); if (null != serverFactory) { dsReturn = serverFactory.CreateIGroupArkEngine().QueryInfHaveArked(_teEntryNo, _lciStatus); _errorMsg = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(dsReturn); } } catch (Exception ex) { _errorMsg = ex.Message; } finally { CallRemotingService.UnregisterChannel(); } return(dsReturn); }
//Q.0031 public DataSet GetTableAvData(string strControlCode, string pointkeys) { DataSet dsReturn = new DataSet(); try { IServerObjFactory serverObj = CallRemotingService.GetRemoteObject(); if (serverObj != null) { dsReturn = serverObj.CreateISpcEngine().GetTableAvData(strControlCode, pointkeys); _errorMsg = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(dsReturn); } } catch (Exception ex) { _errorMsg = ex.Message; } finally { CallRemotingService.UnregisterChannel(); } return(dsReturn); }
/// <summary> /// 撤销操作(UndoOUTEDC)时,Spc相应操作 /// </summary> /// <param name="transactionKey"></param> /// <returns></returns> public bool DeleteParamData(string transactionKey) { try { IServerObjFactory serverFactory = CallRemotingService.GetRemoteObject(); DataSet dsReturn = serverFactory.CreateISpcEngine().DeleteParamData(transactionKey); _errorMsg = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(dsReturn); if (_errorMsg.Length > 0) { throw new Exception(_errorMsg); } } catch (Exception ex) { MessageService.ShowError(ex.Message); return(false); } finally { CallRemotingService.UnregisterChannel(); } return(true); }
//public DataSet GetSpcParams() //{ // DataSet dsParams = null; // try // { // IServerObjFactory serverObj = CallRemotingService.GetRemoteObject(); // dsParams=serverObj.CreateISpcEngine().GetParams(); // _errorMsg = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(dsParams); // } // catch (Exception ex) // { // _errorMsg = ex.Message; // } // return dsParams; //} //public DataSet SearchParams() //{ // DataSet dsReturn = new DataSet(); // try // { // DataSet dataSet = new DataSet(); // Hashtable paramHashTable = new Hashtable(); // if (_paramName.Length > 0) // { // paramHashTable.Add(BASE_PARAMETER_FIELDS.FIELD_PARAM_NAME, _paramName); // } // DataTable paramDataTable = FanHai.Hemera.Share.Common.CommonUtils.ParseToDataTable(paramHashTable); // paramDataTable.TableName = BASE_PARAMETER_FIELDS.DATABASE_TABLE_NAME; // dataSet.Tables.Add(paramDataTable); // IServerObjFactory serverFactory = CallRemotingService.GetRemoteObject(); // if (serverFactory != null) // { // dsReturn = serverFactory.CreateISpcEngine().SearchParam(dataSet); // _errorMsg = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(dsReturn); // } // } // catch (Exception ex) // { // _errorMsg = ex.Message; // } // finally // { // CallRemotingService.UnregisterChannel(); // } // return dsReturn; //} //public bool SaveParams(DataSet dataSet) //{ // bool bReturn = true; // try // { // DataSet dsReturn = new DataSet(); // IServerObjFactory serverObj=CallRemotingService.GetRemoteObject(); // dsReturn = serverObj.CreateISpcEngine().SaveParams(dataSet); // _errorMsg = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(dsReturn); // if (_errorMsg.Length > 0) // { // bReturn = false; // MessageService.ShowError(_errorMsg); // } // } // catch (Exception ex) // { // bReturn = false; // MessageService.ShowError(ex.Message); // } // return bReturn; //} #endregion /// <summary> /// 保存抽检界面数据保存时,spc相应操作。 /// </summary> /// <param name="dataset">包含SPC数据的数据集对象。</param> /// <returns>true:保存成功。false:保存失败。</returns> public bool SaveParamData(DataSet dataset) { try { IServerObjFactory serverFactory = CallRemotingService.GetRemoteObject(); DataSet dsReturn = serverFactory.CreateISpcEngine().SaveParamData(dataset); _errorMsg = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(dsReturn); if (!string.IsNullOrEmpty(_errorMsg)) { return(false); } } catch (Exception ex) { _errorMsg = ex.Message; return(false); } finally { CallRemotingService.UnregisterChannel(); } return(true); }
/// <summary> /// 查询获取数据 /// </summary> /// <returns></returns> public DataSet GetSupplierCode(string strSupplierName, string strSupplierCode) { DataSet dsReturn = new DataSet(); try { IServerObjFactory serverFactory = CallRemotingService.GetRemoteObject(); if (null != serverFactory) { dsReturn = serverFactory.CreateISupplierEngine().GetSupplierCode(strSupplierName, strSupplierCode); _errorMsg = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(dsReturn); } } catch (Exception ex) { _errorMsg = ex.Message; } finally { CallRemotingService.UnregisterChannel(); } return(dsReturn); }
public DataSet GetInfByWOnumberAndPartID(string _orderNumner, string _partName) { DataSet dsReturn = new DataSet(); try { IServerObjFactory serverFactory = CallRemotingService.GetRemoteObject(); if (null != serverFactory) { dsReturn = serverFactory.CreateINameplateLabelPrintEngine().GetInfByWOnumberAndPartID(_orderNumner, _partName); _errorMsg = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(dsReturn); } } catch (Exception ex) { _errorMsg = ex.Message; } finally { CallRemotingService.UnregisterChannel(); } return(dsReturn); }
/// <summary> /// 取得角色有权限或者没有权限的机台状态 /// </summary> /// <param name="type"></param> /// <returns></returns> public DataSet GetStatusOfRole(string type)//add by qym 20120605 Q.001 { DataSet dsReturn = new DataSet(); try { IServerObjFactory serverFactory = CallRemotingService.GetRemoteObject(); if (null != serverFactory) { dsReturn = serverFactory.CreateIPrivilegeEngine().GetStatusOfRole(_roleKey, type); _errorMsg = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(dsReturn); } } catch (Exception ex) { _errorMsg = ex.Message; } finally { CallRemotingService.UnregisterChannel(); } return(dsReturn); }
/// <summary> /// 根据工单,物料代码,批次号 获取已经领料的信息 /// </summary> /// <param name="workorder">工单号</param> /// <param name="mat">物料号</param> /// <param name="charg">批次号</param> /// <returns></returns> public DataSet GetMaterialstTui(string workorder, string mat, string num) { DataSet dsReturn = new DataSet(); try { IServerObjFactory serverFactory = CallRemotingService.GetRemoteObject(); if (null != serverFactory) { dsReturn = serverFactory.CreateIMaterialReqOrReturnEngine().GetMaterialstTui(workorder, mat, num); _errorMsg = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(dsReturn); } } catch (Exception ex) { _errorMsg = ex.Message; } finally { CallRemotingService.UnregisterChannel(); } return(dsReturn); }
/// <summary> /// 获取序列号打印的详细信息 /// </summary> /// <param name="lotNumber"></param> /// <param name="dateStart"></param> /// <param name="dateEnd"></param> /// <param name="printerNo"></param> /// <returns></returns> public DataSet GetPrintInf(string lotNumber, string dateStart, string dateEnd, string printerNo) { DataSet dsReturn = new DataSet(); try { IServerObjFactory serverFactory = CallRemotingService.GetRemoteObject(); if (null != serverFactory) { dsReturn = serverFactory.CreateILotNumPrintEngine().GetPrintInf(lotNumber, dateStart, dateEnd, printerNo); _errorMsg = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(dsReturn); } } catch (Exception ex) { _errorMsg = ex.Message; } finally { CallRemotingService.UnregisterChannel(); } return(dsReturn); }
/// <summary>创建领料单 /// 创建领料单 /// </summary> /// <param name="dsIn">领料单抬头和明细信息</param> /// <returns></returns> public DataSet CreateRequistionKoPo(DataSet dsIn) { DataSet dsReturn = new DataSet(); try { IServerObjFactory serverFactory = CallRemotingService.GetRemoteObject(); if (null != serverFactory) { dsReturn = serverFactory.CreateIMaterialReqOrReturnEngine().CreateRequistionKoPo(dsIn); _errorMsg = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(dsReturn); } } catch (Exception ex) { _errorMsg = ex.Message; } finally { CallRemotingService.UnregisterChannel(); } return(dsReturn); }
public DataSet GetLineDataSetOfUser() { DataSet dsLines = new DataSet(); try { IServerObjFactory serverObjFactory = CallRemotingService.GetRemoteObject(); if (null != serverObjFactory) { dsLines = serverObjFactory.CreateIUserEngine().GetLineOfUser(_userKey); _errorMsg = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(dsLines); } } catch (Exception ex) { _errorMsg = ex.Message; } finally { CallRemotingService.UnregisterChannel(); } return(dsLines); }
public DataSet GetOperationOwnedByRole() { DataSet dsReturn = new DataSet(); try { IServerObjFactory serverFactory = CallRemotingService.GetRemoteObject(); if (null != serverFactory) { dsReturn = serverFactory.CreateIPrivilegeEngine().GetOperationOwnedByRole(_roleKey); _errorMsg = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(dsReturn); } } catch (Exception ex) { _errorMsg = ex.Message; } finally { CallRemotingService.UnregisterChannel(); } return(dsReturn); }
public DataSet GetExchangeWoData(DataSet reqDS, int pageNo, int pageSize, out int pages, out int records, Hashtable hstable) { DataSet dsReturn = new DataSet(); pages = 0; records = 0; try { _errorMsg = string.Empty; IServerObjFactory serverFactory = CallRemotingService.GetRemoteObject(); dsReturn = serverFactory.CreateIExchangeWoEngine().GetExchangeWoData(reqDS, pageNo, pageSize, out pages, out records, hstable); _errorMsg = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(dsReturn); } catch (Exception ex) { _errorMsg = ex.Message; } finally { CallRemotingService.UnregisterChannel(); } return(dsReturn); }
/// <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(); } }
//获取托信息 public DataSet GetHighInfByLotNum(string strLotNum) { DataSet dsReturn = new DataSet(); try { IServerObjFactory serverFactory = CallRemotingService.GetRemoteObject(); if (null != serverFactory) { dsReturn = serverFactory.CreateIHighOfSFinishedProductsEngine().GetHighInfByLotNum(strLotNum); _errorMsg = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(dsReturn); } } catch (Exception ex) { _errorMsg = ex.Message; } finally { CallRemotingService.UnregisterChannel(); } return(dsReturn); }