SVN r272
SVN-Revision: r272
This commit is contained in:
@@ -670,8 +670,9 @@ namespace Lskj.PubProductSysMge
|
||||
x += baseControl.Width + 15;
|
||||
}
|
||||
}
|
||||
Thread thread = new Thread(SetControlDataSource);
|
||||
thread.Start();
|
||||
SetControlDataSource();
|
||||
//Thread thread = new Thread(SetControlDataSource);
|
||||
//thread.Start();
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
@@ -1424,7 +1425,7 @@ namespace Lskj.PubProductSysMge
|
||||
string newBillNo = focusRow["productid"] + "";
|
||||
string primaryKey = BaseImpl.GetBasePrimaryKey(this.Model.ModuleCode);
|
||||
ControlModel model = this.MainControlObj._models.FirstOrDefault(x => x.FieldName == primaryKey);
|
||||
string parentValue = this.treeLeftViewEx.TreeView.SelectedNode.Name;
|
||||
string parentValue = focusRow["speciesNo"] + "";// this.treeLeftViewEx.TreeView.SelectedNode.Name;
|
||||
//string newBillNo = BaseImpl.GetDefaultValue(model.Default, parentValue);
|
||||
List<string> keyList = new List<string>() { "speciesno", "operatorname", "operatedate", "smartbmfa" };
|
||||
StringBuilder sqlBuilder = new StringBuilder();
|
||||
@@ -1515,7 +1516,7 @@ namespace Lskj.PubProductSysMge
|
||||
}
|
||||
MessageUtil.Show(ResourceKeys.SaveSuccess);
|
||||
string where = null;
|
||||
string nodeName = this.treeLeftViewEx.TreeView.SelectedNode.Name;
|
||||
string nodeName = focusRow["speciesNo"] + ""; //this.treeLeftViewEx.TreeView.SelectedNode.Name;
|
||||
if (string.IsNullOrWhiteSpace(this.ParentUnionField))
|
||||
{
|
||||
where = string.Format(" and {0} = N'{1}'", this.treeLeftViewEx.TreeNodeKeyField, nodeName);
|
||||
@@ -1572,16 +1573,17 @@ namespace Lskj.PubProductSysMge
|
||||
WaitForm.ShowForm();
|
||||
try
|
||||
{
|
||||
if (this.treeLeftViewEx.TreeView.SelectedNode.Nodes.Count > 0)
|
||||
{
|
||||
MessageUtil.Show("请选择根节点");
|
||||
return;
|
||||
}
|
||||
//if (this.treeLeftViewEx.TreeView.SelectedNode.Nodes.Count > 0)
|
||||
//{
|
||||
// MessageUtil.Show("请选择根节点");
|
||||
// return;
|
||||
//}
|
||||
DataRow focusRow = this.gcMain.GridView.GetFocusedDataRow();
|
||||
if (focusRow == null) return;
|
||||
string primaryVlaue = focusRow["productid"] + "";
|
||||
DataRow selectSource = MainImpl.GetDataRowResult(string.Format("select * from p_producttab where productid = '{0}'", primaryVlaue));
|
||||
string projectId = selectSource["SmartBmFa"] + "";
|
||||
string speciesNo = selectSource["speciesNo"] + "";
|
||||
if (string.IsNullOrEmpty(projectId))
|
||||
{
|
||||
MessageUtil.Show("该档案未通过智能编码生成,不支持智能编码修改");
|
||||
@@ -1592,10 +1594,31 @@ namespace Lskj.PubProductSysMge
|
||||
this.btnSave.Enabled = true;
|
||||
return;
|
||||
}
|
||||
ComboBoxModel selectItem = this.projectComBoEdit.Properties.Items.Cast<ComboBoxModel>().Where(n => n.Value.Equals(projectId)).FirstOrDefault();
|
||||
if (selectItem != null)
|
||||
//获取选中行对应的方案
|
||||
DataTable dataTable = MainImpl.GetDataTableResult(string.Format("select id,ItemName from p_productsyssetGrouptab where id = '{0}' and speciesNo='{1}'", projectId, speciesNo));
|
||||
this.projectComBoEdit.Text = "";
|
||||
this.projectComBoEdit.Properties.Items.Clear();
|
||||
foreach (DataRow item in dataTable.Rows)
|
||||
{
|
||||
this.projectComBoEdit.SelectedItem = selectItem;
|
||||
ComboBoxModel comboBoxModel = new ComboBoxModel(item)
|
||||
{
|
||||
ValueMember = "id",
|
||||
DisplayMember = "ItemName",
|
||||
};
|
||||
this.projectComBoEdit.Properties.Items.Add(comboBoxModel);
|
||||
}
|
||||
|
||||
if (dataTable != null&& dataTable.Rows.Count>0)
|
||||
{
|
||||
this.projectComBoEdit.SelectedIndex = 0;
|
||||
TreeNode[] foundNodes = this.treeLeftViewEx.TreeView.Nodes.Find(speciesNo, true);
|
||||
|
||||
if (foundNodes.Length > 0)
|
||||
{
|
||||
//this.treeLeftViewEx.TreeView.SelectedNode = foundNodes[0];
|
||||
this.SetDynamicControl(foundNodes[0]);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
@@ -1615,7 +1638,7 @@ namespace Lskj.PubProductSysMge
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageUtil.Show($"当前节点下不存在方案{projectId}");
|
||||
MessageUtil.Show($"不存在方案{projectId}");
|
||||
this.MainControlObj.ResetControlValue();
|
||||
TreeNode treeNode = this.treeLeftViewEx.TreeView.SelectedNode;
|
||||
SetDynamicControl(treeNode);
|
||||
@@ -1981,33 +2004,4 @@ namespace Lskj.PubProductSysMge
|
||||
/// <summary>
|
||||
/// <para>说明:检查可用条件</para>
|
||||
/// <para>创建人:龚宇超</para>
|
||||
/// <para>创建日期:2017-11-09 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <param name="cond">The cond.</param>
|
||||
/// <param name="dataRow">The data row.</param>
|
||||
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
|
||||
private bool ValidateCond(string cond, DataRow dataRow)
|
||||
{
|
||||
bool result = false;
|
||||
cond = ReplaceHelper.ReplaceRowParam(dataRow, cond);
|
||||
if (cond.StartsWith("@") || cond.StartsWith("!"))
|
||||
{
|
||||
result = "1".Equals(BaseImpl.GetDefaultValue(cond));
|
||||
}
|
||||
else if (dataRow == null)
|
||||
{
|
||||
result = ReplaceHelper.EvalCond(cond);
|
||||
}
|
||||
else
|
||||
{
|
||||
result = ReplaceHelper.ReplaceRowParamCond(dataRow, cond);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
/// <para>创建日期:2017-
|
||||
Reference in New Issue
Block a user