コード例 #1
0
        protected void AvailableShippingDetailsGrid_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                var currentShippingDetail = e.Row.DataItem as ShippingDetail;
                if (currentShippingDetail != null)
                {
                    var checkSelect = e.Row.FindControl("chkSelect") as CheckBox;
                    if (checkSelect != null && currentShippingDetail.Status != ShipmentStatus.Processing)
                    {
                        checkSelect.Enabled   = false;
                        checkSelect.CssClass += " not-clickable";
                        var beyondProcessingStatusSpan =
                            e.Row.FindControl("BeyondProcessingStatusSpan") as HtmlContainerControl;
                        if (beyondProcessingStatusSpan != null)
                        {
                            beyondProcessingStatusSpan.Visible = true;
                        }
                    }

                    var orderDetailIdLiteral = e.Row.FindControl("OrderDetailIdLiteral") as Literal;
                    if (orderDetailIdLiteral != null)
                    {
                        orderDetailIdLiteral.Text = OrderDetailId.ToString();
                    }
                }
            }
        }
コード例 #2
0
 public override int GetHashCode()
 {
     return(OrderDetailId.GetHashCode());
 }