日期:2014-05-20 浏览次数:20884 次
string check = "<a href='CheckBillsOfLading.aspx?id={0}' >校验提货单>></a>";
string checkLading = "<a href='CheckBillsOfLading.aspx?id={0}'>查看提单</a>";
string ApplyBack = "<a href='ApplyBack.aspx?id={0}' >申请AA>></a>";
string EitPrice = "<a href='EitPrice.aspx?id={0}'>AA价修改</a>";
string BuybackDelivery = "<a href='Buyback.aspx?id={0}' >申请CC></a><br/><a href='Delivery.aspx?id={0}' >申请交割></a>"; //卖家111
var result = from m in Mtinfolist
select new
{
m.ID,
m.GoodsName,
m.Price,
m.Num,
m.BUserId,
m.State,
m.CreateTime,
DIS = m.StateNum == 5 ? string.Format(check,m.ID) : (m.StateNum==12?string.Format(ApplyBack,m.ID):(m.StateNum==11?string.Format(EitPrice,m.ID): string.Format(checkLading,m.ID)))
Dictionary<int,string> dic=new Dictionary<int,string>();
dic.Add(5,"<a href='CheckBillsOfLading.aspx?id={0}' >校验提货单>></a>");
DIS?=dic.ContainsKey(m.StateNum)? string.Format(dic[m.StateNum],m.ID):"";