SVN r1167
SVN-Revision: r1167
This commit is contained in:
@@ -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 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);
|
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;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1005,9 +1010,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 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);
|
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);
|
MessageUtil.Show(apiHelper.apiResutMsg);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
if (tag == "1")
|
if (tag == "1")
|
||||||
{
|
{
|
||||||
@@ -1874,23 +1884,4 @@ namespace Lskj.Control
|
|||||||
string confirmOpers = "",
|
string confirmOpers = "",
|
||||||
bool ret = false,
|
bool ret = false,
|
||||||
int returnd = 0,
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1107,6 +1107,8 @@ namespace Lskj.Control
|
|||||||
if (this.InvokeRequired)
|
if (this.InvokeRequired)
|
||||||
{
|
{
|
||||||
this.Invoke((EventHandler)delegate
|
this.Invoke((EventHandler)delegate
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
DataTable table = this.Popup.GridControlObj.DataSourceTable();
|
DataTable table = this.Popup.GridControlObj.DataSourceTable();
|
||||||
int iIndexWidth = popupObj.GridViewObj.IndicatorWidth;
|
int iIndexWidth = popupObj.GridViewObj.IndicatorWidth;
|
||||||
@@ -1150,6 +1152,13 @@ namespace Lskj.Control
|
|||||||
popupObj.Width = popupWidth;
|
popupObj.Width = popupWidth;
|
||||||
this.CalcPopupLocation();
|
this.CalcPopupLocation();
|
||||||
this._Handed = false;
|
this._Handed = false;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
string Message = ErrorMessage.PromptErrorMessage(ex);
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1240,7 +1249,7 @@ namespace Lskj.Control
|
|||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
string Message = ErrorMessage.PromptErrorMessage(ex);
|
string Message = ErrorMessage.PromptErrorMessage(ex);
|
||||||
throw;
|
//throw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1465,13 +1474,6 @@ namespace Lskj.Control
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void AutoGridLookUp_TextChanged(object sender, EventArgs e)
|
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 (PopShowFlag)
|
||||||
{
|
{
|
||||||
if (SystemInfo.Instance.TrimWhiteSpace)
|
if (SystemInfo.Instance.TrimWhiteSpace)
|
||||||
|
|||||||
@@ -1180,6 +1180,24 @@ namespace Lskj.Control
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (model.isSumMerge && !string.IsNullOrEmpty(e.FieldValue + ""))
|
if (model.isSumMerge && !string.IsNullOrEmpty(e.FieldValue + ""))
|
||||||
|
{
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(model.MergeGroup))
|
||||||
|
{
|
||||||
|
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
|
||||||
{
|
{
|
||||||
if (model.CanMerge && BeforeClass == Convert.ToDecimal(e.FieldValue))
|
if (model.CanMerge && BeforeClass == Convert.ToDecimal(e.FieldValue))
|
||||||
{
|
{
|
||||||
@@ -1191,6 +1209,10 @@ namespace Lskj.Control
|
|||||||
if (isSum || String.IsNullOrEmpty(model.SumCond)) customSum += Convert.ToDecimal(e.FieldValue);
|
if (isSum || String.IsNullOrEmpty(model.SumCond)) customSum += Convert.ToDecimal(e.FieldValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
if (isSum)
|
if (isSum)
|
||||||
{
|
{
|
||||||
if (BeforeClass != Convert.ToDecimal(e.FieldValue))
|
if (BeforeClass != Convert.ToDecimal(e.FieldValue))
|
||||||
@@ -2833,6 +2855,7 @@ namespace Lskj.Control
|
|||||||
Math.Round(avg, 2),
|
Math.Round(avg, 2),
|
||||||
Math.Round(max, 2),
|
Math.Round(max, 2),
|
||||||
Math.Round(min, 2));
|
Math.Round(min, 2));
|
||||||
|
if (this.TotalQuantity) this.lblTotal.Text = string.Format("已选中 {0} 行", rows.Length);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|||||||
@@ -273,13 +273,14 @@ namespace Lskj.Control
|
|||||||
model.FieldType == ControlType.LabMultiSelectValueParam ||
|
model.FieldType == ControlType.LabMultiSelectValueParam ||
|
||||||
model.FieldType == ControlType.LabAutoGridValue ||
|
model.FieldType == ControlType.LabAutoGridValue ||
|
||||||
model.FieldType == ControlType.LabSelectReturnId ||
|
model.FieldType == ControlType.LabSelectReturnId ||
|
||||||
(model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText)
|
(model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText) ||
|
||||||
|
model.FieldType == ControlType.LabModuleAddRowsID
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
string sqlValue = model.SqlSource;
|
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
|
//单选模式数据源为模块sql 新版模块选中返回id固定位模块sql
|
||||||
DataRow modelRow = Business.Impl.MainImpl.GetSystemdllTab(model.addModuleld);
|
DataRow modelRow = Business.Impl.MainImpl.GetSystemdllTab(model.addModuleld);
|
||||||
@@ -484,7 +485,8 @@ namespace Lskj.Control
|
|||||||
model.FieldType == ControlType.LabMultiSelectValueParam ||
|
model.FieldType == ControlType.LabMultiSelectValueParam ||
|
||||||
model.FieldType == ControlType.LabAutoGridValue ||
|
model.FieldType == ControlType.LabAutoGridValue ||
|
||||||
model.FieldType == ControlType.LabSelectReturnId ||
|
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] + "");
|
string fieldValue = GetValueByImportText(dr, gc.FieldName, dr[gc.FieldName] + "");
|
||||||
|
|||||||
@@ -279,13 +279,14 @@ namespace Lskj.Control
|
|||||||
model.FieldType == ControlType.LabMultiSelectValueParam ||
|
model.FieldType == ControlType.LabMultiSelectValueParam ||
|
||||||
model.FieldType == ControlType.LabAutoGridValue||
|
model.FieldType == ControlType.LabAutoGridValue||
|
||||||
model.FieldType == ControlType.LabSelectReturnId||
|
model.FieldType == ControlType.LabSelectReturnId||
|
||||||
(model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText)
|
(model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText)||
|
||||||
|
model.FieldType == ControlType.LabModuleAddRowsID
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
string sqlValue = model.SqlSource;
|
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
|
//单选模式数据源为模块sql 新版模块选中返回id固定位模块sql
|
||||||
DataRow modelRow = Business.Impl.MainImpl.GetSystemdllTab(model.addModuleld);
|
DataRow modelRow = Business.Impl.MainImpl.GetSystemdllTab(model.addModuleld);
|
||||||
@@ -490,7 +491,8 @@ namespace Lskj.Control
|
|||||||
model.FieldType == ControlType.LabMultiSelectValueParam ||
|
model.FieldType == ControlType.LabMultiSelectValueParam ||
|
||||||
model.FieldType == ControlType.LabAutoGridValue||
|
model.FieldType == ControlType.LabAutoGridValue||
|
||||||
model.FieldType == ControlType.LabSelectReturnId||
|
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] + "");
|
string fieldValue = GetValueByImportText(dr, gc.FieldName, dr[gc.FieldName] + "");
|
||||||
|
|||||||
@@ -26,12 +26,12 @@ namespace Lskj.Control
|
|||||||
public bool isBatchDownLoad = false;
|
public bool isBatchDownLoad = false;
|
||||||
public bool isprompt = true;
|
public bool isprompt = true;
|
||||||
public bool isMultiple = false;//是否为忽略多选
|
public bool isMultiple = false;//是否为忽略多选
|
||||||
public bool isOpenvisble = false;//是否为忽略多选
|
public bool isOpenvisble = false;//是否可以直接打开
|
||||||
public string ModelId= string.Empty;//菜单名称
|
public string ModelId= string.Empty;//菜单名称
|
||||||
public string MenuName = string.Empty;//右键名称
|
public string MenuName = string.Empty;//右键名称
|
||||||
public string MenuId = string.Empty;//菜单ID
|
public string MenuId = string.Empty;//菜单ID
|
||||||
|
|
||||||
|
public string SavePath = string.Empty;//下载路径(浏览器dll,多次下载,记录第一次路径,后续外部拿到后在默认赋值)
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 右键多条下载是否显示
|
/// 右键多条下载是否显示
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -161,6 +161,7 @@ namespace Lskj.Control
|
|||||||
PrintFile(labAddress.EditText);
|
PrintFile(labAddress.EditText);
|
||||||
File.Delete(labAddress.EditText);
|
File.Delete(labAddress.EditText);
|
||||||
}
|
}
|
||||||
|
this.DialogResult = DialogResult.OK;
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -136,4 +136,13 @@ namespace Lskj.Control
|
|||||||
}
|
}
|
||||||
else
|
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));
|
||||||
|
|
||||||
|
|
||||||
@@ -144,7 +144,7 @@ namespace Lskj.Control
|
|||||||
{
|
{
|
||||||
string rawValue = HttpUtility.UrlDecode(string.Join("=", eqParams.Skip(1))).TrimEnd();
|
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
|
else
|
||||||
|
|||||||
@@ -465,6 +465,18 @@ namespace Lskj.Control
|
|||||||
/// 必填字段
|
/// 必填字段
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string RequiredFields = string.Empty;
|
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()
|
public GridControlEx()
|
||||||
{
|
{
|
||||||
@@ -1151,6 +1163,10 @@ namespace Lskj.Control
|
|||||||
//case ControlType.LabGridPopupMutilText:
|
//case ControlType.LabGridPopupMutilText:
|
||||||
InitGridPopup(column, model);
|
InitGridPopup(column, model);
|
||||||
break;
|
break;
|
||||||
|
case ControlType.LabModuleAddRowsID:
|
||||||
|
case ControlType.LabModuleAddRowsText:
|
||||||
|
InitModuleReturnLine(column, model);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -5038,7 +5054,55 @@ namespace Lskj.Control
|
|||||||
this.mControlList.Add(model);
|
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>
|
/// <summary>
|
||||||
@@ -6647,6 +6711,8 @@ namespace Lskj.Control
|
|||||||
//}
|
//}
|
||||||
|
|
||||||
if (RefreshTotal) this.gridView.UpdateSummary();//合计列值改变后更新合计计算
|
if (RefreshTotal) this.gridView.UpdateSummary();//合计列值改变后更新合计计算
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
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;
|
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));
|
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)
|
catch (Exception ex)
|
||||||
@@ -7295,7 +7363,6 @@ namespace Lskj.Control
|
|||||||
|
|
||||||
//多选关联单据头
|
//多选关联单据头
|
||||||
string SourceSQL = modelLookUp.SysModel.MenuSql.Replace("#", "") + model.SplicingConditions;
|
string SourceSQL = modelLookUp.SysModel.MenuSql.Replace("#", "") + model.SplicingConditions;
|
||||||
//SourceSQL = modelLookUp.SysModel.MenuSql.Replace("#", "");
|
|
||||||
//单据头关联取值
|
//单据头关联取值
|
||||||
if (this.ParentControl != null)
|
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>
|
||||||
/// 模块返回框清空
|
/// 模块返回框清空
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -329,4 +329,7 @@ namespace Lskj.Control.Model
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool ImportCurrentValue { get; set; }
|
public bool ImportCurrentValue { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///是否为 �
|
///是否为 单据动态生成列开始日期控件
|
||||||
|
/// </summary>
|
||||||
|
public bool SchedStartDataControl { get; set; }
|
||||||
|
/// <summary>
|
||||||
@@ -67,6 +67,7 @@ namespace Lskj.Control.Model
|
|||||||
/// 日期框 显示(年-月)
|
/// 日期框 显示(年-月)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const int LabShortDate = 444444;
|
public const int LabShortDate = 444444;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 自动搜索框 保存Value值, 显示Text值
|
/// 自动搜索框 保存Value值, 显示Text值
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -468,6 +469,14 @@ namespace Lskj.Control.Model
|
|||||||
///提示框
|
///提示框
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const int LabPrompt = 166;
|
public const int LabPrompt = 166;
|
||||||
|
/// <summary>
|
||||||
|
///模块选择返回行,返回ID
|
||||||
|
/// </summary>
|
||||||
|
public const int LabModuleAddRowsID = 167;
|
||||||
|
/// <summary>
|
||||||
|
///模块选择返回行,返回text
|
||||||
|
/// </summary>
|
||||||
|
public const int LabModuleAddRowsText = 168;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// <para>说明:是否为Value类型</para>
|
/// <para>说明:是否为Value类型</para>
|
||||||
@@ -566,4 +575,6 @@ namespace Lskj.Control.Model
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
/// 不需要根据数据源sql获取数据源的控件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name=
|
||||||
@@ -228,6 +228,9 @@ namespace Lskj.Control.Model
|
|||||||
/// 合计计算公式
|
/// 合计计算公式
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string sumCalc { get; set; }
|
public string sumCalc { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 合并分组
|
||||||
|
/// </summary>
|
||||||
public string MergeGroup { get; set; }
|
public string MergeGroup { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 合并数据是否求和(合并单元格只计算一次)
|
/// 合并数据是否求和(合并单元格只计算一次)
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ namespace Lskj.Control.Model
|
|||||||
/// <value>The union module.</value>
|
/// <value>The union module.</value>
|
||||||
public string UnionModule { get { return _unionModule; } }
|
public string UnionModule { get { return _unionModule; } }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 关联模块
|
/// 关联条件
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The union module.</value>
|
/// <value>The union module.</value>
|
||||||
public string UnionCond { get { return _unionCond; } }
|
public string UnionCond { get { return _unionCond; } }
|
||||||
@@ -294,6 +294,10 @@ namespace Lskj.Control.Model
|
|||||||
/// 隐藏下方操作按钮
|
/// 隐藏下方操作按钮
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string ChartTextColor;
|
public string ChartTextColor;
|
||||||
|
/// <summary>
|
||||||
|
/// 刷新单表明细时忽略关联字段(单表中,有关联模块,但是没有关联条件,关联值,是不会去查询数据的)
|
||||||
|
/// </summary>
|
||||||
|
public bool IgnoreAssociatedFields;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 主模块编号
|
/// 主模块编号
|
||||||
@@ -356,4 +360,5 @@ namespace Lskj.Control.Model
|
|||||||
this.QueryAgain = item.Table.Columns.Contains("QueryAgain") ? "1".Equals(item["QueryAgain"] + "") : false;
|
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.BottomRefreshMain = item.Table.Columns.Contains("BottomRefreshMain") ? "1".Equals(item["BottomRefreshMain"] + "") : false;
|
||||||
this.LoadFilter = item.Table.Columns.Contains("LoadFilter") ? "1".Equals(item["LoadFilter"] + "") : 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
|
||||||
@@ -2395,6 +2395,11 @@ namespace Lskj.Control.Model
|
|||||||
|
|
||||||
if (cell != null)
|
if (cell != null)
|
||||||
{
|
{
|
||||||
|
if (cell.CellType == CellType.Error)
|
||||||
|
{
|
||||||
|
// 你可以返回空,或者标记为 "错误值"
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (cell.CellType == CellType.Blank)
|
if (cell.CellType == CellType.Blank)
|
||||||
{
|
{
|
||||||
//isImportRows = false;
|
//isImportRows = false;
|
||||||
@@ -2440,7 +2445,7 @@ namespace Lskj.Control.Model
|
|||||||
model.FieldType == ControlType.LabDateTime ||
|
model.FieldType == ControlType.LabDateTime ||
|
||||||
model.FieldType == ControlType.LabDateTimeShort ||
|
model.FieldType == ControlType.LabDateTimeShort ||
|
||||||
model.FieldType == ControlType.LabTime ||
|
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;
|
continue;
|
||||||
@@ -2499,7 +2504,8 @@ namespace Lskj.Control.Model
|
|||||||
|| model.FieldType == ControlType.LabAutoGridValue
|
|| model.FieldType == ControlType.LabAutoGridValue
|
||||||
|| model.FieldType == ControlType.LabAutoGridValueParam
|
|| model.FieldType == ControlType.LabAutoGridValueParam
|
||||||
|| model.FieldType == ControlType.LabSelectReturnId
|
|| model.FieldType == ControlType.LabSelectReturnId
|
||||||
|| (model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText)
|
|| (model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText)||
|
||||||
|
model.FieldType == ControlType.LabModuleAddRowsID
|
||||||
))
|
))
|
||||||
{
|
{
|
||||||
bool isEmpty = model.CanNull;
|
bool isEmpty = model.CanNull;
|
||||||
@@ -2846,7 +2852,8 @@ namespace Lskj.Control.Model
|
|||||||
|| model.FieldType == ControlType.LabAutoGridValue
|
|| model.FieldType == ControlType.LabAutoGridValue
|
||||||
|| model.FieldType == ControlType.LabAutoGridValueParam
|
|| model.FieldType == ControlType.LabAutoGridValueParam
|
||||||
|| model.FieldType == ControlType.LabSelectReturnId
|
|| model.FieldType == ControlType.LabSelectReturnId
|
||||||
|| (model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText)
|
|| (model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText)||
|
||||||
|
model.FieldType == ControlType.LabModuleAddRowsID
|
||||||
))
|
))
|
||||||
{
|
{
|
||||||
bool isEmpty = model.CanNull;
|
bool isEmpty = model.CanNull;
|
||||||
@@ -3275,7 +3282,8 @@ namespace Lskj.Control.Model
|
|||||||
model.FieldType == ControlType.LabMultiSelectValueParam ||
|
model.FieldType == ControlType.LabMultiSelectValueParam ||
|
||||||
model.FieldType == ControlType.LabAutoGridValue ||
|
model.FieldType == ControlType.LabAutoGridValue ||
|
||||||
model.FieldType == ControlType.LabSelectReturnId ||
|
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] + "");
|
string fieldValue = GetValueByImportText(dr, gc.FieldName, dr[gc.FieldName] + "");
|
||||||
@@ -3691,13 +3699,14 @@ namespace Lskj.Control.Model
|
|||||||
|| model.FieldType == ControlType.LabAutoGridValue
|
|| model.FieldType == ControlType.LabAutoGridValue
|
||||||
|| model.FieldType == ControlType.LabAutoGridValueParam
|
|| model.FieldType == ControlType.LabAutoGridValueParam
|
||||||
|| model.FieldType == ControlType.LabSelectReturnId
|
|| model.FieldType == ControlType.LabSelectReturnId
|
||||||
|| (model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText)
|
|| (model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText)||
|
||||||
|
model.FieldType == ControlType.LabModuleAddRowsID
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
string sqlValue = model.SqlSource;
|
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
|
//单选模式数据源为模块sql 新版模块选中返回id固定位模块sql
|
||||||
DataRow modelRow = Business.Impl.MainImpl.GetSystemdllTab(model.addModuleld);
|
DataRow modelRow = Business.Impl.MainImpl.GetSystemdllTab(model.addModuleld);
|
||||||
@@ -3767,13 +3776,14 @@ namespace Lskj.Control.Model
|
|||||||
|| model.FieldType == ControlType.LabAutoGridValueParam
|
|| model.FieldType == ControlType.LabAutoGridValueParam
|
||||||
|| model.FieldType == ControlType.LabSelectReturnId
|
|| model.FieldType == ControlType.LabSelectReturnId
|
||||||
|| (model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText)
|
|| (model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText)
|
||||||
|
|| model.FieldType == ControlType.LabModuleAddRowsID
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
string sqlValue = model.SqlSource;
|
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
|
//单选模式数据源为模块sql 新版模块选中返回id固定位模块sql
|
||||||
DataRow modelRow = Business.Impl.MainImpl.GetSystemdllTab(model.addModuleld);
|
DataRow modelRow = Business.Impl.MainImpl.GetSystemdllTab(model.addModuleld);
|
||||||
|
|||||||
@@ -699,6 +699,7 @@ namespace Lskj.Control.Model
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//打开导入覆盖控件
|
||||||
public bool OpenFrmcCover(GridRightMenuModel model, List<string> paramList)
|
public bool OpenFrmcCover(GridRightMenuModel model, List<string> paramList)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -1784,7 +1785,7 @@ namespace Lskj.Control.Model
|
|||||||
paramList[2] = ReplaceHelper.ReplaceRowParam(rows, url) + "";
|
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];
|
string paramsql1 = paramList[2];
|
||||||
paramList[2] = ReplaceHelper.ReplaceRowParam(rows, paramsql1, "'", "'");
|
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>
|
/// <value><c>true</c> if [more click]; otherwise, <c>false</c>.</value>
|
||||||
public bool MoreClick { get { return _moreClick; } }
|
public bool MoreClick { get { return _moreClick; } }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 右键菜单是否可执参数替换
|
/// 右键菜单是否可执参数替换(合并)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value><c>true</c> if [merg Eexec]; otherwise, <c>false</c>.</value>
|
/// <value><c>true</c> if [merg Eexec]; otherwise, <c>false</c>.</value>
|
||||||
public bool Mergeexec { get { return _mergEexec; } }
|
public bool Mergeexec { get { return _mergEexec; } }
|
||||||
@@ -342,6 +342,10 @@ namespace Lskj.Control.Model
|
|||||||
/// 右键验证是否有修改后的数据
|
/// 右键验证是否有修改后的数据
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool VerifyUpdate;
|
public bool VerifyUpdate;
|
||||||
|
/// <summary>
|
||||||
|
/// 右键多选合并不走默认替换(p_PubPrint.lsp)
|
||||||
|
/// </summary>
|
||||||
|
public bool CancelDefaultReplace;
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -471,4 +475,6 @@ namespace Lskj.Control.Model
|
|||||||
this.SqlDirectExecution = string.IsNullOrWhiteSpace(item["SqlDirectExecution"] + "") ? false : "1".Equals(item["SqlDirectExecution"] + "");
|
this.SqlDirectExecution = string.IsNullOrWhiteSpace(item["SqlDirectExecution"] + "") ? false : "1".Equals(item["SqlDirectExecution"] + "");
|
||||||
if (item.Table.Columns.Contains("UnionZTid"))
|
if (item.Table.Columns.Contains("UnionZTid"))
|
||||||
this.UnionZTid = string.IsNullOrWhiteSpace(item["UnionZTid"] + "") ? "" : item["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.
|
||||||
@@ -250,6 +250,10 @@ namespace Lskj.Control.Model
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public event EventHandler OpenDocumentSource;
|
public event EventHandler OpenDocumentSource;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
///特殊左侧表
|
||||||
|
/// </summary>
|
||||||
|
public GridControlEx SpecialLeftTable;
|
||||||
|
/// <summary>
|
||||||
/// 控件Panel对象
|
/// 控件Panel对象
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public XtraScrollableControl ParentPanel
|
public XtraScrollableControl ParentPanel
|
||||||
@@ -3458,14 +3462,14 @@ namespace Lskj.Control.Model
|
|||||||
this.GridRowCount = this._mainGridEx.SetGridViewDataSource(MainImpl.GetAdapterResult(sqlValue));
|
this.GridRowCount = this._mainGridEx.SetGridViewDataSource(MainImpl.GetAdapterResult(sqlValue));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//if (RememberRow)
|
if (RememberRow)
|
||||||
//{
|
{
|
||||||
// if (this.GridRowCount <= oldRowHandle && SystemInfo.Instance.DeleteSelectedEndOf)
|
if (this.GridRowCount <= oldRowHandle && SystemInfo.Instance.DeleteSelectedEndOf)
|
||||||
// {
|
{
|
||||||
// oldRowHandle = this.GridRowCount - 1;
|
oldRowHandle = this.GridRowCount - 1;
|
||||||
// }
|
}
|
||||||
// SetFocusedRowHandle(oldRowHandle);
|
SetFocusedRowHandle(oldRowHandle);
|
||||||
//}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
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.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.AuditControlTitleColor = item.Table.Columns.Contains("AuditControlTitleColor") ? item["AuditControlTitleColor"] + "" : "";
|
||||||
model.ModuleFrameDisplayText = item.Table.Columns.Contains("ModuleFrameDisplayText") ? "1".Equals(item["ModuleFrameDisplayText"] + "") : false;
|
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里统一
|
//为了和工具里和bs里统一
|
||||||
if (model.FieldType == 42)
|
if (model.FieldType == 42)
|
||||||
{
|
{
|
||||||
@@ -4366,6 +4371,7 @@ namespace Lskj.Control.Model
|
|||||||
remarkEdit.TextEdit.ForeColor = Color.Red;
|
remarkEdit.TextEdit.ForeColor = Color.Red;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
remarkEdit.TextEdit.KeyDown += new KeyEventHandler(OnTextEditKeyDown);
|
remarkEdit.TextEdit.KeyDown += new KeyEventHandler(OnTextEditKeyDown);
|
||||||
remarkEdit.TextEdit.TextChanged += new EventHandler(OnTextEditTextChanged);
|
remarkEdit.TextEdit.TextChanged += new EventHandler(OnTextEditTextChanged);
|
||||||
if (!isLoadBorder) remarkEdit.TextEdit.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
|
if (!isLoadBorder) remarkEdit.TextEdit.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
|
||||||
@@ -4384,6 +4390,11 @@ namespace Lskj.Control.Model
|
|||||||
case ControlType.LabMemoEdit:
|
case ControlType.LabMemoEdit:
|
||||||
// 备注框A
|
// 备注框A
|
||||||
LabelMemoEdit memoEdit = new LabelMemoEdit();
|
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.KeyDown += new KeyEventHandler(OnTextEditKeyDown);
|
||||||
memoEdit.TextEdit.TextChanged += new EventHandler(OnTextEditTextChanged);
|
memoEdit.TextEdit.TextChanged += new EventHandler(OnTextEditTextChanged);
|
||||||
if (!isLoadBorder) memoEdit.TextEdit.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
|
if (!isLoadBorder) memoEdit.TextEdit.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
|
||||||
@@ -4392,6 +4403,11 @@ namespace Lskj.Control.Model
|
|||||||
case ControlType.LabMemoSpaceEdit:
|
case ControlType.LabMemoSpaceEdit:
|
||||||
// 备注框A
|
// 备注框A
|
||||||
LabelMemoSpaceEdit memoSpacEdit = new LabelMemoSpaceEdit();
|
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.KeyDown += new KeyEventHandler(OnTextEditKeyDown);
|
||||||
memoSpacEdit.TextEdit.TextChanged += new EventHandler(OnTextEditTextChanged);
|
memoSpacEdit.TextEdit.TextChanged += new EventHandler(OnTextEditTextChanged);
|
||||||
if (!isLoadBorder) memoSpacEdit.TextEdit.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
|
if (!isLoadBorder) memoSpacEdit.TextEdit.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
|
||||||
@@ -6183,30 +6199,4 @@ namespace Lskj.Control.Model
|
|||||||
LabelDateEdit dateEdit = controlObj as LabelDateEdit;
|
LabelDateEdit dateEdit = controlObj as LabelDateEdit;
|
||||||
value = dateEdit.TextEdit.EditValue == null ? dateEdit.EditText : dateEdit.TextEdit.DateTime.ToString("yyyy-MM-dd");
|
value = dateEdit.TextEdit.EditValue == null ? dateEdit.EditText : dateEdit.TextEdit.DateTime.ToString("yyyy-MM-dd");
|
||||||
}
|
}
|
||||||
else if (controlObj is LabelCheckEdit)
|
else if
|
||||||
{
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -948,7 +948,7 @@ namespace Lskj.Control
|
|||||||
//this.treeGridLeft.TreeListObj.FocusedNodeChanged += TreeListObj_FocusedNodeChanged;
|
//this.treeGridLeft.TreeListObj.FocusedNodeChanged += TreeListObj_FocusedNodeChanged;
|
||||||
|
|
||||||
this.treeGridLeft.SetGridRightMenus(dtRightTable, this.Model, OnGridViewRightCallBack, this._leftGridSearchObj, this.treeGridLeft.MenuStrip);
|
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.SetReadOnlyColumns(dtTable, GridCustomColumnStruct.BaseLeftGridView + this.Model.ModuleCode);
|
||||||
//主键字段名称
|
//主键字段名称
|
||||||
this.treeGridLeft.TreeListObj.KeyFieldName = this.LeftRowObj["fieldsqlid"] + "";
|
this.treeGridLeft.TreeListObj.KeyFieldName = this.LeftRowObj["fieldsqlid"] + "";
|
||||||
@@ -1473,23 +1473,52 @@ namespace Lskj.Control
|
|||||||
string dragCond = ReplaceHelper.ReplaceRowParam(e.SelectGridRow, this.SysModel.DragCond);
|
string dragCond = ReplaceHelper.ReplaceRowParam(e.SelectGridRow, this.SysModel.DragCond);
|
||||||
int successCount = 0, faultCount = 0;
|
int successCount = 0, faultCount = 0;
|
||||||
string ErrorMessage = string.Empty;
|
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)
|
foreach (DataRow item in e.GridViewSelectRows)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
bool needUpdate = ReplaceHelper.ReplaceRowParamCond(item, dragCond);
|
bool needUpdate = ReplaceHelper.ReplaceRowParamCond(item, dragCond);
|
||||||
int result = needUpdate
|
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,
|
? BaseModuleImpl.UpdateRecord(this.SysModel.MenuTable,
|
||||||
fieldName,
|
fieldName,
|
||||||
e.SelectGridRow[fieldName] + "",
|
e.SelectGridRow[fieldName] + "",
|
||||||
this.ModuleGridObj.ParmaryKey,
|
this.ModuleGridObj.ParmaryKey,
|
||||||
item[this.ModuleGridObj.ParmaryKey] + "")
|
item[this.ModuleGridObj.ParmaryKey] + "")
|
||||||
: 0;
|
: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (result == 1)
|
if (result == 1)
|
||||||
{
|
{
|
||||||
successCount++;
|
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, "拖拽修改",
|
LogUtil.WriteDebug(this.Model.ModuleCode, "拖拽修改",
|
||||||
this.Model.FormText + item[this.ModuleGridObj.ParmaryKey], log,
|
this.Model.FormText + item[this.ModuleGridObj.ParmaryKey], log,
|
||||||
this.Model.ModuleId + "");
|
this.Model.ModuleId + "");
|
||||||
|
|||||||
@@ -205,6 +205,10 @@ namespace Lskj.Control
|
|||||||
/// 扫码添加行
|
/// 扫码添加行
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DataRow SweepCodeRow = null;
|
public DataRow SweepCodeRow = null;
|
||||||
|
/// <summary>
|
||||||
|
/// 浏览器添加行是否成功
|
||||||
|
/// </summary>
|
||||||
|
public bool BrowserAddRow = false;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region public set property
|
#region public set property
|
||||||
@@ -789,9 +793,10 @@ namespace Lskj.Control
|
|||||||
{
|
{
|
||||||
DataTable table = gcMain.GridControl.DataSourceTable();
|
DataTable table = gcMain.GridControl.DataSourceTable();
|
||||||
int rowNumber = table.Rows.Count;
|
int rowNumber = table.Rows.Count;
|
||||||
|
this.BrowserAddRow = false;
|
||||||
//新增一行
|
//新增一行
|
||||||
this.AddGridViewRecord();
|
this.AddGridViewRecord();
|
||||||
if (this.gcMain.GridView.FocusedRowHandle == rowNumber)
|
if (this.gcMain.GridView.FocusedRowHandle == rowNumber&& BrowserAddRow)
|
||||||
{
|
{
|
||||||
//成功新增行,把网页返回的行赋值
|
//成功新增行,把网页返回的行赋值
|
||||||
foreach (GridColumn col in gridColumns)
|
foreach (GridColumn col in gridColumns)
|
||||||
@@ -1038,6 +1043,7 @@ namespace Lskj.Control
|
|||||||
bandedGridControlEx.Model = this.Model;
|
bandedGridControlEx.Model = this.Model;
|
||||||
bandedGridControlEx.SysModel = this.SysModel;
|
bandedGridControlEx.SysModel = this.SysModel;
|
||||||
bandedGridControlEx.Dock = DockStyle.Fill;
|
bandedGridControlEx.Dock = DockStyle.Fill;
|
||||||
|
bandedGridControlEx.TotalQuantity = this.SysModel.TotalQuantity;
|
||||||
// 明确设置禁止自动调整列宽
|
// 明确设置禁止自动调整列宽
|
||||||
bandedGridControlEx.BandedView.OptionsView.ColumnAutoWidth = false;
|
bandedGridControlEx.BandedView.OptionsView.ColumnAutoWidth = false;
|
||||||
gcMain.CustomGroupBandEx = bandedGridControlEx;
|
gcMain.CustomGroupBandEx = bandedGridControlEx;
|
||||||
@@ -2055,6 +2061,7 @@ namespace Lskj.Control
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.BrowserAddRow = true;
|
||||||
view.UpdateCurrentRow();
|
view.UpdateCurrentRow();
|
||||||
view.ShowEditor();
|
view.ShowEditor();
|
||||||
}
|
}
|
||||||
@@ -3749,10 +3756,15 @@ namespace Lskj.Control
|
|||||||
this.gcMain.ModifyCond = this.SysModel.ModifyCond;
|
this.gcMain.ModifyCond = this.SysModel.ModifyCond;
|
||||||
//主键
|
//主键
|
||||||
this.gcMain.MultiplePrimary = parmaryKey;
|
this.gcMain.MultiplePrimary = parmaryKey;
|
||||||
|
//合计是否只显示行数
|
||||||
|
this.gcMain.TotalQuantity = this.SysModel.TotalQuantity;
|
||||||
// 常用工具
|
// 常用工具
|
||||||
this.InitializeCommonTool();
|
this.InitializeCommonTool();
|
||||||
if (SysModel.isLeftRightMode) this.pl_top_right.Visible = false;
|
if (SysModel.isLeftRightMode) this.pl_top_right.Visible = false;
|
||||||
|
|
||||||
|
this.gcMain.OnNewLine += new GridControlEx.ModuleAddLine(AddGridRows);
|
||||||
|
|
||||||
|
|
||||||
//隐藏按钮,改变pl_top_right宽度,重新计算按钮坐标(显示比列放大的话,左侧条件可能会别遮住,需要减去宽度后重新算坐标)
|
//隐藏按钮,改变pl_top_right宽度,重新计算按钮坐标(显示比列放大的话,左侧条件可能会别遮住,需要减去宽度后重新算坐标)
|
||||||
this.CalculateCoordinates();
|
this.CalculateCoordinates();
|
||||||
|
|
||||||
@@ -5892,4 +5904,50 @@ namespace Lskj.Control
|
|||||||
|
|
||||||
// 获取字体和最大宽度
|
// 获取字体和最大宽度
|
||||||
Document document = richEdit.Document;
|
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>
|
/// </summary>
|
||||||
public Dictionary<string, string> ModuleResultDic = new Dictionary<string, string>();
|
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
|
#endregion
|
||||||
public FrmModelLookUp2(string ModuleCodel)
|
public FrmModelLookUp2(string ModuleCodel)
|
||||||
{
|
{
|
||||||
@@ -801,9 +811,9 @@ namespace Lskj.Control.MultiModelLookUp
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void maximization(object sender, EventArgs e)
|
private void maximization(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
double a = (double)PositionSplitter / (double)WindowHeight;
|
//double a = (double)PositionSplitter / (double)WindowHeight;
|
||||||
this.splitMain_Right.SplitterPosition = Convert.ToInt32(Math.Round((double)this.Height * a));
|
//this.splitMain_Right.SplitterPosition = Convert.ToInt32(Math.Round((double)this.Height * a));
|
||||||
WindowHeight = this.Height;
|
//WindowHeight = this.Height;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
#region 选中行
|
#region 选中行
|
||||||
@@ -948,13 +958,39 @@ namespace Lskj.Control.MultiModelLookUp
|
|||||||
{
|
{
|
||||||
EditValue = string.Empty;
|
EditValue = string.Empty;
|
||||||
EditText = string.Empty;
|
EditText = string.Empty;
|
||||||
|
this.EditValueList.Clear();
|
||||||
|
this.EditTextList.Clear();
|
||||||
ModuleResultDic.Clear();
|
ModuleResultDic.Clear();
|
||||||
DataTable sourceTable = this.gcDetail.GridControl.DataSource as DataTable;
|
DataTable sourceTable = this.gcDetail.GridControl.DataSource as DataTable;
|
||||||
|
|
||||||
|
if (ReturnCollection)
|
||||||
|
{
|
||||||
|
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)
|
foreach (DataRow item in sourceTable.Rows)
|
||||||
{
|
{
|
||||||
this.EditValue += item[ValueMember] + ",";
|
this.EditValue += item[ValueMember] + ",";
|
||||||
this.EditText += item[TextField] + ",";
|
this.EditText += item[TextField] + ",";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(AddModuleResult))
|
if (!string.IsNullOrEmpty(AddModuleResult))
|
||||||
{
|
{
|
||||||
string[] resultFields = AddModuleResult.Split(',');
|
string[] resultFields = AddModuleResult.Split(',');
|
||||||
|
|||||||
@@ -266,7 +266,7 @@ namespace Lskj.Control
|
|||||||
}
|
}
|
||||||
|
|
||||||
/********* 2. PageVisibleCond(可见性判定) ***************************/
|
/********* 2. PageVisibleCond(可见性判定) ***************************/
|
||||||
if (!string.IsNullOrEmpty(leftGrid.SysModel.PageVisbleCond))
|
if (leftGrid.SysModel!=null && !string.IsNullOrEmpty(leftGrid.SysModel.PageVisbleCond))
|
||||||
{
|
{
|
||||||
string condSql = ReplaceHelper.ReplaceRowParam(rowItem,
|
string condSql = ReplaceHelper.ReplaceRowParam(rowItem,
|
||||||
ReplaceHelper.ReplaceUserInfo(leftGrid.SysModel.PageVisbleCond));
|
ReplaceHelper.ReplaceUserInfo(leftGrid.SysModel.PageVisbleCond));
|
||||||
@@ -480,6 +480,10 @@ namespace Lskj.Control
|
|||||||
var g2 = mg.GridControlObj;
|
var g2 = mg.GridControlObj;
|
||||||
g2.GridView.FocusedRowObjectChanged += (s, e) => RefreshRightTab(rightTab, g2);
|
g2.GridView.FocusedRowObjectChanged += (s, e) => RefreshRightTab(rightTab, g2);
|
||||||
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 用法
|
page.Controls.Add(split);// 跟原来保持一致的 Tag 用法
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user