public static BizIndex CopyFromBizMQ(BizMQ mq) { if (mq == null || string.IsNullOrEmpty(mq.Id) || Guid.Parse(mq.Id).Equals(Guid.Empty)) return null; BizIndex ret = new BizIndex(); foreach (System.Reflection.PropertyInfo pi in ret.GetType().GetProperties()) { object value = mq.GetType().GetProperty(pi.Name).GetValue(mq); if(value!=null) pi.SetValue(ret, value); } return ret; }