public PedidoJson getJson(String fromStatus, String toStatus, String[] tipos) { PedidoJson json = new PedidoJson(); json.fromStatus = fromStatus; json.toStatus = toStatus; json.OrTy01 = GetValueOrEmpty(tipos, 1); json.OrTy02 = GetValueOrEmpty(tipos, 2); json.OrTy03 = GetValueOrEmpty(tipos, 3); json.OrTy04 = GetValueOrEmpty(tipos, 4); json.OrTy05 = GetValueOrEmpty(tipos, 5); json.OrTy06 = GetValueOrEmpty(tipos, 6); json.OrTy07 = GetValueOrEmpty(tipos, 7); json.OrTy08 = GetValueOrEmpty(tipos, 8); json.OrTy09 = GetValueOrEmpty(tipos, 9); json.OrTy10 = GetValueOrEmpty(tipos, 10); json.OrTy11 = GetValueOrEmpty(tipos, 11); json.OrTy12 = GetValueOrEmpty(tipos, 12); json.OrTy13 = GetValueOrEmpty(tipos, 13); json.OrTy14 = GetValueOrEmpty(tipos, 14); return(json); }
public String JsonToString(PedidoJson obj) { var json = JsonConvert.SerializeObject(obj); return(json); }