SVN r345
SVN-Revision: r345
This commit is contained in:
@@ -205,6 +205,7 @@ namespace Lskj.PubProductSysMge
|
||||
{
|
||||
InitializeComponent();
|
||||
this.Model = model != null ? model : null;
|
||||
splitControlContainer.Panel1.BackColor = Color.White;
|
||||
}
|
||||
/// <summary>
|
||||
/// 初始化事件绑定
|
||||
@@ -508,6 +509,7 @@ namespace Lskj.PubProductSysMge
|
||||
// Check if the remaining text starts with 'select'
|
||||
return cleanedText.StartsWith("select", StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>说明:设置动态控件显示刷新</para>
|
||||
/// <para>创建人:唐德馨</para>
|
||||
@@ -520,10 +522,25 @@ namespace Lskj.PubProductSysMge
|
||||
/// <param name="where">The where key.</param>
|
||||
private void SetDynamicControl(TreeNode treeNode)
|
||||
{
|
||||
this.pl_Top.Controls.Clear();
|
||||
|
||||
splitControlContainer.Panel1.Controls.Remove(this.pl_Top);
|
||||
this.pl_Top.Dispose();
|
||||
this.pl_Top = new XtraScrollableControl();
|
||||
this.pl_Top.BackColor = Color.White;
|
||||
this.pl_Top.Dock = DockStyle.Fill;
|
||||
splitControlContainer.Panel1.Controls.Add(this.pl_Top);
|
||||
|
||||
//this.TopControlObj.ParentPanel.Dispose();
|
||||
//this.TopControlObj.ParentPanel = pl_Top;
|
||||
this.TopControlObj = new MyControl()
|
||||
{
|
||||
ParentPanel = this.pl_Top
|
||||
};
|
||||
|
||||
this.ControlList.Clear();
|
||||
try
|
||||
{
|
||||
if (projectComBoEdit.SelectedItem == "" || treeNode == null) return;
|
||||
string projectId = (projectComBoEdit.SelectedItem as ComboBoxModel).Value;
|
||||
if (treeNode != null && !string.IsNullOrEmpty(projectId))
|
||||
{
|
||||
@@ -565,6 +582,7 @@ namespace Lskj.PubProductSysMge
|
||||
labelAutoTextEdit.TextEdit.TextChanged += new EventHandler(OnTextEditTextChanged);
|
||||
//labelAutoTextEdit.ReadOnly = setModel.ProhibitEdited;
|
||||
baseControl = labelAutoTextEdit;
|
||||
|
||||
break;
|
||||
//多选框控件
|
||||
case "3":
|
||||
@@ -675,9 +693,12 @@ namespace Lskj.PubProductSysMge
|
||||
//thread.Start();
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
catch (Exception ex)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 延迟加载数据源
|
||||
@@ -1237,7 +1258,7 @@ namespace Lskj.PubProductSysMge
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(item.DisableCond))
|
||||
if (!string.IsNullOrWhiteSpace(item.DisableCond))
|
||||
{
|
||||
string disableCond = this.ReplaceControlValue(item.DisableCond.Replace("{" + model.DbName + "}", fieldValue));
|
||||
BaseUserControl control = FindControl(item.DbName);
|
||||
@@ -1248,7 +1269,7 @@ namespace Lskj.PubProductSysMge
|
||||
string requiredCond = this.ReplaceControlValue(item.RequiredCond.Replace("{" + model.DbName + "}", fieldValue));
|
||||
BaseUserControl control = FindControl(item.DbName);
|
||||
control.Required = ("true".Equals(ValidateCond(requiredCond, null) + "", StringComparison.OrdinalIgnoreCase));
|
||||
item.MustTig = control.Required?1:0;
|
||||
item.MustTig = control.Required ? 1 : 0;
|
||||
control.ReadOnly = control.Model.ReadOnly;//重新设置编辑状态可以改变必填颜色
|
||||
}
|
||||
|
||||
@@ -1607,18 +1628,20 @@ namespace Lskj.PubProductSysMge
|
||||
};
|
||||
this.projectComBoEdit.Properties.Items.Add(comboBoxModel);
|
||||
}
|
||||
|
||||
if (dataTable != null&& dataTable.Rows.Count>0)
|
||||
|
||||
if (dataTable != null && dataTable.Rows.Count > 0)
|
||||
{
|
||||
this.projectComBoEdit.SelectedIndex = 0;
|
||||
TreeNode[] foundNodes = this.treeLeftViewEx.TreeView.Nodes.Find(speciesNo, true);
|
||||
|
||||
if (foundNodes.Length > 0)
|
||||
if (foundNodes.Length > 0)
|
||||
{
|
||||
//this.treeLeftViewEx.TreeView.SelectedNode = foundNodes[0];
|
||||
this.SetDynamicControl(foundNodes[0]);
|
||||
}
|
||||
|
||||
//中间部分控件赋值
|
||||
this.MainControlObj.SetAllControlValue(focusRow);
|
||||
//上方控件赋值
|
||||
List<BaseUserControl> modelControls = this.pl_Top.Controls.Cast<BaseUserControl>().Where(n => !string.IsNullOrEmpty((n.Tag as SysSetModel).DbName)).OrderBy(n => (n.Tag as SysSetModel).OrderId).ToList();
|
||||
foreach (BaseUserControl item in modelControls)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user