SVN r1104
SVN-Revision: r1104
This commit is contained in:
@@ -156,7 +156,10 @@ namespace Lskj.Control.Model
|
||||
///单据特殊模块id(单据来源控件)
|
||||
/// </summary>
|
||||
public string BillSourceControlId = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
///特殊左侧表
|
||||
/// </summary>
|
||||
public GridControlEx SpecialLeftTable;
|
||||
|
||||
/// <summary>
|
||||
/// 执行查询之前验证
|
||||
@@ -859,6 +862,10 @@ namespace Lskj.Control.Model
|
||||
{
|
||||
return BaseImpl.GetDefaultValue(item["defaultValue"] + "", ParentKey, OtherParams);
|
||||
}));
|
||||
Task<string> LookupSqlTask = cachesDic.AddTask(item, "LookupSql", new Task<string>(() =>
|
||||
{
|
||||
return BaseImpl.SpecialReplacement(item["lookupSql"] + "", OtherParams);
|
||||
}));
|
||||
Task<ControlModel> controlModelTask = cachesDic.AddTask(item, "ControlModel", new Task<ControlModel>(() =>
|
||||
{
|
||||
ControlModel controlModel = GetControlModel(item);//获取控件对象
|
||||
@@ -1255,6 +1262,10 @@ namespace Lskj.Control.Model
|
||||
{
|
||||
return BaseImpl.GetDefaultValue(item["defaultValue"] + "", ParentKey, OtherParams);
|
||||
}));
|
||||
Task<string> LookupSqlTask = cachesDic.AddTask(item, "LookupSql", new Task<string>(() =>
|
||||
{
|
||||
return BaseImpl.SpecialReplacement(item["lookupSql"] + "", OtherParams);
|
||||
}));
|
||||
Task<ControlModel> controlModelTask = cachesDic.AddTask(item, "ControlModel", new Task<ControlModel>(() =>
|
||||
{
|
||||
ControlModel controlModel = GetControlModel(item);//获取控件对象
|
||||
@@ -1693,7 +1704,7 @@ namespace Lskj.Control.Model
|
||||
/// </summary>
|
||||
/// <param name="rowItem">The row item.</param>
|
||||
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
|
||||
public void CopyControlValue(bool refreshSearchSource = false)
|
||||
public void CopyControlValue(bool Association = true,bool refreshSearchSource = false)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -1759,15 +1770,19 @@ namespace Lskj.Control.Model
|
||||
}
|
||||
}
|
||||
|
||||
foreach (ControlModel model in this.ControlModels)
|
||||
if (Association)
|
||||
{
|
||||
BaseUserControl control = FindControl(model);
|
||||
// 树结构节点不清空数据
|
||||
if (control != null && model.FieldType != ControlType.LabTreeType)
|
||||
foreach (ControlModel model in this.ControlModels)
|
||||
{
|
||||
this.SetUnionAncCalcControl(control);
|
||||
BaseUserControl control = FindControl(model);
|
||||
// 树结构节点不清空数据
|
||||
if (control != null && model.FieldType != ControlType.LabTreeType)
|
||||
{
|
||||
this.SetUnionAncCalcControl(control);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -4018,7 +4033,14 @@ namespace Lskj.Control.Model
|
||||
model.Sign = item.Table.Columns.Contains("TM_tagID") && !string.IsNullOrEmpty(item["TM_tagID"] + "") ? Convert.ToInt32(item["TM_tagID"] + "") : 0;
|
||||
model.TextMember = item["lookupResult"] + "";
|
||||
model.ValueMember = item["lookupKeyField"] + "";
|
||||
model.SourceSql = item["lookupSql"] + "";
|
||||
|
||||
|
||||
if (!dataCaches.GetValue(item, "LookupSql", out string lookupSql))
|
||||
{
|
||||
lookupSql=BaseImpl.SpecialReplacement(item["lookupSql"] + "",OtherParams);
|
||||
}
|
||||
//model.SourceSql = item["lookupSql"] + "";
|
||||
model.SourceSql = lookupSql;
|
||||
model.NullText = item.Table.Columns.Contains("InputHintText") ? item["InputHintText"] + "" : string.Empty;
|
||||
model.TabOrder = item.Table.Columns.Contains("TabOrder") && !string.IsNullOrEmpty(item["TabOrder"] + "") ? Convert.ToInt32(item["TabOrder"] + "") : 0;
|
||||
model.CalcExpr = item.Table.Columns.Contains("CalcExpr") ? item["CalcExpr"] + "" : string.Empty;
|
||||
@@ -4186,6 +4208,7 @@ namespace Lskj.Control.Model
|
||||
{
|
||||
dateEdit.TextEdit.Properties.VistaCalendarViewStyle = DevExpress.XtraEditors.VistaCalendarViewStyle.YearView;
|
||||
}
|
||||
|
||||
baseControl = dateEdit;
|
||||
break;
|
||||
case ControlType.LabComboxValue:
|
||||
@@ -5459,6 +5482,24 @@ namespace Lskj.Control.Model
|
||||
}
|
||||
|
||||
}
|
||||
if (SpecialLeftTable != null)
|
||||
{
|
||||
GridView gridview = SpecialLeftTable.GridControl.DefaultView as GridView;
|
||||
DataRow rowItem = gridview.GetFocusedDataRow();
|
||||
if (rowItem != null)
|
||||
{
|
||||
sqlValue = ReplaceHelper.ReplaceRowParam(rowItem, sqlValue);
|
||||
}
|
||||
if (SpecialLeftTable is TreeGridControlEx)
|
||||
{
|
||||
rowItem = SpecialLeftTable.GetViewFocusedDataRow();
|
||||
if (rowItem != null)
|
||||
{
|
||||
sqlValue = ReplaceHelper.ReplaceRowParam(rowItem, sqlValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ReplaceHelper.ReplaceWhereCond(sqlValue) + WhereCond;
|
||||
}
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user