public void Write <R>(IDataOutput <R> o) where R : IDataOutput <R> { int count = reader.FieldCount; for (int i = 0; i < count; i++) { string name = reader.GetName(i); uint oid = reader.GetDataTypeOID(i); if (reader.IsDBNull(i)) { o.PutNull(name); continue; } if (oid == 1043 || oid == 1042) { o.Put(name, reader.GetString(i)); } else if (oid == 790) // money { o.Put(name, reader.GetDecimal(i)); } } }
public void Write <R>(IDataOutput <R> o, int proj = 0x00ff) where R : IDataOutput <R> { o.Put(nameof(host), host); o.Put(nameof(port), port); o.Put(nameof(database), database); o.Put(nameof(username), username); o.Put(nameof(password), password); }
public void Write <R>(IDataOutput <R> o, int proj = 0x00ff) where R : IDataOutput <R> { o.Put(nameof(name), name, "品名"); o.Group("数量"); o.Put(nameof(qty), qty); o.Put(nameof(unit), unit); o.UnGroup(); o.Put(nameof(price), price, "单价"); }
public void Write <R>(IDataOutput <R> o, int proj = 0x00ff) where R : IDataOutput <R> { o.Group("商家"); o.Put(nameof(shopid), shopid); o.Put(nameof(shop), shop); o.UnGroup(); o.Put(nameof(till), till, "截至日期"); o.Put(nameof(orders), orders, "订单数"); o.Put(nameof(total), total, "订单总额"); o.Put(nameof(cash), cash, "转款金额"); if ((proj & PAYING) == PAYING) { o.Group("转款操作"); o.Put(nameof(paid), paid); o.Put(nameof(payer), payer); o.UnGroup(); o.Put(nameof(err), err, "出错提示"); } o.Put((string)(string)(string)nameof(status), status, (string)(string)(string)"状态", STATUS); }
public void Write <R>(IDataOutput <R> o, int proj = 0x00ff) where R : IDataOutput <R> { o.Put(nameof(id), id); o.Put(nameof(name), name); o.Put(nameof(shard), shard); o.Put(nameof(arg), arg); o.Put(nameof(type), type); o.Put(nameof(body), body); o.Put(nameof(time), time); }
public void Write <R>(IDataOutput <R> o, int proj = 0x00ff) where R : IDataOutput <R> { if ((proj & BASIC) == BASIC) { if ((proj & BASIC_SHOPID) == BASIC_SHOPID) { o.Put(nameof(shopid), shopid); } o.Put(nameof(name), name, label: "品名"); o.Put(nameof(descr), descr, label: "描述"); if ((proj & BASIC_ICON) == BASIC_ICON) { o.Put(nameof(icon), icon, label: "照片"); } o.Put(nameof(unit), unit, label: "单位"); o.Put(nameof(price), price, label: "单价"); o.Put(nameof(min), min, label: "起订数量"); o.Put(nameof(step), step, label: "递增因子"); o.Put(nameof(qty), qty, label: "本批供应量"); } o.Put((string)nameof(status), status, (string)"状态", STATUS); }
public void Write <R>(IDataOutput <R> o, int proj = 0x00ff) where R : IDataOutput <R> { o.Put(nameof(shard), shard); o.Put(nameof(addrs), addrs); o.Put(nameof(db), db); o.Put(nameof(cluster), cluster); o.Put(nameof(logging), logging); o.Put(nameof(cache), cache); }
public void Write <R>(IDataOutput <R> o, int proj = 0x00ff) where R : IDataOutput <R> { if (msgs != null && msgs.Length > 0) { int start = msgs.Length - NUM; if (start < 0) { start = 0; } for (int i = start; i < msgs.Length; i++) { ChatMsg msg = msgs[i]; o.Put(nameof(msg.name), msg.text, msg.name); } } }
public void Write <R>(IDataOutput <R> o) where R : IDataOutput <R> { for (int i = 0; i < Count; i++) { JMbr mbr = this[i]; JType t = mbr.type; if (t == JType.Array) { o.Put(mbr.Name, (JArr)mbr); } else if (t == JType.Object) { o.Put(mbr.Name, (JObj)mbr); } else if (t == JType.String) { o.Put(mbr.Name, (string)mbr); } else if (t == JType.Number) { o.Put(mbr.Name, (JNumber)mbr); } else if (t == JType.True) { o.Put(mbr.Name, true); } else if (t == JType.False) { o.Put(mbr.Name, false); } else if (t == JType.Null) { o.PutNull(mbr.Name); } } }
public void Write <R>(IDataOutput <R> o, int proj = 0x00ff) where R : IDataOutput <R> { if ((proj & ID) == ID) { o.Put(nameof(id), id, "编号"); } if ((proj & BASIC) == BASIC) { o.Put(nameof(name), name, "名称"); o.Put(nameof(descr), descr, "简语"); if ((proj & BASIC_ICON) == BASIC_ICON) { o.Put(nameof(icon), icon, "照片"); } o.Put(nameof(tel), tel, "电话"); o.Put(nameof(city), city, "城市"); o.Put(nameof(distr), distr, "区县"); o.Put(nameof(addr), addr, "地址"); } if ((proj & SUPER) == SUPER) { o.Put(nameof(lic), lic, "工商登记"); o.Put(nameof(created), created, "创建时间"); o.Group("经理"); o.Put(nameof(mgrid), mgrid); if ((proj & SUPER_WX) == SUPER_WX) { o.Put(nameof(mgrwx), mgrwx); } o.Put(nameof(mgr), mgr); o.UnGroup(); } o.Put(nameof(status), status, "状态", STATUS); }
public void Write <R>(IDataOutput <R> o, int proj = 0x00ff) where R : IDataOutput <R> { if ((proj & WX) == WX) { o.Put(nameof(wx), wx); } o.Put(nameof(name), name, "用户名称"); o.Put(nameof(city), city, "城市"); o.Put(nameof(distr), distr, "区划"); o.Put(nameof(addr), addr, "街道/地址"); o.Put(nameof(tel), tel, "电话"); if ((proj & CREATTED) == CREATTED) { o.Put(nameof(created), created); } if ((proj & BACKEND) != 0) { o.Put(nameof(id), id, "后台帐号"); if ((proj & CREDENTIAL) == CREDENTIAL) { o.Put(nameof(credential), credential); } } if ((proj & PERM) == PERM) { o.Put(nameof(oprat), oprat, "所在商家"); o.Put(nameof(opr), opr, "操作权限", OPR); o.Put(nameof(sprat), sprat, "区域监督"); o.Put(nameof(adm), adm, "平台管理"); } }
public void Write <R>(IDataOutput <R> o, int proj = 0x00ff) where R : IDataOutput <R> { if ((proj & ID) == ID) { o.Put(nameof(id), id, "订单编号"); } if ((proj & BASIC) == BASIC) { o.Put(nameof(created), created, "创建时间"); o.Group("商家"); o.Put(nameof(shop), shop); o.Put(nameof(shopid), shopid); o.UnGroup(); o.Put(nameof(buyer), buyer, "买家"); if ((proj & BASIC_WX) == BASIC_WX) { o.Put(nameof(wx), wx); } o.Group("收货地址"); o.Put(nameof(city), city); o.Put(nameof(distr), distr); o.Put(nameof(addr), addr); o.UnGroup(); o.Put(nameof(tel), tel, "联系电话"); if ((proj & BASIC_DETAIL) == BASIC_DETAIL) { o.Put(nameof(detail), detail); } o.Put(nameof(note), note, "附加说明"); o.Put(nameof(total), total, "应付金额", '¥'); } if ((proj & CASH) == CASH) { o.Put(nameof(cash), cash, "实收金额", '¥'); } if ((proj & FLOW) == FLOW) { o.Put(nameof(accepted), accepted, "接受时间"); o.Put(nameof(coshopid), coshopid, "受托商家"); o.Group("撤销"); o.Put(nameof(abortion), abortion); o.Put(nameof(aborted), aborted); o.UnGroup(); o.Put(nameof(shipped), shipped, "确收时间"); } o.Put(nameof(status), status, "订单状态", STATUS); }
public void Write <R>(IDataOutput <R> o, int proj = 0x00ff) where R : IDataOutput <R> { o.Put(nameof(code), code); o.Put(nameof(name), name); o.Put(nameof(distrs), distrs); }
public void Write <R>(IDataOutput <R> o, int proj = 0x00ff) where R : IDataOutput <R> { o.Put(nameof(name), name); o.Put(nameof(text), text); }