SVN r1167

SVN-Revision: r1167
This commit is contained in:
cyf
2026-05-11 02:19:43 +00:00
parent 2e85136fbb
commit 2ed5b7975f
21 changed files with 475 additions and 156 deletions
+14 -23
View File
@@ -976,9 +976,14 @@ namespace Lskj.Control
{
ApiHelper apiHelper = new ApiHelper(this.SysModel.ModuleCode, billDocumentId, this.PanelCondVisible ? this.BaseAccraditModelObj.DefaultParmaryField : string.IsNullOrEmpty(this.BaseAccraditModelObj.KeyField + "") ? this.BaseAccraditModelObj.TmpParmaryField : this.BaseAccraditModelObj.KeyField, this.BaseAccraditModelObj.BillTable, 0);
apiHelper.OnEvent(Interface.Api.OperateEvent.BeforeModuleAuditStateChange, Interface.Api.ActionType.AuditBack);
if (!string.IsNullOrEmpty(apiHelper.apiResutMsg))
//if (!string.IsNullOrEmpty(apiHelper.apiResutMsg))
//{
// DialogResult dialogResult = MessageUtil.Show(ResourceKeys.ForcedFail + "\r\n" + apiHelper.apiResutMsg);
// return;
//}
if (!apiHelper.apiHandler.GetApiSuccess(apiHelper.apiHandlerModels))
{
DialogResult dialogResult = MessageUtil.Show(ResourceKeys.ForcedFail + "\r\n" + apiHelper.apiResutMsg);
MessageUtil.Show(ResourceKeys.ForcedFail + "\r\n" + apiHelper.apiResutMsg);
return;
}
}
@@ -1005,8 +1010,13 @@ namespace Lskj.Control
{
ApiHelper apiHelper = new ApiHelper(this.SysModel.ModuleCode, billDocumentId, this.PanelCondVisible ? this.BaseAccraditModelObj.DefaultParmaryField : string.IsNullOrEmpty(this.BaseAccraditModelObj.KeyField + "") ? this.BaseAccraditModelObj.TmpParmaryField : this.BaseAccraditModelObj.KeyField, this.BaseAccraditModelObj.BillTable, 0);
apiHelper.OnEvent(Interface.Api.OperateEvent.AfterModuleAuditStateChange, Interface.Api.ActionType.AuditBack);
if (!string.IsNullOrEmpty(apiHelper.apiResutMsg))
//if (!string.IsNullOrEmpty(apiHelper.apiResutMsg))
// MessageUtil.Show(apiHelper.apiResutMsg);
if (!apiHelper.apiHandler.GetApiSuccess(apiHelper.apiHandlerModels))
{
MessageUtil.Show(apiHelper.apiResutMsg);
}
}
#endregion
if (tag == "1")
@@ -1874,23 +1884,4 @@ namespace Lskj.Control
string confirmOpers = "",
bool ret = false,
int returnd = 0,
int selectConfirmFlag = 0,
bool IsStepOver = false,
int comfirm = 0
)
{
string result = BaseAuditImpl.Audit(out nextSelectStepCode, out nextSelectStepOper, out msgText, sysModel, stepCode, billDocumentId, message, storedName, accractFlag, remindSelect, remarkText, remindOpers, confirmOpers, ret, returnd, selectConfirmFlag, IsStepOver, comfirm);
if ("9".Equals(result))
{
// 继续执行保存
//if (string.IsNullOrWhiteSpace(msgText)) msgText = "失败";
if (MessageUtil.Show(msgText, MessageBoxButtons.YesNo) == DialogResult.Yes)
result = AuditMethod(out nextSelectStepCode, out nextSelectStepOper, out msgText, sysModel, stepCode, billDocumentId, message, storedName, accractFlag, remindSelect, remarkText, remindOpers, confirmOpers, ret, returnd, selectConfirmFlag, IsStepOver, 1);
}
return result;
}
}
}
@@ -405,7 +405,7 @@ namespace Lskj.Control
/// </summary>
private void CalcPopupLocation()
{
try
try
{
this._popup.Parent = this.GetParent(this.Parent);
@@ -468,7 +468,7 @@ namespace Lskj.Control
string Message = ErrorMessage.PromptErrorMessage(ex);
throw;
}
}
/// <summary>
/// <para>说明:</para>
@@ -1108,48 +1108,57 @@ namespace Lskj.Control
{
this.Invoke((EventHandler)delegate
{
DataTable table = this.Popup.GridControlObj.DataSourceTable();
int iIndexWidth = popupObj.GridViewObj.IndicatorWidth;
int iOtherWidth = 0;
int columnWidthIndex = 0;
foreach (GridColumn col in this.Popup.GridViewObj.Columns)
try
{
if (col.FieldName.Substring(0, 1) != "_")
DataTable table = this.Popup.GridControlObj.DataSourceTable();
int iIndexWidth = popupObj.GridViewObj.IndicatorWidth;
int iOtherWidth = 0;
int columnWidthIndex = 0;
foreach (GridColumn col in this.Popup.GridViewObj.Columns)
{
int width = 0;
if (columnWidthIndex < columnsWidth.Length)
if (col.FieldName.Substring(0, 1) != "_")
{
string widthStr = columnsWidth[columnWidthIndex];
width = int.TryParse(widthStr, out width) ? width : col.GetBestWidth();
columnWidthIndex += 1;
int width = 0;
if (columnWidthIndex < columnsWidth.Length)
{
string widthStr = columnsWidth[columnWidthIndex];
width = int.TryParse(widthStr, out width) ? width : col.GetBestWidth();
columnWidthIndex += 1;
}
else
{
width = col.GetBestWidth();
}
col.Width = width;
iOtherWidth += width;
}
else
}
int popupWidth = iIndexWidth + iOtherWidth + 40;
if (Model.LookUpWidth > 0)
{
popupWidth = iIndexWidth + Model.LookUpWidth + 25;
}
if (popupWidth != popupObj.Width)
{
if (popupWidth > _maxPopupWidth)
{
width = col.GetBestWidth();
popupWidth = _maxPopupWidth;
}
else if (popupWidth < _minPopupWidth)
{
popupWidth = _minPopupWidth;
}
col.Width = width;
iOtherWidth += width;
}
popupObj.Width = popupWidth;
this.CalcPopupLocation();
this._Handed = false;
}
int popupWidth = iIndexWidth + iOtherWidth + 40;
if (Model.LookUpWidth > 0)
catch (Exception ex)
{
popupWidth = iIndexWidth + Model.LookUpWidth + 25;
string Message = ErrorMessage.PromptErrorMessage(ex);
throw;
}
if (popupWidth != popupObj.Width)
{
if (popupWidth > _maxPopupWidth)
{
popupWidth = _maxPopupWidth;
}
else if (popupWidth < _minPopupWidth)
{
popupWidth = _minPopupWidth;
}
}
popupObj.Width = popupWidth;
this.CalcPopupLocation();
this._Handed = false;
});
}
}
@@ -1198,9 +1207,9 @@ namespace Lskj.Control
iValueWidth = iValueWidth < 50 ? 50 : iValueWidth + 10;
iTextWidth = iTextWidth < 50 ? 50 : iTextWidth + 10;
if(popupObj.GridViewObj.Columns.ColumnByFieldName(ValueMember)!=null) popupObj.GridViewObj.Columns[ValueMember].Width = iValueWidth;
if (popupObj.GridViewObj.Columns.ColumnByFieldName(ValueMember) != null) popupObj.GridViewObj.Columns[ValueMember].Width = iValueWidth;
if(popupObj.GridViewObj.Columns.ColumnByFieldName(TextMember) != null) popupObj.GridViewObj.Columns[TextMember].Width = iTextWidth;
if (popupObj.GridViewObj.Columns.ColumnByFieldName(TextMember) != null) popupObj.GridViewObj.Columns[TextMember].Width = iTextWidth;
if (hasReamrkField)
{
@@ -1227,7 +1236,7 @@ namespace Lskj.Control
this.CalcPopupLocation();
this._Handed = false;
}
catch (Exception ex)
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex);
throw;
@@ -1240,7 +1249,7 @@ namespace Lskj.Control
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex);
throw;
//throw;
}
}
@@ -1465,13 +1474,6 @@ namespace Lskj.Control
/// <param name="e"></param>
private void AutoGridLookUp_TextChanged(object sender, EventArgs e)
{
//if (!string.IsNullOrWhiteSpace(this.Text))
//{
// if (SystemInfo.Instance.TrimWhiteSpace)
// this.HandPopupSqlValueNew(this.Text.Trim());//使用原来的方法
// else
// this.HandPopupSqlValueNew(this.Text);
//}
if (PopShowFlag)
{
if (SystemInfo.Instance.TrimWhiteSpace)
+28 -5
View File
@@ -1181,15 +1181,37 @@ namespace Lskj.Control
{
if (model.isSumMerge && !string.IsNullOrEmpty(e.FieldValue + ""))
{
if (model.CanMerge && BeforeClass == Convert.ToDecimal(e.FieldValue))
if (!string.IsNullOrEmpty(model.MergeGroup))
{
BeforeClass = Convert.ToDecimal(e.FieldValue);
bool isMergrGroup = !string.IsNullOrEmpty(model.MergeGroup) && gridRow.Table.Columns.Contains(model.MergeGroup) && e.RowHandle != 0 ? (gridRow[model.MergeGroup] + "").Equals(BeforeGroupName) : false;
if (model.CanMerge && BeforeClass == Convert.ToDecimal(e.FieldValue) && isMergrGroup)
{
BeforeClass = Convert.ToDecimal(e.FieldValue);
BeforeGroupName = !string.IsNullOrEmpty(model.MergeGroup) && gridRow.Table.Columns.Contains(model.MergeGroup) ? gridRow[model.MergeGroup] + "" : "";
}
else
{
BeforeClass = Convert.ToDecimal(e.FieldValue);
BeforeGroupName = !string.IsNullOrEmpty(model.MergeGroup) && gridRow.Table.Columns.Contains(model.MergeGroup) ? gridRow[model.MergeGroup] + "" : "";
if (isSum || String.IsNullOrEmpty(model.SumCond)) customSum += Convert.ToDecimal(e.FieldValue);
}
}
else
else
{
BeforeClass = Convert.ToDecimal(e.FieldValue);
if (isSum || String.IsNullOrEmpty(model.SumCond)) customSum += Convert.ToDecimal(e.FieldValue);
if (model.CanMerge && BeforeClass == Convert.ToDecimal(e.FieldValue))
{
BeforeClass = Convert.ToDecimal(e.FieldValue);
}
else
{
BeforeClass = Convert.ToDecimal(e.FieldValue);
if (isSum || String.IsNullOrEmpty(model.SumCond)) customSum += Convert.ToDecimal(e.FieldValue);
}
}
}
if (isSum)
{
@@ -2833,6 +2855,7 @@ namespace Lskj.Control
Math.Round(avg, 2),
Math.Round(max, 2),
Math.Round(min, 2));
if (this.TotalQuantity) this.lblTotal.Text = string.Format("已选中 {0} 行", rows.Length);
}
}
catch (Exception ex)
+6 -4
View File
@@ -273,13 +273,14 @@ namespace Lskj.Control
model.FieldType == ControlType.LabMultiSelectValueParam ||
model.FieldType == ControlType.LabAutoGridValue ||
model.FieldType == ControlType.LabSelectReturnId ||
(model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText)
(model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText) ||
model.FieldType == ControlType.LabModuleAddRowsID
)
{
string sqlValue = model.SqlSource;
if (model.FieldType == ControlType.LabSelectReturnId || (model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText))
if (model.FieldType == ControlType.LabSelectReturnId || (model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText) || model.FieldType == ControlType.LabModuleAddRowsID)
{
if ((model.IsRadio && !string.IsNullOrWhiteSpace(model.addModuleld)) || model.FieldType == ControlType.LabSelectReturnIdNew)
if ((model.IsRadio && !string.IsNullOrWhiteSpace(model.addModuleld)) || model.FieldType == ControlType.LabSelectReturnIdNew || model.FieldType == ControlType.LabModuleAddRowsID)
{
//单选模式数据源为模块sql 新版模块选中返回id固定位模块sql
DataRow modelRow = Business.Impl.MainImpl.GetSystemdllTab(model.addModuleld);
@@ -484,7 +485,8 @@ namespace Lskj.Control
model.FieldType == ControlType.LabMultiSelectValueParam ||
model.FieldType == ControlType.LabAutoGridValue ||
model.FieldType == ControlType.LabSelectReturnId ||
(model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText)
(model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText)||
model.FieldType == ControlType.LabModuleAddRowsID
))
{
string fieldValue = GetValueByImportText(dr, gc.FieldName, dr[gc.FieldName] + "");
+6 -4
View File
@@ -279,13 +279,14 @@ namespace Lskj.Control
model.FieldType == ControlType.LabMultiSelectValueParam ||
model.FieldType == ControlType.LabAutoGridValue||
model.FieldType == ControlType.LabSelectReturnId||
(model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText)
(model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText)||
model.FieldType == ControlType.LabModuleAddRowsID
)
{
string sqlValue = model.SqlSource;
if (model.FieldType == ControlType.LabSelectReturnId|| (model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText))
if (model.FieldType == ControlType.LabSelectReturnId|| (model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText) || model.FieldType == ControlType.LabModuleAddRowsID)
{
if ((model.IsRadio && !string.IsNullOrWhiteSpace(model.addModuleld))|| model.FieldType == ControlType.LabSelectReturnIdNew)
if ((model.IsRadio && !string.IsNullOrWhiteSpace(model.addModuleld))|| model.FieldType == ControlType.LabSelectReturnIdNew || model.FieldType == ControlType.LabModuleAddRowsID)
{
//单选模式数据源为模块sql 新版模块选中返回id固定位模块sql
DataRow modelRow = Business.Impl.MainImpl.GetSystemdllTab(model.addModuleld);
@@ -490,7 +491,8 @@ namespace Lskj.Control
model.FieldType == ControlType.LabMultiSelectValueParam ||
model.FieldType == ControlType.LabAutoGridValue||
model.FieldType == ControlType.LabSelectReturnId||
(model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText)
(model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText)||
model.FieldType == ControlType.LabModuleAddRowsID
))
{
string fieldValue = GetValueByImportText(dr, gc.FieldName, dr[gc.FieldName] + "");
+3 -2
View File
@@ -26,12 +26,12 @@ namespace Lskj.Control
public bool isBatchDownLoad = false;
public bool isprompt = true;
public bool isMultiple = false;//是否为忽略多选
public bool isOpenvisble = false;//是否为忽略多选
public bool isOpenvisble = false;//是否可以直接打开
public string ModelId= string.Empty;//菜单名称
public string MenuName = string.Empty;//右键名称
public string MenuId = string.Empty;//菜单ID
public string SavePath = string.Empty;//下载路径(浏览器dll,多次下载,记录第一次路径,后续外部拿到后在默认赋值)
/// <summary>
/// 右键多条下载是否显示
/// </summary>
@@ -161,6 +161,7 @@ namespace Lskj.Control
PrintFile(labAddress.EditText);
File.Delete(labAddress.EditText);
}
this.DialogResult = DialogResult.OK;
this.Close();
}
}
+10 -1
View File
@@ -136,4 +136,13 @@ namespace Lskj.Control
}
else
{
//string val = HttpUtility.UrlEncode(HttpUtility.UrlDecode(string.Join("=", eqParams.Skip(1))));
//val = val.Replace("+", "%20")
// .Replace("%5c", "/")
// .Replace("%5C", "/")
// .Replace("%2f", "/")
// .Replace("%2F", "/")
// .Replace("//", "/");
//qpLS.Add(string.Format("{0}={1}", eqParams[0], val));
+1 -1
View File
@@ -144,7 +144,7 @@ namespace Lskj.Control
{
string rawValue = HttpUtility.UrlDecode(string.Join("=", eqParams.Skip(1))).TrimEnd();
qpLS.Add(string.Format("{0}={1}", eqParams[0], HttpUtility.UrlEncode(rawValue).Replace("%5c", "/").Replace("%2f", "/").Replace("//", "/").Replace("%3d", "=")));
qpLS.Add(string.Format("{0}={1}", eqParams[0], HttpUtility.UrlEncode(rawValue).Replace("%5c", "/").Replace("%2f", "/").Replace("//", "/").Replace("%3d", "=").Replace("+", "%20")));
}
}
else
+134 -1
View File
@@ -465,6 +465,18 @@ namespace Lskj.Control
/// 必填字段
/// </summary>
public string RequiredFields = string.Empty;
/// <summary>
/// 合计显示选中行数
/// </summary>
public bool TotalQuantity;
/// <summary>
///新增行
/// </summary>
/// <param name="sender">The sender.</param>
public event ModuleAddLine OnNewLine;
public delegate void ModuleAddLine(string name, List<string>list);
public GridControlEx()
{
@@ -1151,6 +1163,10 @@ namespace Lskj.Control
//case ControlType.LabGridPopupMutilText:
InitGridPopup(column, model);
break;
case ControlType.LabModuleAddRowsID:
case ControlType.LabModuleAddRowsText:
InitModuleReturnLine(column, model);
break;
default:
break;
}
@@ -5038,7 +5054,55 @@ namespace Lskj.Control
this.mControlList.Add(model);
}
/// <summary>
/// <para>说明:创建 模块返回行 </para>
/// <para>创建人:曹屹峰</para>
/// <para>创建日期:2021-08-23 </para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
private void InitModuleReturnLine(GridColumn gridColumn, GridColumnModel model)
{
FrmModelLookUp2 modelLookUp = new FrmModelLookUp2(model.addModuleld, false);//model.IsRadio 必定多选
modelLookUp.ReturnCollection = true;
modelLookUp.ConfigureColumnMode = model.ConfigureColumnMode;
modelLookUp.ValueField = model.ValueMember;
modelLookUp.TextField = model.TextMember;
modelLookUp.SourceSQL = model.SqlSource;
modelLookUp.IsType = model.FieldType;
modelLookUp.ValueMember = model.FieldType == ControlType.LabModuleAddRowsID ? model.ValueMember : model.TextMember;
modelLookUp.Tag = model;
RepositoryItemCheckedComboBoxEdit btnEdit = new RepositoryItemCheckedComboBoxEdit();
btnEdit.NullText = "";
btnEdit.PopupBorderStyle = PopupBorderStyles.Flat;
btnEdit.AllowNullInput = DefaultBoolean.False;
btnEdit.DisplayMember = model.TextMember;
btnEdit.SeparatorChar = ',';
btnEdit.ValueMember = model.FieldType == ControlType.LabModuleAddRowsText ? model.ValueMember : model.TextMember;
DataTable dataTable = MainImpl.GetDataTableResult(modelLookUp.SysModel.MenuSql);
btnEdit.DataSource = dataTable;
//if (model.ModuleFrameDisplayText)
//{
// DataTable dataTable = MainImpl.GetDataTableResult(modelLookUp.SysModel.MenuSql);
// btnEdit.DataSource = dataTable;
//}
btnEdit.Buttons[0].Visible = false; // 不能移除,移除后事件不起作用.
btnEdit.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Ellipsis) });
btnEdit.Tag = model;
btnEdit.Buttons[1].Tag = modelLookUp;
btnEdit.ButtonClick += new ButtonPressedEventHandler(OnModuleAddLine);
btnEdit.KeyDown += BtnEdit_KeyDown;
gridControl.RepositoryItems.Add(btnEdit);
gridColumn.OptionsColumn.ReadOnly = true;
gridColumn.ColumnEdit = btnEdit;
this.mControlList.Add(model);
}
/// <summary>
@@ -6647,6 +6711,8 @@ namespace Lskj.Control
//}
if (RefreshTotal) this.gridView.UpdateSummary();//合计列值改变后更新合计计算
}
catch (Exception ex)
{
@@ -6740,6 +6806,7 @@ namespace Lskj.Control
}
}
if (this.TotalQuantity) this.lblTotal.Text = string.Format("已选中 {0} 行", rows.Length);
}
}
@@ -6812,6 +6879,7 @@ namespace Lskj.Control
avg = count == 0 || count == 0 ? 0 : sum / count;
this.lblTotal.Text = string.Format(ResourceKeys.GridTotalDisplayText, count, Math.Round(sum, 2), Math.Round(avg, 2), Math.Round(max, 2), Math.Round(min, 2));
if (this.TotalQuantity) this.lblTotal.Text = string.Format("已选中 {0} 行", rows.Length);
}
}
catch (Exception ex)
@@ -7295,7 +7363,6 @@ namespace Lskj.Control
//多选关联单据头
string SourceSQL = modelLookUp.SysModel.MenuSql.Replace("#", "") + model.SplicingConditions;
//SourceSQL = modelLookUp.SysModel.MenuSql.Replace("#", "");
//单据头关联取值
if (this.ParentControl != null)
{
@@ -7332,6 +7399,72 @@ namespace Lskj.Control
}
}
/// <summary>
/// <para>说明:表格打开模块添加行</para>
/// <para>创建人:曹屹峰</para>
/// <para>创建日期:2021-08-23 </para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
protected void OnModuleAddLine(object sender, ButtonPressedEventArgs e)
{
try
{
CheckedComboBoxEdit btnEdit = (CheckedComboBoxEdit)sender;
FrmModelLookUp2 modelLookUp = e.Button.Tag as FrmModelLookUp2;
GridColumnModel model = modelLookUp.Tag as GridColumnModel;
modelLookUp.EditText = btnEdit.Text;
modelLookUp.CurrentOperColumnKey = Model.ModuleCode + "_" + model.FieldName;
modelLookUp.EditText = btnEdit.Text;
modelLookUp.EditValue = btnEdit.EditValue + "";
//多选关联单据头
string SourceSQL = modelLookUp.SysModel.MenuSql.Replace("#", "") + model.SplicingConditions;
//单据头关联取值
if (this.ParentControl != null)
{
SourceSQL = this.ParentControl.ReplaceControlValue(SourceSQL);
}
modelLookUp.NewSourceSQL = ReplaceHelper.ReplaceRowParam(this.gridView.GetFocusedDataRow(), SourceSQL);
modelLookUp.AddModuleResult = model.addModuleResult;
modelLookUp.InitControls(modelLookUp.UnionModuleCodel);
DialogResult result = modelLookUp.ShowDialog();
if (result == DialogResult.OK)
{
btnEdit.EditValue = modelLookUp.EditValue;
this.GridView.SetFocusedRowCellValue(model.FieldName, modelLookUp.EditValue);
if (OnNewLine != null && modelLookUp.EditValueList.Count>0)
{
OnNewLine(model.FieldName, modelLookUp.EditValueList);
}
}
}
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex, Model.ModuleCode);
MessageUtil.Show(Message, ex.Message);
}
}
/// <summary>
/// 模块返回框清空
/// </summary>
+4 -1
View File
@@ -329,4 +329,7 @@ namespace Lskj.Control.Model
/// </summary>
public bool ImportCurrentValue { get; set; }
/// <summary>
///是否为
///是否为 单据动态生成列开始日期控件
/// </summary>
public bool SchedStartDataControl { get; set; }
/// <summary>
+12 -1
View File
@@ -67,6 +67,7 @@ namespace Lskj.Control.Model
/// 日期框 显示(年-月)
/// </summary>
public const int LabShortDate = 444444;
/// <summary>
/// 自动搜索框 保存Value值, 显示Text值
/// </summary>
@@ -468,6 +469,14 @@ namespace Lskj.Control.Model
///提示框
/// </summary>
public const int LabPrompt = 166;
/// <summary>
///模块选择返回行,返回ID
/// </summary>
public const int LabModuleAddRowsID = 167;
/// <summary>
///模块选择返回行,返回text
/// </summary>
public const int LabModuleAddRowsText = 168;
/// <summary>
/// <para>说明:是否为Value类型</para>
@@ -566,4 +575,6 @@ namespace Lskj.Control.Model
}
/// <summary>
/// 不需要根据数据源sql获取数据源的控件
/// </summary>
/// <param name=
@@ -228,6 +228,9 @@ namespace Lskj.Control.Model
/// 合计计算公式
/// </summary>
public string sumCalc { get; set; }
/// <summary>
/// 合并分组
/// </summary>
public string MergeGroup { get; set; }
/// <summary>
/// 合并数据是否求和(合并单元格只计算一次)
@@ -160,7 +160,7 @@ namespace Lskj.Control.Model
/// <value>The union module.</value>
public string UnionModule { get { return _unionModule; } }
/// <summary>
/// 关联模块
/// 关联条件
/// </summary>
/// <value>The union module.</value>
public string UnionCond { get { return _unionCond; } }
@@ -294,6 +294,10 @@ namespace Lskj.Control.Model
/// 隐藏下方操作按钮
/// </summary>
public string ChartTextColor;
/// <summary>
/// 刷新单表明细时忽略关联字段(单表中,有关联模块,但是没有关联条件,关联值,是不会去查询数据的)
/// </summary>
public bool IgnoreAssociatedFields;
/// <summary>
/// 主模块编号
@@ -356,4 +360,5 @@ namespace Lskj.Control.Model
this.QueryAgain = item.Table.Columns.Contains("QueryAgain") ? "1".Equals(item["QueryAgain"] + "") : false;
this.BottomRefreshMain = item.Table.Columns.Contains("BottomRefreshMain") ? "1".Equals(item["BottomRefreshMain"] + "") : false;
this.LoadFilter = item.Table.Columns.Contains("LoadFilter") ? "1".Equals(item["LoadFilter"] + "") : false;
this.
this.DynamicDetails = item.Table.Columns.Contains("DynamicDetails") ? "1".Equals(item["DynamicDetails"] + "") : false;
this.DetailSearch = item.Tabl
+19 -9
View File
@@ -2395,6 +2395,11 @@ namespace Lskj.Control.Model
if (cell != null)
{
if (cell.CellType == CellType.Error)
{
// 你可以返回空,或者标记为 "错误值"
continue;
}
if (cell.CellType == CellType.Blank)
{
//isImportRows = false;
@@ -2440,7 +2445,7 @@ namespace Lskj.Control.Model
model.FieldType == ControlType.LabDateTime ||
model.FieldType == ControlType.LabDateTimeShort ||
model.FieldType == ControlType.LabTime ||
model.FieldType == ControlType.LabShortTime) && (cell == null && cell.StringCellValue != null && cell.CellType == CellType.Blank && string.IsNullOrWhiteSpace(cell + "")))
model.FieldType == ControlType.LabShortTime) && (cell == null || string.IsNullOrWhiteSpace(cell + "")))
{
//日期框如果值是空,就直接跳过。赋空值("")会报错
continue;
@@ -2499,7 +2504,8 @@ namespace Lskj.Control.Model
|| model.FieldType == ControlType.LabAutoGridValue
|| model.FieldType == ControlType.LabAutoGridValueParam
|| model.FieldType == ControlType.LabSelectReturnId
|| (model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText)
|| (model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText)||
model.FieldType == ControlType.LabModuleAddRowsID
))
{
bool isEmpty = model.CanNull;
@@ -2846,7 +2852,8 @@ namespace Lskj.Control.Model
|| model.FieldType == ControlType.LabAutoGridValue
|| model.FieldType == ControlType.LabAutoGridValueParam
|| model.FieldType == ControlType.LabSelectReturnId
|| (model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText)
|| (model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText)||
model.FieldType == ControlType.LabModuleAddRowsID
))
{
bool isEmpty = model.CanNull;
@@ -3275,7 +3282,8 @@ namespace Lskj.Control.Model
model.FieldType == ControlType.LabMultiSelectValueParam ||
model.FieldType == ControlType.LabAutoGridValue ||
model.FieldType == ControlType.LabSelectReturnId ||
(model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText)
(model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText)||
model.FieldType == ControlType.LabModuleAddRowsID
))
{
string fieldValue = GetValueByImportText(dr, gc.FieldName, dr[gc.FieldName] + "");
@@ -3691,13 +3699,14 @@ namespace Lskj.Control.Model
|| model.FieldType == ControlType.LabAutoGridValue
|| model.FieldType == ControlType.LabAutoGridValueParam
|| model.FieldType == ControlType.LabSelectReturnId
|| (model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText)
|| (model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText)||
model.FieldType == ControlType.LabModuleAddRowsID
)
{
string sqlValue = model.SqlSource;
if (model.FieldType == ControlType.LabSelectReturnId || model.FieldType == ControlType.LabSelectReturnIdNew)
if (model.FieldType == ControlType.LabSelectReturnId || model.FieldType == ControlType.LabSelectReturnIdNew || model.FieldType == ControlType.LabModuleAddRowsID)
{
if ((model.IsRadio && !string.IsNullOrWhiteSpace(model.addModuleld)) || model.FieldType == ControlType.LabSelectReturnIdNew)
if ((model.IsRadio && !string.IsNullOrWhiteSpace(model.addModuleld)) || model.FieldType == ControlType.LabSelectReturnIdNew || model.FieldType == ControlType.LabModuleAddRowsID)
{
//单选模式数据源为模块sql 新版模块选中返回id固定位模块sql
DataRow modelRow = Business.Impl.MainImpl.GetSystemdllTab(model.addModuleld);
@@ -3767,13 +3776,14 @@ namespace Lskj.Control.Model
|| model.FieldType == ControlType.LabAutoGridValueParam
|| model.FieldType == ControlType.LabSelectReturnId
|| (model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText)
|| model.FieldType == ControlType.LabModuleAddRowsID
)
{
string sqlValue = model.SqlSource;
if (model.FieldType == ControlType.LabSelectReturnId || model.FieldType == ControlType.LabSelectReturnIdNew)
if (model.FieldType == ControlType.LabSelectReturnId || model.FieldType == ControlType.LabSelectReturnIdNew|| model.FieldType == ControlType.LabModuleAddRowsID)
{
if ((model.IsRadio && !string.IsNullOrWhiteSpace(model.addModuleld)) || model.FieldType == ControlType.LabSelectReturnIdNew)
if ((model.IsRadio && !string.IsNullOrWhiteSpace(model.addModuleld)) || model.FieldType == ControlType.LabSelectReturnIdNew|| model.FieldType == ControlType.LabModuleAddRowsID)
{
//单选模式数据源为模块sql 新版模块选中返回id固定位模块sql
DataRow modelRow = Business.Impl.MainImpl.GetSystemdllTab(model.addModuleld);
@@ -699,6 +699,7 @@ namespace Lskj.Control.Model
}
//打开导入覆盖控件
public bool OpenFrmcCover(GridRightMenuModel model, List<string> paramList)
{
@@ -1784,7 +1785,7 @@ namespace Lskj.Control.Model
paramList[2] = ReplaceHelper.ReplaceRowParam(rows, url) + "";
}
}
if (model.DllName.ToLower().Contains("p_PubPrint.lsp".ToLower()))
if (model.DllName.ToLower().Contains("p_PubPrint.lsp".ToLower())&& !model.CancelDefaultReplace)
{
string paramsql1 = paramList[2];
paramList[2] = ReplaceHelper.ReplaceRowParam(rows, paramsql1, "'", "'");
@@ -129,7 +129,7 @@ namespace Lskj.Control.Model
/// <value><c>true</c> if [more click]; otherwise, <c>false</c>.</value>
public bool MoreClick { get { return _moreClick; } }
/// <summary>
/// 右键菜单是否可执参数替换
/// 右键菜单是否可执参数替换(合并)
/// </summary>
/// <value><c>true</c> if [merg Eexec]; otherwise, <c>false</c>.</value>
public bool Mergeexec { get { return _mergEexec; } }
@@ -342,6 +342,10 @@ namespace Lskj.Control.Model
/// 右键验证是否有修改后的数据
/// </summary>
public bool VerifyUpdate;
/// <summary>
/// 右键多选合并不走默认替换(p_PubPrint.lsp
/// </summary>
public bool CancelDefaultReplace;
/// <summary>
@@ -471,4 +475,6 @@ namespace Lskj.Control.Model
this.SqlDirectExecution = string.IsNullOrWhiteSpace(item["SqlDirectExecution"] + "") ? false : "1".Equals(item["SqlDirectExecution"] + "");
if (item.Table.Columns.Contains("UnionZTid"))
this.UnionZTid = string.IsNullOrWhiteSpace(item["UnionZTid"] + "") ? "" : item["UnionZTid"] + "";
if (item.Table.Columns.Contains("Di
if (item.Table.Columns.Contains("DisableSuccessfulPrompt"))
this.DisableSuccessfulPrompt = string.IsNullOrWhiteSpace(item["DisableSuccessfulPrompt"] + "") ? false : "1".Equals(item["DisableSuccessfulPrompt"] + "");
if (item.Table.Columns.
+25 -35
View File
@@ -250,6 +250,10 @@ namespace Lskj.Control.Model
/// </summary>
public event EventHandler OpenDocumentSource;
/// <summary>
///特殊左侧表
/// </summary>
public GridControlEx SpecialLeftTable;
/// <summary>
/// 控件Panel对象
/// </summary>
public XtraScrollableControl ParentPanel
@@ -3458,14 +3462,14 @@ namespace Lskj.Control.Model
this.GridRowCount = this._mainGridEx.SetGridViewDataSource(MainImpl.GetAdapterResult(sqlValue));
}
}
//if (RememberRow)
//{
// if (this.GridRowCount <= oldRowHandle && SystemInfo.Instance.DeleteSelectedEndOf)
// {
// oldRowHandle = this.GridRowCount - 1;
// }
// SetFocusedRowHandle(oldRowHandle);
//}
if (RememberRow)
{
if (this.GridRowCount <= oldRowHandle && SystemInfo.Instance.DeleteSelectedEndOf)
{
oldRowHandle = this.GridRowCount - 1;
}
SetFocusedRowHandle(oldRowHandle);
}
}
}
else
@@ -4091,6 +4095,7 @@ namespace Lskj.Control.Model
model.AdditionalAssociations = item.Table.Columns.Contains("AdditionalAssociations") && !string.IsNullOrWhiteSpace(item["AdditionalAssociations"] + "") ? "1".Equals(item["AdditionalAssociations"] + "") : false;
model.AuditControlTitleColor = item.Table.Columns.Contains("AuditControlTitleColor") ? item["AuditControlTitleColor"] + "" : "";
model.ModuleFrameDisplayText = item.Table.Columns.Contains("ModuleFrameDisplayText") ? "1".Equals(item["ModuleFrameDisplayText"] + "") : false;
model.InputBoxFontSize = item.Table.Columns.Contains("InputBoxFontSize") && !string.IsNullOrEmpty(item["InputBoxFontSize"] + "") ? Convert.ToInt32(item["InputBoxFontSize"] + "") : 0;
//为了和工具里和bs里统一
if (model.FieldType == 42)
{
@@ -4366,6 +4371,7 @@ namespace Lskj.Control.Model
remarkEdit.TextEdit.ForeColor = Color.Red;
}
remarkEdit.TextEdit.KeyDown += new KeyEventHandler(OnTextEditKeyDown);
remarkEdit.TextEdit.TextChanged += new EventHandler(OnTextEditTextChanged);
if (!isLoadBorder) remarkEdit.TextEdit.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
@@ -4384,6 +4390,11 @@ namespace Lskj.Control.Model
case ControlType.LabMemoEdit:
// 备注框A
LabelMemoEdit memoEdit = new LabelMemoEdit();
if (model.InputBoxFontSize > 0)
{
//memoEdit.TextEdit.Properties.Appearance.Font = new Font(memoEdit.TextEdit.Properties.Appearance.Font.FontFamily, model.RemarkBoxFontSize);
memoEdit.TextEdit.Properties.AppearanceDropDown.Font = new Font(memoEdit.TextEdit.Properties.Appearance.Font.FontFamily, model.InputBoxFontSize);
}
memoEdit.TextEdit.KeyDown += new KeyEventHandler(OnTextEditKeyDown);
memoEdit.TextEdit.TextChanged += new EventHandler(OnTextEditTextChanged);
if (!isLoadBorder) memoEdit.TextEdit.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
@@ -4392,6 +4403,11 @@ namespace Lskj.Control.Model
case ControlType.LabMemoSpaceEdit:
// 备注框A
LabelMemoSpaceEdit memoSpacEdit = new LabelMemoSpaceEdit();
if (model.InputBoxFontSize > 0)
{
//memoSpacEdit.TextEdit.Properties.Appearance.Font = new Font(memoSpacEdit.TextEdit.Properties.Appearance.Font.FontFamily, model.RemarkBoxFontSize);
memoSpacEdit.TextEdit.Properties.AppearanceDropDown.Font = new Font(memoSpacEdit.TextEdit.Properties.Appearance.Font.FontFamily, model.InputBoxFontSize);
}
memoSpacEdit.TextEdit.KeyDown += new KeyEventHandler(OnTextEditKeyDown);
memoSpacEdit.TextEdit.TextChanged += new EventHandler(OnTextEditTextChanged);
if (!isLoadBorder) memoSpacEdit.TextEdit.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
@@ -6183,30 +6199,4 @@ 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 (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;
}
}
}
else if
+39 -10
View File
@@ -948,7 +948,7 @@ namespace Lskj.Control
//this.treeGridLeft.TreeListObj.FocusedNodeChanged += TreeListObj_FocusedNodeChanged;
this.treeGridLeft.SetGridRightMenus(dtRightTable, this.Model, OnGridViewRightCallBack, this._leftGridSearchObj, this.treeGridLeft.MenuStrip);
this.gridLeft.SetGridRowColors(dtColorTable);
this.treeGridLeft.SetGridRowColors(dtColorTable);
this.treeGridLeft.SetReadOnlyColumns(dtTable, GridCustomColumnStruct.BaseLeftGridView + this.Model.ModuleCode);
//主键字段名称
this.treeGridLeft.TreeListObj.KeyFieldName = this.LeftRowObj["fieldsqlid"] + "";
@@ -1423,7 +1423,7 @@ namespace Lskj.Control
return;
string fieldName = string.IsNullOrEmpty(SysModel.leftprimFile) ? this.LeftRowObj["fieldName"] + "" : SysModel.leftprimFile;
/* ───── ① 有配置存储过程:只执行存储过程 ───── */
if (!string.IsNullOrWhiteSpace(SysModel.DragprocessFile))
{
@@ -1473,23 +1473,52 @@ namespace Lskj.Control
string dragCond = ReplaceHelper.ReplaceRowParam(e.SelectGridRow, this.SysModel.DragCond);
int successCount = 0, faultCount = 0;
string ErrorMessage = string.Empty;
if (SystemInfo.Instance.ModuleSpecialDrag) fieldName = this.LeftRowObj["fieldName"] + "";
string LeftName = e.SelectGridRow.Table.Columns[0].ColumnName;
foreach (DataRow item in e.GridViewSelectRows)
{
try
{
bool needUpdate = ReplaceHelper.ReplaceRowParamCond(item, dragCond);
int result = needUpdate
? BaseModuleImpl.UpdateRecord(this.SysModel.MenuTable,
fieldName,
e.SelectGridRow[fieldName] + "",
this.ModuleGridObj.ParmaryKey,
item[this.ModuleGridObj.ParmaryKey] + "")
: 0;
int result = 0;
if (SystemInfo.Instance.ModuleSpecialDrag)
{
//2026-4-3 赵坤要求按照他的这个逻辑写
// update {模块表名} set {树型结点关联的字段名}='{左边第一个字段(工具里第一个)}' where {主表主键}='{主表主键值}'
result = needUpdate
? BaseModuleImpl.UpdateRecord(this.SysModel.MenuTable,
fieldName,
e.SelectGridRow[LeftName] + "",
this.ModuleGridObj.ParmaryKey,
item[this.ModuleGridObj.ParmaryKey] + "")
: 0;
}
else
{
// update {模块表名} set {fieldName}='{左侧选中行中的fieldName}' where {主表主键}='{主表主键值}'
result = needUpdate
? BaseModuleImpl.UpdateRecord(this.SysModel.MenuTable,
fieldName,
e.SelectGridRow[fieldName] + "",
this.ModuleGridObj.ParmaryKey,
item[this.ModuleGridObj.ParmaryKey] + "")
: 0;
}
if (result == 1)
{
successCount++;
string log = $"{this.SysModel.MenuTable}表{this.ModuleGridObj.ParmaryKey}='{item[this.ModuleGridObj.ParmaryKey]}' 的 {fieldName} 修改为 {e.SelectGridRow[fieldName]}";
string log = string.Empty;
if (SystemInfo.Instance.ModuleSpecialDrag)
{
log = $"{this.SysModel.MenuTable}表{this.ModuleGridObj.ParmaryKey}='{item[this.ModuleGridObj.ParmaryKey]}' 的 {fieldName} 修改为 {e.SelectGridRow[LeftName]}";
}
else
{
log = $"{this.SysModel.MenuTable}表{this.ModuleGridObj.ParmaryKey}='{item[this.ModuleGridObj.ParmaryKey]}' 的 {fieldName} 修改为 {e.SelectGridRow[fieldName]}";
}
LogUtil.WriteDebug(this.Model.ModuleCode, "拖拽修改",
this.Model.FormText + item[this.ModuleGridObj.ParmaryKey], log,
this.Model.ModuleId + "");
+60 -2
View File
@@ -205,6 +205,10 @@ namespace Lskj.Control
/// 扫码添加行
/// </summary>
public DataRow SweepCodeRow = null;
/// <summary>
/// 浏览器添加行是否成功
/// </summary>
public bool BrowserAddRow = false;
#endregion
#region public set property
@@ -789,9 +793,10 @@ namespace Lskj.Control
{
DataTable table = gcMain.GridControl.DataSourceTable();
int rowNumber = table.Rows.Count;
this.BrowserAddRow = false;
//新增一行
this.AddGridViewRecord();
if (this.gcMain.GridView.FocusedRowHandle == rowNumber)
if (this.gcMain.GridView.FocusedRowHandle == rowNumber&& BrowserAddRow)
{
//成功新增行,把网页返回的行赋值
foreach (GridColumn col in gridColumns)
@@ -1038,6 +1043,7 @@ namespace Lskj.Control
bandedGridControlEx.Model = this.Model;
bandedGridControlEx.SysModel = this.SysModel;
bandedGridControlEx.Dock = DockStyle.Fill;
bandedGridControlEx.TotalQuantity = this.SysModel.TotalQuantity;
// 明确设置禁止自动调整列宽
bandedGridControlEx.BandedView.OptionsView.ColumnAutoWidth = false;
gcMain.CustomGroupBandEx = bandedGridControlEx;
@@ -2055,6 +2061,7 @@ namespace Lskj.Control
}
}
}
this.BrowserAddRow = true;
view.UpdateCurrentRow();
view.ShowEditor();
}
@@ -3749,10 +3756,15 @@ namespace Lskj.Control
this.gcMain.ModifyCond = this.SysModel.ModifyCond;
//主键
this.gcMain.MultiplePrimary = parmaryKey;
//合计是否只显示行数
this.gcMain.TotalQuantity = this.SysModel.TotalQuantity;
// 常用工具
this.InitializeCommonTool();
if (SysModel.isLeftRightMode) this.pl_top_right.Visible = false;
this.gcMain.OnNewLine += new GridControlEx.ModuleAddLine(AddGridRows);
//隐藏按钮,改变pl_top_right宽度,重新计算按钮坐标(显示比列放大的话,左侧条件可能会别遮住,需要减去宽度后重新算坐标)
this.CalculateCoordinates();
@@ -5892,4 +5904,50 @@ namespace Lskj.Control
// 获取字体和最大宽度
Document document = richEdit.Document;
Font font = richEdit.Font;
int maxWidth = richEdit.ClientSize.Width - richEdit.Padding.Horizontal;
// 获取前3行文本
string[] lines = richEdit.Text.Split(new[] { Environment.NewLine }, StringSplitOptions.None);
int lineCount = Math.Min(4, lines.Length);
string firstThreeLines = string.Join(Environment.NewLine, lines.Take(lineCount));
// 创建StringFormat
StringFormat format = new StringFormat(StringFormat.GenericTypographic);
format.FormatFlags |= StringFormatFlags.MeasureTrailingSpaces;
// 测量文本高度
using (Graphics g = richEdit.CreateGraphics())
{
SizeF textSize = g.MeasureString(
firstThreeLines,
font,
maxWidth,
format
);
return (int)Math.Ceiling(textSize.Height);
}
}
/// <summary>
/// 新增行,并替换指定字段值
/// </summary>
/// <param name="FieldName"></param>
/// <param name="list"></param>
public void AddGridRows(string FieldName, List<string> list)
{
if (string.IsNullOrWhiteSpace(this.SysModel.MenuAddName))
{
DataTable dt = this.gcMain.GridControl.DataSource as DataTable;
if (dt == null)
{
MessageUtil.Show("请查询后添加!");
return;
}
if (!SysModel.CanEdit)
{
MessageUtil.Show("表格不可编辑,增加失败");
return;
}
if (!(dt.Column
@@ -155,6 +155,16 @@ namespace Lskj.Control.MultiModelLookUp
/// 返回关联的字典
/// </summary>
public Dictionary<string, string> ModuleResultDic = new Dictionary<string, string>();
/// <summary>
/// 返回多行的集合(模块返回添加行 167 168)
/// </summary>
public List<string> EditValueList = new List<string>();
public List<string> EditTextList = new List<string>();
/// <summary>
/// 是否返回集合
/// </summary>
public bool ReturnCollection;
#endregion
public FrmModelLookUp2(string ModuleCodel)
{
@@ -801,9 +811,9 @@ namespace Lskj.Control.MultiModelLookUp
/// </summary>
private void maximization(object sender, EventArgs e)
{
double a = (double)PositionSplitter / (double)WindowHeight;
this.splitMain_Right.SplitterPosition = Convert.ToInt32(Math.Round((double)this.Height * a));
WindowHeight = this.Height;
//double a = (double)PositionSplitter / (double)WindowHeight;
//this.splitMain_Right.SplitterPosition = Convert.ToInt32(Math.Round((double)this.Height * a));
//WindowHeight = this.Height;
}
#endregion
#region
@@ -948,13 +958,39 @@ namespace Lskj.Control.MultiModelLookUp
{
EditValue = string.Empty;
EditText = string.Empty;
this.EditValueList.Clear();
this.EditTextList.Clear();
ModuleResultDic.Clear();
DataTable sourceTable = this.gcDetail.GridControl.DataSource as DataTable;
foreach (DataRow item in sourceTable.Rows)
if (ReturnCollection)
{
this.EditValue += item[ValueMember] + ",";
this.EditText += item[TextField] + ",";
int i = 0;
foreach (DataRow item in sourceTable.Rows)
{
if (i == 0)
{
this.EditValue = item[ValueMember] + "";
this.EditText = item[TextField] + "";
}
else
{
this.EditValueList.Add(item[ValueMember] + "");
this.EditTextList.Add(item[TextField] + "");
}
i++;
}
}
else
{
foreach (DataRow item in sourceTable.Rows)
{
this.EditValue += item[ValueMember] + ",";
this.EditText += item[TextField] + ",";
}
}
if (!string.IsNullOrEmpty(AddModuleResult))
{
string[] resultFields = AddModuleResult.Split(',');
+5 -1
View File
@@ -266,7 +266,7 @@ namespace Lskj.Control
}
/********* 2. PageVisibleCond(可见性判定) ***************************/
if (!string.IsNullOrEmpty(leftGrid.SysModel.PageVisbleCond))
if (leftGrid.SysModel!=null && !string.IsNullOrEmpty(leftGrid.SysModel.PageVisbleCond))
{
string condSql = ReplaceHelper.ReplaceRowParam(rowItem,
ReplaceHelper.ReplaceUserInfo(leftGrid.SysModel.PageVisbleCond));
@@ -480,6 +480,10 @@ namespace Lskj.Control
var g2 = mg.GridControlObj;
g2.GridView.FocusedRowObjectChanged += (s, e) => RefreshRightTab(rightTab, g2);
RefreshRightTab(rightTab, g2); // 首次加载
} else if (page.Tag is GridControlEx g3)
{
g3.GridView.FocusedRowObjectChanged += (s, e) => RefreshRightTab(rightTab, g3);
RefreshRightTab(rightTab, g3);// 首次加载
}
page.Controls.Add(split);// 跟原来保持一致的 Tag 用法
}