我这样做是为了绑定两个存储过程。
存储过程返回表/列表数据。
var P1_PT_Pct_Thrown = pp.ppsproc_P1_PT_Pct_Thrown(_pid, _vs);
List<ppsproc_P1_PT_Pct_Thrown_Result> ptpt = null;
ptpt = new List<ppsproc_P1_PT_Pct_Thrown_Result>();
ppsproc_P1_PT_Pct_Thrown_Result pt = new ppsproc_P1_PT_Pct_Thrown_Result();
foreach (var p in P1_PT_Pct_Thrown)
{
pt.Years = p.Years;
pt.FB = p.FB;
pt.Cut = p.Cut;
pt.CB = p.CB;
pt.SL = p.SL;
pt.SP_CH = p.SP_CH;
pt.Other = p.Other;
ptpt.Add(pt);
}
这是第二张桌子
var P1_PT_Pct_Thrown = pp.ppsproc_P1_PT_Pct_Thrown(_pid, _vs);
List<ppsproc_P1_PT_Pct_Thrown_Result> ptpt = null;
ptpt = new List<ppsproc_P1_PT_Pct_Thrown_Result>();
ppsproc_P1_PT_Pct_Thrown_Result pt = new ppsproc_P1_PT_Pct_Thrown_Result();
foreach (var p in P1_PT_Pct_Thrown)
{
pt.Years = p.Years;
pt.FB = p.FB;
pt.Cut = p.Cut;
pt.CB = p.CB;
pt.SL = p.SL;
pt.SP_CH = p.SP_CH;
pt.Other = p.Other;
ptpt.Add(pt);
}
然后返回
var tuple = new Tuple<ppsproc_P1_PT_Pct_Thrown_Result, ppsproc_P1_PE_FB_Result>(ptpt, pefb);
return View(tuple);
我有错误:ptpt和pefb无效。
请帮忙。谢谢