SVN r1230
SVN-Revision: r1230
This commit is contained in:
@@ -6391,4 +6391,42 @@ namespace Lskj.Control.Model
|
||||
/// <param name="controlName"></param>
|
||||
public void SetBackgroundColor(string controlName)
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
BaseUserControl baseControl = FindControl(controlName);
|
||||
|
||||
if (baseControl == null) return;
|
||||
baseControl.BackgroundColor = ColorTranslator.FromHtml("#00FF00");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改默认值后,突出显示颜色
|
||||
/// </summary>
|
||||
/// <param name="controlName"></param>
|
||||
public void ModifiedDefaultValueHighlight(DataRow rowItem)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (rowItem == null) return;
|
||||
foreach (ControlModel model in this.ControlModels)
|
||||
{
|
||||
if (rowItem.Table.Columns.Contains(model.FieldName)&&!string.IsNullOrWhiteSpace(model.DefaultValue))
|
||||
{
|
||||
string DefaultValue = ReplaceHelper.ReplaceUserInfo(model.DefaultValue);
|
||||
if (!DefaultValue.Equals(rowItem[model.FieldName] + ""))
|
||||
{
|
||||
BaseUserControl baseControl = FindControl(model.FieldName);
|
||||
if (baseControl == null) continue;
|
||||
if (!model.ReadOnly)
|
||||
{
|
||||
baseControl.ForeColor = ColorTranslator.FromHtml("#FF0000");
|
||||
baseControl.ContentBold = true;
|
||||
}
|
||||
//else
|
||||
//{
|
||||
|
||||
Reference in New Issue
Block a user