SVN r1211
SVN-Revision: r1211
This commit is contained in:
@@ -159,6 +159,11 @@ namespace Lskj.Control.Model
|
||||
/// </summary>
|
||||
public string BillSourceControlId = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 保存验证条件表
|
||||
/// </summary>
|
||||
public DataTable SaveCondTab = new DataTable();
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 执行查询之前验证
|
||||
@@ -1648,7 +1653,7 @@ namespace Lskj.Control.Model
|
||||
{
|
||||
SetControlValue(model, this.ParentKey);
|
||||
}
|
||||
else if (model.RememberValue&& ConditionalCaching.ConditionalCaches.ContainsKey(model.id) && !string.IsNullOrWhiteSpace(ConditionalCaching.ConditionalCaches[model.id]))
|
||||
else if (model.RememberValue && ConditionalCaching.ConditionalCaches.ContainsKey(model.id) && !string.IsNullOrWhiteSpace(ConditionalCaching.ConditionalCaches[model.id]))
|
||||
{
|
||||
SetControlValue(model, ConditionalCaching.ConditionalCaches[model.id]);
|
||||
}
|
||||
@@ -1658,7 +1663,7 @@ namespace Lskj.Control.Model
|
||||
SetControlValue(model, defaultValue);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
//智能搜索框第一次加载时手动触发
|
||||
@@ -1710,7 +1715,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 Association = true,bool refreshSearchSource = false)
|
||||
public void CopyControlValue(bool Association = true, bool refreshSearchSource = false)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -2898,6 +2903,27 @@ namespace Lskj.Control.Model
|
||||
/// <returns>返回保存成功于否</returns>
|
||||
public bool SaveBaseModuleData(string menuCode, string tableName, string primaryKey, ref string primaryValue, bool isAdd = true, string leftField = "", bool isTip = true, int newVer = 0)
|
||||
{
|
||||
|
||||
if (this.SaveCondTab != null && this.SaveCondTab.Rows.Count > 0)
|
||||
{
|
||||
foreach (DataRow CondItem in SaveCondTab.Rows)
|
||||
{
|
||||
string condition = CondItem["condition"] + "";
|
||||
if (!string.IsNullOrWhiteSpace(condition))
|
||||
{
|
||||
string cond = this.ReplaceControlValue(condition);
|
||||
if (!ValidateCond(condition, null))
|
||||
{
|
||||
MessageUtil.Show(string.IsNullOrWhiteSpace(CondItem["hintmsg"] + "") ? "条件验证失败" : CondItem["hintmsg"] + "");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
string execSql = string.Empty;
|
||||
if (string.IsNullOrWhiteSpace(tableName))
|
||||
{
|
||||
@@ -3383,13 +3409,20 @@ namespace Lskj.Control.Model
|
||||
}
|
||||
if (RememberRow)
|
||||
{
|
||||
if (this.GridRowCount <= oldRowHandle && SystemInfo.Instance.DeleteSelectedEndOf)
|
||||
if (this._mainGridEx.GridView.OptionsSelection.MultiSelectMode == GridMultiSelectMode.CheckBoxRowSelect)
|
||||
{
|
||||
oldRowHandle = this.GridRowCount - 1;
|
||||
//多选框不选中,但滚动条移动到上一次点击的行
|
||||
if (oldRowHandle >= 0 && oldRowHandle < this._mainGridEx.GridView.RowCount)
|
||||
this._mainGridEx.GridView.MakeRowVisible(oldRowHandle);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.GridRowCount <= oldRowHandle && SystemInfo.Instance.DeleteSelectedEndOf)
|
||||
{
|
||||
oldRowHandle = this.GridRowCount - 1;
|
||||
}
|
||||
SetFocusedRowHandle(oldRowHandle);
|
||||
}
|
||||
|
||||
SetFocusedRowHandle(oldRowHandle);
|
||||
//SetTopRowHandle(oldTopRowHandle);
|
||||
}
|
||||
//执行删除或者右键后,主表没有数据时清空明细表格数据
|
||||
if (this.GridRowCount == 0 && OnLastQueryTriggered != null) OnLastQueryTriggered(null, null);
|
||||
@@ -3490,11 +3523,20 @@ namespace Lskj.Control.Model
|
||||
}
|
||||
if (RememberRow)
|
||||
{
|
||||
if (this.GridRowCount <= oldRowHandle && SystemInfo.Instance.DeleteSelectedEndOf)
|
||||
if (this._mainGridEx.GridView.OptionsSelection.MultiSelectMode == GridMultiSelectMode.CheckBoxRowSelect)
|
||||
{
|
||||
oldRowHandle = this.GridRowCount - 1;
|
||||
//多选框不选中,但滚动条移动到上一次点击的行
|
||||
if (oldRowHandle >= 0 && oldRowHandle < this._mainGridEx.GridView.RowCount)
|
||||
this._mainGridEx.GridView.MakeRowVisible(oldRowHandle);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.GridRowCount <= oldRowHandle && SystemInfo.Instance.DeleteSelectedEndOf)
|
||||
{
|
||||
oldRowHandle = this.GridRowCount - 1;
|
||||
}
|
||||
SetFocusedRowHandle(oldRowHandle);
|
||||
}
|
||||
SetFocusedRowHandle(oldRowHandle);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3546,11 +3588,20 @@ namespace Lskj.Control.Model
|
||||
}
|
||||
if (RememberRow)
|
||||
{
|
||||
if (this.GridRowCount <= oldRowHandle && SystemInfo.Instance.DeleteSelectedEndOf)
|
||||
if (this._mainGridEx.GridView.OptionsSelection.MultiSelectMode == GridMultiSelectMode.CheckBoxRowSelect)
|
||||
{
|
||||
oldRowHandle = this.GridRowCount - 1;
|
||||
//多选框不选中,但滚动条移动到上一次点击的行
|
||||
if (oldRowHandle >= 0 && oldRowHandle < this._mainGridEx.GridView.RowCount)
|
||||
this._mainGridEx.GridView.MakeRowVisible(oldRowHandle);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.GridRowCount <= oldRowHandle && SystemInfo.Instance.DeleteSelectedEndOf)
|
||||
{
|
||||
oldRowHandle = this.GridRowCount - 1;
|
||||
}
|
||||
SetFocusedRowHandle(oldRowHandle);
|
||||
}
|
||||
SetFocusedRowHandle(oldRowHandle);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4265,6 +4316,9 @@ namespace Lskj.Control.Model
|
||||
{
|
||||
dateEdit.TextEdit.Properties.VistaCalendarViewStyle = DevExpress.XtraEditors.VistaCalendarViewStyle.YearView;
|
||||
}
|
||||
|
||||
//dateEdit.TextEdit.Properties.Appearance.BackColor = ColorTranslator.FromHtml("#00FF00");
|
||||
|
||||
baseControl = dateEdit;
|
||||
break;
|
||||
case ControlType.LabDateHalfDay:
|
||||
@@ -4351,6 +4405,7 @@ namespace Lskj.Control.Model
|
||||
autoEdit.Button.Visible = true;
|
||||
autoEdit.RefreshDataSource += new EventHandler(OnLabelAutoGridLookRefreshDataSource);
|
||||
}
|
||||
//autoEdit.TextEdit.Properties.Appearance.BackColor = ColorTranslator.FromHtml("#00FF00");
|
||||
autoEdit.clickAfterEmpty = model.clickAfterEmpty;
|
||||
autoEdit.ValueMember = ControlType.LabAutoCompleteValue == model.FieldType || ControlType.LabAutoCompleteValueParam == model.FieldType ? model.ValueMember : model.TextMember;
|
||||
autoEdit.ValueField = model.ValueMember;
|
||||
@@ -4707,6 +4762,7 @@ namespace Lskj.Control.Model
|
||||
//设置了ModuleFrameDisplayText(显示text值),就把配置的模块sql传给model.SourceSql
|
||||
if (model.FieldType == ControlType.LabSelectReturnIdNew)
|
||||
{
|
||||
model.ModuleFrameDisplayText = true;
|
||||
moduleReturnsIdNew.ModuleFrameDisplayText = true;
|
||||
model.SourceSql = moduleReturnsIdNew._lookUpForm.SysModel.MenuSql;
|
||||
}
|
||||
@@ -6303,4 +6359,36 @@ namespace Lskj.Control.Model
|
||||
LabelDateEdit dateEdit = controlObj as LabelDateEdit;
|
||||
value = dateEdit.TextEdit.EditValue == null ? dateEdit.EditText : dateEdit.TextEdit.DateTime.ToString("yyyy-MM-dd");
|
||||
}
|
||||
else if (
|
||||
else if (controlObj is LabelCheckEdit)
|
||||
{
|
||||
LabelCheckEdit checkEdit = controlObj as LabelCheckEdit;
|
||||
value = checkEdit.EditText;
|
||||
}
|
||||
else if (controlObj is LabelComboxEdit)
|
||||
{
|
||||
LabelComboxEdit autoEdit = controlObj as LabelComboxEdit;
|
||||
value = autoEdit.EditValue;
|
||||
}
|
||||
else if (controlObj is LabelTextEdit)
|
||||
{
|
||||
LabelTextEdit textIntEdit = controlObj as LabelTextEdit;
|
||||
if (textIntEdit != null) value = string.IsNullOrEmpty(textIntEdit.EditText) ? "0" : textIntEdit.EditText;
|
||||
}
|
||||
|
||||
defaultValue = defaultValue.Replace(item, value);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 设置控件背景颜色(无需传入txt_ 内部已经追加)
|
||||
/// </summary>
|
||||
/// <param name="controlName"></param>
|
||||
public void SetBackgroundColor(string controlName)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user