日期:2014-05-17 浏览次数:20773 次
/// <summary>
/// 预算资料管理
/// </summary>
/// <param name="DM"></param>
/// <param name="Name"></param>
/// <returns></returns>
public List<sfyhzlk> GetList(string DM, string Name)
{
db = new SWCWContext();
var v = db.sfyhzlks.Where(o => o.States == true);
if (DM != null && DM != string.Empty)
{
try
{
int a = Convert.ToInt32(DM);
v = v.Where(o => o.id == a);
}
catch { }
}
if (Name != null && Name != string.Empty)
{
try
{
int a = Convert.ToInt32(Name);
v = v.Where(o => o.id == a);
}
catch { }
}
return v.OrderBy(o=>o.sfyhdm).ToList();
}