在数据库中字段不区分大小写,可以页面是区分的,一开始以为不区分,可我从数据库查出了数据在前台就是不显示想了半天才发现的。
<sdk:DataGrid FrozenColumnCount ="1" Margin="0,0,0,0" Name="dgList" AutoGenerateColumns="False" IsReadOnly="True" GridLinesVisibility="All" ClipboardCopyMode="IncludeHeader" SelectedIndex="0" LoadingRow="dgList_LoadingRow" CopyingRowClipboardContent="dgList_CopyingRowClipboardContent">
<sdk:DataGrid.Columns>
<sdk:DataGridTemplateColumn Header="序号" Width="55" IsReadOnly="True" ClipboardContentBinding="{Binding Path=HHYT___SN}" CanUserReorder="False" CanUserResize="False" CanUserSort="False">
<sdk:DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<sdk:Label Content="序号" HorizontalAlignment="Center" IsEnabled="False" />
</DataTemplate>
</sdk:DataGridTemplateColumn.CellTemplate>
</sdk:DataGridTemplateColumn>
<sdk:DataGridTextColumn Header="项目编码" Width="Auto" Binding="{Binding Path=PROJECT_CODE}" CanUserReorder="True" CanUserResize="True" CanUserSort="True" />
<sdk:DataGridTextColumn Header="项目名称" Width="Auto" Binding="{Binding Path=PROJECT_NAME}" CanUserReorder="True" CanUserResize="True" CanUserSort="True" />
<sdk:DataGridTextColumn Header="项目负责人" Width="Auto" Binding="{Binding Path=PROJECT_LEADER}" CanUserReorder="True" CanUserResize="True" CanUserSort="True" />
<sdk:DataGridTextColumn Header="是否分包" Width="Auto" Binding="{Binding Path=PACKAGE_FLAG_CN}" CanUserReorder="True" CanUserResize="True" CanUserSort="True" />
<sdk:DataGridTextColumn Header="是否可用" Width="Auto" Binding="{Binding Path=ENABLE_FLAG_CN}" CanUserReorder="True" CanUserResize="True" CanUserSort="True" />
<sdk:DataGridTextColumn Header="计划状态" Width="Auto" Binding="{Binding Path=STATE_CN}" CanUserReorder="True" CanUserResize="True" CanUserSort="True" />
<sdk:DataGridTextColumn Header="备注" Width="Auto" Binding="{Binding Path=REMARK}" CanUserReorder="True" CanUserResize="True" CanUserSort="True" />
</sdk:DataGrid.Columns>