using System; using System.Collections.Generic; using System.Linq; using System.Text; //using MediII.Adapter.BaseBiz; using MediII.Common; using Microsoft.Practices.EnterpriseLibrary.Data; using MediII.Adapter.BizComponent.Base; namespace MediII.Adapter.BizComponent.MFN { public class BizComponent_MFN : BaseBizComponent, IBizComponent { //数据库连接 protected Database ctx { get { return base.ctx; } } public override string DoProcess(string m,string msgType) { try { try { //根据不同的类型再分开不同的类处理 MFNBase processor = MFNBase.GetProcessor("MFN^Z2B", ctx);// int result = processor.Process(m); return string.Empty; //string ack = SetACK(m, "ACK", mType, "ACK"); //return ack; } catch (Exception ex) { if (ex.InnerException == null) { return ex.Message; } else { return ex.Message + " InnerException:" + ex.InnerException.Message; } } } catch (Exception ex) { //var tmp = ex.EntityValidationErrors.FirstOrDefault().ValidationErrors; //string errString = ""; //foreach (var item in tmp) //{ // errString += item.ErrorMessage; //} //string ack = SetACK(m, "ACK", mType, "ACK", ex.EntityValidationErrors.ToString()); //throw new Exception(string.Format("{0}\r\n{1}", ex.EntityValidationErrors.ToString())); return ex.Message; } } } }