/// <summary> /// 初始化数据 /// </summary> /// <returns></returns> //public DataSet GetSupplierCode() //{ // DataSet dsReturn = new DataSet(); // try // { // IServerObjFactory serverFactory = CallRemotingService.GetRemoteObject(); // if (null != serverFactory) // { // dsReturn = serverFactory.CreateISupplierEngine().GetSupplierCode(); // _errorMsg = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(dsReturn); // } // } // catch (Exception ex) // { // _errorMsg = ex.Message; // } // finally // { // CallRemotingService.UnregisterChannel(); // } // return dsReturn; //} /// <summary> /// 删除 /// </summary> /// <returns></returns> public override bool Delete() { if (_workOrderNum != string.Empty && _mat != string.Empty && _paramerTeam != string.Empty) { //Call Remoting Service try { IServerObjFactory factor = CallRemotingService.GetRemoteObject(); if (null != factor) { string msg = string.Empty; DataSet dsReturn = factor.CreateISpecialMatTeamEngine().DeleteMatSpecialInf(_workOrderNum, _mat, _paramerTeam); 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); }
public override bool Update(string keyNum) { DataSet dataSet = new DataSet(); //Add basic data DataTable codeTable = DataTableHelper.CreateDataTableForUpdateSpecialMatTeam(); Dictionary <string, string> dataRow = new Dictionary <string, string>() { { "ORDER_NUMBER", _workOrderNum }, { "MATERIAL_CODE", _mat }, { "DESCRIPTION", _matDesc }, { "MATKL", _paramerTeam } }; FanHai.Hemera.Utils.Common.Utils.AddRowDataToDataTable(ref codeTable, dataRow); dataSet.Tables.Add(codeTable); try { int code = 0; string msg = string.Empty; DataSet dsReturn = null; IServerObjFactory factor = CallRemotingService.GetRemoteObject(); if (null != factor) { dsReturn = factor.CreateISpecialMatTeamEngine().UpdateSpecialMatTeam(dataSet, keyNum); msg = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(dsReturn, ref code); if (code == -1) { MessageService.ShowError(msg); return(false); } this.ResetDirtyList(); MessageService.ShowMessage("保存成功", "保存"); //操作成功! } } catch (Exception ex) { MessageService.ShowError(ex); } finally { CallRemotingService.UnregisterChannel(); } return(true); }
public DataSet GetParamerTeam() { DataSet dsReturn = new DataSet(); try { IServerObjFactory serverFactory = CallRemotingService.GetRemoteObject(); if (null != serverFactory) { dsReturn = serverFactory.CreateISpecialMatTeamEngine().GetParamerTeam(); _errorMsg = FanHai.Hemera.Share.Common.ReturnMessageUtils.GetServerReturnMessage(dsReturn); } } catch (Exception ex) { _errorMsg = ex.Message; } finally { CallRemotingService.UnregisterChannel(); } return(dsReturn); }