Juestree 2014-09-12 06:48 采纳率: 0%
浏览 881

在绑定GridView数据的时候发现有一个字段的值无法绑定

问题如上

if (e.Row.RowType == DataControlRowType.DataRow && e.Row.DataItem != null)
{
Ali0rderModel orderModel = e.Row.DataItem as Ali0rderModel;
if (null != orderModel)
{
Label lblVersionType = e.Row.FindControl("lblVersionType") as Label;
Label lblOrderID = e.Row.FindControl("lblOrderID") as Label;
Label lblProviderFlg = e.Row.FindControl("lblProviderFlg") as Label;
Label lblBeginDate = e.Row.FindControl("lblBeginDate") as Label;
Label lblCompanyName = e.Row.FindControl("lblCompanyName") as Label;
Label lblEndDate = e.Row.FindControl("lblEndDate") as Label;
Label lblLogType = e.Row.FindControl("lblLogType") as Label;
Label lblIsCancel = e.Row.FindControl("lblIsCancel") as Label;
Label lblAverageTime = e.Row.FindControl("lblAverageTime") as Label;
Label lblLogUser = e.Row.FindControl("lblLogUser") as Label;
Label lblWrongMsg = e.Row.FindControl("lblWrongMsg") as Label;
List orderlogList = orderlogBLL.GetModelList("orderid=" + orderModel.OrderId + " and IsActive=1");
AliOrderInfoModel orderInfo = orderinfoBLL.GetModel(orderModel.OrderId);
if (null != lblOrderID)
{
lblOrderID.Text = orderModel.OrderId.ToString();
}
if (null != lblProviderFlg)
{
if (orderModel.ProviderFlg != 1)
{
lblProviderFlg.Text = "中供";
}
else
{
lblProviderFlg.Text = "GGS";
}
}
if (null != lblCompanyName)
{
lblCompanyName.Text = orderInfo.CompnayChineseName;
}
if (null != lblBeginDate)
{
lblBeginDate.Text = orderModel.ModifiedDate.ToString();
}
if (null != lblEndDate)
{
lblEndDate.Text = orderModel.FinishDate.ToString();
}
if (null != lblLogType)
{
switch (orderlogList[0].LogType)
{
case 0:
lblLogType.Text = "新订单";
break;
case 4:
lblLogType.Text = "认证完成";
break;
case 20:
lblLogType.Text = "指派中文录入人员进行录入";
break;
case 21:
lblLogType.Text = "中文录入完成提交";
break;
case 22:
lblLogType.Text = "中文审核开始审核";
break;
case 23:
lblLogType.Text = "中文审核完成提交";
break;
case 24:
lblLogType.Text = "英文录入人员开始录入";
break;
case 25:
lblLogType.Text = "报告开始进行终审";
break;
case 26:
lblLogType.Text = "审核退单中文录入";
break;
case 27:
lblLogType.Text = "审核退单中文录入完成";
break;
case 28:
lblLogType.Text = "审核退单英文录入";
break;
case 29:
lblLogType.Text = "审核推到英文录入完成";
break;
}
}
//判断操作人
if (null != lblLogUser)
{
string person = "";
if (String.IsNullOrEmpty(person))
{
person = orderModel.BAName;
}
else
{
person = person + "," + orderModel.BAName;
}
if (String.IsNullOrEmpty(person))
{
person = orderModel.AuditName;
}
else
{
person = person + "," + orderModel.AuditName;
}
if (String.IsNullOrEmpty(person))
{
person = orderModel.TranslatorName;
}
else
{
person = person + "," + orderModel.TranslatorName;
}
lblLogUser.Text = person;

            }
            //判断是否取消
            if (null != lblIsCancel)
            {
                if (orderModel.IsCancel != true)
                {
                    lblIsCancel.Text = "否";
                }
                else
                {
                    lblIsCancel.Text = "是";
                }
            }
            //错误备注
            if (null != lblWrongMsg)
            {
                IList<ALI_OrderProblemMemoModel> pList = bll.GetModelList(orderModel.OrderId, "problem", false);
                if (pList.Count > 0)
                {
                    lblWrongMsg.Text = pList[0].RecordContent;
                }
            }

            认证版本
            if (null != lblVersionType)
            {
                if (String.IsNullOrEmpty(orderModel.VType))
                {

                    lblVersionType.Text = "查不到数据";
                }
                else
                {
                    lblVersionType.Text = orderModel.VType;
                }
            }
        }
    }
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 oracle集群安装出bug
    • ¥15 关于#python#的问题:自动化测试
    • ¥20 问题请教!vue项目关于Nginx配置nonce安全策略的问题
    • ¥15 教务系统账号被盗号如何追溯设备
    • ¥20 delta降尺度方法,未来数据怎么降尺度
    • ¥15 c# 使用NPOI快速将datatable数据导入excel中指定sheet,要求快速高效
    • ¥15 再不同版本的系统上,TCP传输速度不一致
    • ¥15 高德地图2.0 版本点聚合中Marker的位置无法实时更新,如何解决呢?
    • ¥15 DIFY API Endpoint 问题。
    • ¥20 sub地址DHCP问题