/// <summary> /// 接口回滚方法 /// </summary> /// <returns>成功 1 失败 -1</returns> public long Rollback() { //{21105AAF-1A77-4614-9D13-C3F3233E8DE9} #region 旧代码-屏蔽 //if (this.pactCode == null) //{ // this.errMsg = "合同单位没有赋值"; // return -1; //} //if (this.medcaredInterface == null) //{ // int returnValue = this.GetInterfaceFromPact(this.pactCode); // if (returnValue == -1) // { // this.errMsg = this.medcaredInterface.ErrMsg; // return -1; // } //} //return this.medcaredInterface.Rollback(); #endregion ArrayList pactList = this.pactManager.QueryPactUnitAll(); if (pactList == null) { this.errMsg = "查找合同单位失败"; return(-1); } if (pactList.Count == 0) { this.errMsg = "合同单位未维护"; return(-1); } for (int i = 0; i < pactList.Count; i++) { Neusoft.HISFC.Models.Base.PactInfo nowPactCode = pactList[i] as Neusoft.HISFC.Models.Base.PactInfo; IMedcare myMedcare = null; if (this.interfaceHash.ContainsKey(nowPactCode.ID)) { myMedcare = (IMedcare)this.interfaceHash[nowPactCode.ID]; if (myMedcare != null) { if (myMedcare.Rollback() < 0) { return(-1); } } } } return(1); }
/// <summary> /// 接口提交方法 /// </summary> /// <returns>成功 1 失败 -1</returns> public long Commit() { //{7E721E47-0F64-4b43-8B42-36926A96D9CB} #region 旧代码-屏蔽 //if (this.pactCode == null) //{ // this.errMsg = "合同单位没有赋值"; // return -1; //} //if (this.medcaredInterface == null) //{ // int returnValue = this.GetInterfaceFromPact(this.pactCode); // if (returnValue == -1) // { // this.errMsg = this.medcaredInterface.ErrMsg; // return -1; // } //} //return this.medcaredInterface.Commit(); #endregion ArrayList pactList = this.pactManager.QueryPactUnitAll(); if (pactList == null) { this.errMsg = "查找合同单位失败"; return(-1); } if (pactList.Count == 0) { this.errMsg = "合同单位未维护"; return(-1); } for (int i = 0; i < pactList.Count; i++) { Neusoft.HISFC.Models.Base.PactInfo nowPactCode = pactList[i] as Neusoft.HISFC.Models.Base.PactInfo; IMedcare myMedcare = null; if (this.interfaceHash.ContainsKey(nowPactCode.ID)) { myMedcare = (IMedcare)this.interfaceHash[nowPactCode.ID]; if (myMedcare != null) { if (myMedcare.Commit() < 0) { return(-1); } } } } return(1); }