public static DocTransform Deserialize(dynamic _reader) { DocTransform transform = new DocTransform(_reader.ReadInt32()); int iOpCount = _reader.ReadInt32(); List <DocOp> lOps = new List <DocOp>(); for (int iOp = 0; iOp < iOpCount; iOp++) { DocOpType opType = (DocOpType)_reader.ReadByte(); switch (opType) { case DocOpType.Insert: lOps.Add(DocOp.Insert(_reader.ReadUInt16(), _reader.ReadInt32(), (char)_reader.ReadUInt16())); break; case DocOpType.Delete: lOps.Add(DocOp.Delete(_reader.ReadUInt16(), _reader.ReadInt32())); break; } } transform.Append(lOps); return(transform); }
public virtual object Exec <T>(T data, DocOpType type = DocOpType.None) { if (type == DocOpType.None) { throw new ArgumentException("操作类型为空,无法处理"); } return(GlobalInstanceManager <SqlManager> .Intance.GetRimsDataTablebyProc <T>("usp_rims_wx_" + type.ToString().ToLower(), data)); }
public object Exec <T>(DocOpType type, T obj) { try { DocBaseExecInteraface jk = new DocBaseExecInteraface(); return(DataParserManager.ToObject(DataParserManager.ToJson(jk.Exec <T>(obj, type)))); } catch (Exception ex) { LogManager.Error(ex.Message, ex); throw; } }