protected void EgvDeliverItem_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType == DataControlRowType.DataRow)
     {
         DeliverItemInfo dataItem = e.Row.DataItem as DeliverItemInfo;
         e.Row.Cells[1].Text = (dataItem.DeliverDirection == 1) ? "发货" : "<span style='color:#F00'>退货</span>";
         e.Row.Cells[6].Text = dataItem.Received ? "<span style='color:#F00'><strong>√</strong></span>" : "";
         Literal literal = (Literal)e.Row.FindControl("LitExpressCompony");
         if (dataItem.CourierId > 0)
         {
             literal.Text = this.GetExpressCompony(dataItem.CourierId);
         }
         if ((dataItem.DeliverDirection == 1) && !dataItem.Received)
         {
             e.Row.Cells[8].Enabled = true;
         }
         else
         {
             e.Row.Cells[8].Text = "";
         }
         Literal literal2 = (Literal)e.Row.FindControl("LitExpressNumber");
         literal2.Text = dataItem.ExpressNumber;
         Literal     literal3 = (Literal)e.Row.FindControl("LitExpressState");
         CourierInfo courier  = Courier.GetCourier(dataItem.CourierId);
         if (!string.IsNullOrEmpty(courier.SearchUrl))
         {
             literal3.Text = "<a href=" + courier.SearchUrl.Replace("{$ExpressNumber}", dataItem.ExpressNumber) + " Target=\"_Blank\">查看</a>";
         }
     }
 }
 public string GetExpressCompony(int courierId)
 {
     return(Courier.GetCourier(courierId).ShortName);
 }