提交当前本机整理版本
This commit is contained in:
@@ -248,4 +248,32 @@ namespace Lskj.Control.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 创��
|
||||
/// 创建修改记录表
|
||||
/// </summary>
|
||||
public static void CreateModificationRecordTable()
|
||||
{
|
||||
if (!Lskj.Business.Impl.BaseImpl.HasExistsTable("P_SystemAuditChangeLog"))
|
||||
{
|
||||
string sqlValue = string.Format(@"CREATE TABLE P_SystemAuditChangeLog (
|
||||
id BIGINT IDENTITY(1,1) NOT NULL PRIMARY KEY,
|
||||
orderNumber VARCHAR(50) NOT NULL, -- 单号
|
||||
fieldName NVARCHAR(500) NOT NULL, -- 字段名称
|
||||
oldValue NVARCHAR(500) NULL, -- 旧值(改动前)
|
||||
newValue NVARCHAR(500) NULL, -- 新值(改动后)
|
||||
stepCode INT NOT NULL, -- 步骤号
|
||||
operatorId int NOT NULL -- 人员id(改动人)
|
||||
);");
|
||||
BaseImpl.ExecSqlValue(sqlValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -525,4 +525,28 @@ namespace Lskj.Control.Model
|
||||
/// <para>说明:页签控件个数改变时更改标题字体大小</para>
|
||||
/// <para>创建人:唐德馨</para>
|
||||
/// <para>创建日期:2021-09-03</para>
|
||||
//
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
private static void TabPages_CollectionChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
DevExpress.XtraTab.XtraTabPage tabPage = e.Element as DevExpress.XtraTab.XtraTabPage;
|
||||
if (e.Action.ToString().Equals("Add"))
|
||||
{
|
||||
tabPage.Appearance.Header.Font = new Font(tabPage.Appearance.Header.Font.OriginalFontName, Convert.ToSingle(tabPage.Appearance.Header.Font.Size * fontZoomValue * fontZoomValue));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
string Message = Lskj.Business.Impl.ErrorMessage.PromptErrorMessage(ex);
|
||||
MessageUtil.Show(Message, ex.Message);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -483,4 +483,29 @@ namespace Lskj.Control.Model
|
||||
/// <summary>
|
||||
/// <para>说明:</para>
|
||||
/// <para>创建人:龚宇超</para>
|
||||
/// <para>创建日期�
|
||||
/// <para>创建日期:2017-11-01 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <param name="libaryName">Name of the libary.</param>
|
||||
/// <param name="paramList">The parameter list.</param>
|
||||
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
|
||||
private bool ExecDelphiLibary(string libaryName, List<string> paramList)
|
||||
{
|
||||
try
|
||||
{
|
||||
DelphiHelper.LoadDelphiDll(libaryName, paramList[0], paramList[1], paramList[2], paramList[3], Convert.ToInt32(paramList[4]), paramList[5]);
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
//MessageUtil.Show(ex);
|
||||
string Message = ErrorMessage.PromptErrorMessage(ex);
|
||||
MessageUtil.Show(Message, ex.Message);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -339,4 +339,34 @@ namespace Lskj.Control.Model
|
||||
/// <summary>
|
||||
/// 字段浏览权限
|
||||
/// </summary>
|
||||
public string PrivilegeVie
|
||||
public string PrivilegeView { get; set; }
|
||||
/// <summary>
|
||||
/// 字段操作权限
|
||||
/// </summary>
|
||||
public string PrivilegeOper { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 字段操作权限
|
||||
/// </summary>
|
||||
public bool AdditionalAssociations { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 审核界面控件标题颜色
|
||||
/// </summary>
|
||||
public string AuditControlTitleColor { get; set; }
|
||||
/// <summary>
|
||||
/// 新版模块返回框类型,显示对应text值(默认只显示数据库中对应内容)
|
||||
/// </summary>
|
||||
public bool ModuleFrameDisplayText;
|
||||
/// <summary>
|
||||
/// 备注输入框中字体大小
|
||||
/// </summary>
|
||||
public int InputBoxFontSize { get; set; }
|
||||
/// <summary>
|
||||
///记住上一次的值(关闭时记住上一次的条件值,下一次打开时输入上去。关闭程序后清空)
|
||||
/// </summary>
|
||||
public bool RememberValue { get; set; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -601,4 +601,28 @@ namespace Lskj.Control.Model
|
||||
/// 不需要根据数据源sql获取数据源的控件
|
||||
/// </summary>
|
||||
/// <param name="fieldType"></param>
|
||||
/// <returns></return
|
||||
/// <returns></returns>
|
||||
public static bool IsNotLoadData(int fieldType)
|
||||
{
|
||||
return fieldType == LabText ||
|
||||
fieldType == LabDate ||
|
||||
fieldType == LabDateTime ||
|
||||
fieldType == LabDateTimeShort ||
|
||||
fieldType == LabDateHalfDay ||
|
||||
fieldType == LabTime ||
|
||||
fieldType == LabShortTime ||
|
||||
fieldType == LabTextInt ||
|
||||
fieldType == LabPassWordValue ||
|
||||
fieldType == LabRemark ||
|
||||
fieldType == LabMemoEdit ||
|
||||
fieldType == LabWWW ||
|
||||
fieldType == LabQQ ||
|
||||
fieldType == LabPhone ||
|
||||
fieldType == LabSelectReturnIdNew ||
|
||||
fieldType == LabSelectReturnTextNew ||
|
||||
fieldType == LabApiBtuton||
|
||||
fieldType == LabModuleAddRowsID ||
|
||||
fieldType == LabModuleAddRowsText;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,4 +68,30 @@ namespace Lskj.Control.Model
|
||||
|
||||
default:
|
||||
case (int)ControlType.LabDate:
|
||||
case (int)ControlType.
|
||||
case (int)ControlType.LabCheckDateEx:
|
||||
formatValue = mDate;
|
||||
break;
|
||||
case (int)ControlType.LabDateTime:
|
||||
case (int)ControlType.LabCheckDateTimeEx:
|
||||
formatValue = mDateTime;
|
||||
break;
|
||||
case (int)ControlType.LabDateTimeShort:
|
||||
case (int)ControlType.LabCheckDateTimeShort:
|
||||
formatValue = mDateTimeShort;
|
||||
break;
|
||||
case (int)ControlType.LabTime:
|
||||
case (int)ControlType.LabCheckTime:
|
||||
formatValue = mTime;
|
||||
break;
|
||||
case (int)ControlType.LabShortTime:
|
||||
case (int)ControlType.LabCheckShortTime:
|
||||
formatValue = mShortTime;
|
||||
break;
|
||||
case (int)ControlType.LabShortDate:
|
||||
formatValue = mShortDate;
|
||||
break;
|
||||
}
|
||||
return formatValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -375,4 +375,37 @@ namespace Lskj.Control
|
||||
/// <summary>
|
||||
/// 常用工具执行参数
|
||||
/// </summary>
|
||||
|
||||
public class ScanCodeArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// 提示信息
|
||||
/// </summary>
|
||||
public string TipMsg;
|
||||
/// <summary>
|
||||
/// 条码值
|
||||
/// </summary>
|
||||
public string ScanCode;
|
||||
/// <summary>
|
||||
/// 是否取消执行
|
||||
/// </summary>
|
||||
public bool CancelFlag;
|
||||
}
|
||||
/// <summary>
|
||||
/// 右键菜单替换参数
|
||||
/// </summary>
|
||||
public class HandleParamsArgs : EventArgs
|
||||
{
|
||||
public HandleParamsArgs(List<string> paras, DataRow[] rows, string param, DataRow focusedRow)
|
||||
{
|
||||
ParamItem = param;
|
||||
FocusedRow = focusedRow;
|
||||
Rows = rows;
|
||||
paramList = paras;
|
||||
}
|
||||
public DataRow FocusedRow { get; private set; }
|
||||
public DataRow[] Rows { get; private set; }
|
||||
public List<string> paramList { get; private set; }
|
||||
public string ParamItem { get; private set; }
|
||||
public string FieldValue { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -493,4 +493,35 @@ namespace Lskj.Control.Model
|
||||
this.FormatEditBox = item.Table.Columns.Contains("FormatEditBox") ? "1".Equals(item["FormatEditBox"] + "") : false;
|
||||
this.PromptText = item.Table.Columns.Contains("PromptText") ? item["PromptText"] + "" : string.Empty;
|
||||
this.ColumnAnnotation = item.Table.Columns.Contains("ColumnAnnotation") ? item["ColumnAnnotation"] + "" : string.Empty;
|
||||
t
|
||||
this.TitleColor = item.Table.Columns.Contains("TitleColor") ? item["TitleColor"] + "" : string.Empty;
|
||||
//为了和工具里和bs里统一
|
||||
if (this._fieldtype == 42)
|
||||
{
|
||||
//模块弹出框单选返回id
|
||||
this._fieldtype = 160;
|
||||
this.IsRadio = true;
|
||||
}
|
||||
if (this._fieldtype == 43)
|
||||
{
|
||||
//模块弹出框多选返回id
|
||||
this._fieldtype = 160;
|
||||
//this._fieldtype = 116;
|
||||
this.IsRadio = false;
|
||||
}
|
||||
|
||||
if (this._fieldtype == 171)
|
||||
{
|
||||
//模块选择返回ID(新版)单选
|
||||
this._fieldtype = 160;
|
||||
this.IsRadio = true;
|
||||
}
|
||||
if (this._fieldtype == 172)
|
||||
{
|
||||
//模块选择返回Text(新版)单选
|
||||
this._fieldtype = 161;
|
||||
this.IsRadio = true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -302,6 +302,10 @@ namespace Lskj.Control.Model
|
||||
/// Dll模板
|
||||
/// </summary>
|
||||
public string Library;
|
||||
/// <summary>
|
||||
/// pubadd模块中,对应的页签隐藏下方操作按钮
|
||||
/// </summary>
|
||||
public bool AddHideBottomPanel;
|
||||
|
||||
/// <summary>
|
||||
/// 主模块编号
|
||||
@@ -366,4 +370,15 @@ namespace Lskj.Control.Model
|
||||
this.LoadFilter = item.Table.Columns.Contains("LoadFilter") ? "1".Equals(item["LoadFilter"] + "") : false;
|
||||
this.DynamicDetails = item.Table.Columns.Contains("DynamicDetails") ? "1".Equals(item["DynamicDetails"] + "") : false;
|
||||
this.DetailSearch = item.Table.Columns.Contains("DetailSearch") ? "1".Equals(item["DetailSearch"] + "") : false;
|
||||
|
||||
this.RecordDetailsCheckbox = item.Table.Columns.Contains("RecordDetailsCheckbox") ? "1".Equals(item["RecordDetailsCheckbox"] + "") : false;
|
||||
this.MrpConditionTab = item.Table.Columns.Contains("MrpConditionTab") ? "1".Equals(item["MrpConditionTab"] + "") : false;
|
||||
this.PlanLetfControl = item.Table.Columns.Contains("PlanLetfControl") ? item["PlanLetfControl"] + "" : "";
|
||||
this.HideBottomPanel = item.Table.Columns.Contains("HideBottomPanel") ? "1".Equals(item["HideBottomPanel"] + "") : false;
|
||||
this.ChartText = item.Table.Columns.Contains("ChartText") ? item["ChartText"] + "" : "";
|
||||
this.ChartTextColor = item.Table.Columns.Contains("ChartTextColor") ? item["ChartTextColor"] + "" : "";
|
||||
this.IgnoreAssociatedFields = item.Table.Columns.Contains("IgnoreAssociatedFields") ? "1".Equals(item["IgnoreAssociatedFields"] + "") : false;
|
||||
this.Library = item.Table.Columns.Contains("Library") ? item["Library"] + "" : "";
|
||||
this.AddHideBottomPanel = item.Table.Columns.Contains("AddHideBottomPanel") ? "1".Equals(item["AddHideBottomPanel"] + "") : false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -533,4 +533,33 @@ namespace Lskj.Control.Model
|
||||
parentNode.CheckState = allChecked ? CheckState.Checked :
|
||||
(allUnchecked ? CheckState.Unchecked : CheckState.Indeterminate);
|
||||
|
||||
// 递
|
||||
// 递归更新上层父节点
|
||||
UpdateParentNode(parentNode);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 拖拽时判断条件
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected bool JudgingConditions()
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(DragConditions))
|
||||
{
|
||||
string DragCond = ReplaceHelper.ReplaceRowParam(this._targetGridView.GetDataRow(this._targetGridView.FocusedRowHandle), DragConditions);
|
||||
DataRow[] rows = GetGridSelectRows(DragHander.Count > 1 && this._sourceGridView.GetSelectedRows().Length == DragHander.Count ? DragHander.ToArray() : this._sourceGridView.GetSelectedRows());
|
||||
foreach (DataRow row in rows)
|
||||
{
|
||||
if (!ReplaceHelper.ReplaceRowParamCond(row, DragCond))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -269,4 +269,27 @@ namespace Lskj.Control.Model
|
||||
{
|
||||
|
||||
if (treeNode == null) return;
|
||||
if (treeNode.Nod
|
||||
if (treeNode.Nodes.Count() > 0 && !CanDragParentNode)
|
||||
{
|
||||
MessageUtil.Show(string.Format(ResourceKeys.UnLastTreeNode, treeNode.GetDisplayText(treeListGrid.KeyFieldName)));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!e.Data.GetDataPresent(typeof(TreeNode)))
|
||||
{
|
||||
if (OnDragComplete != null)
|
||||
{
|
||||
GridDragTreeGridArgs args = new GridDragTreeGridArgs();
|
||||
args.GridViewObj = this._gridView;
|
||||
args.TreeListObj = this._treeListGrid;
|
||||
args.GridViewSelectRows = this.GetGridSelectRows(this._gridView.GetSelectedRows());
|
||||
args.SelectTreeNode = treeNode;
|
||||
args.BeforeTreeNode = this._beforeListNode;
|
||||
OnDragComplete(sender, args);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4635,4 +4635,42 @@ namespace Lskj.Control.Model
|
||||
{
|
||||
result = result.Replace(invalidChar, '_');
|
||||
}
|
||||
result = Regex.Replace(result,
|
||||
result = Regex.Replace(result, @"[\x00-\x1F]", "_").Trim('\'');
|
||||
if (string.IsNullOrWhiteSpace(result))
|
||||
{
|
||||
result = "Sheet";
|
||||
}
|
||||
if (result.Length > 31)
|
||||
{
|
||||
result = result.Substring(0, 31);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取可作为临时文件名的Excel名称。
|
||||
/// </summary>
|
||||
/// <param name="fileName">原始文件名。</param>
|
||||
/// <returns>处理后的文件名。</returns>
|
||||
private static string GetSafeExcelFileName(string fileName)
|
||||
{
|
||||
string result = GetSafeWorksheetName(fileName);
|
||||
foreach (char invalidChar in Path.GetInvalidFileNameChars())
|
||||
{
|
||||
result = result.Replace(invalidChar, '_');
|
||||
}
|
||||
if (string.IsNullOrWhiteSpace(result))
|
||||
{
|
||||
result = "Sheet";
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -575,4 +575,40 @@ public static class LabPicUrlPreview
|
||||
// 为避免对流的依赖,先 Image.FromStream,再复制
|
||||
using (Image img = Image.FromStream(ms))
|
||||
{
|
||||
return new B
|
||||
return new Bitmap(img);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static Image ScaleBitmap(Bitmap src, int targetHeight)
|
||||
{
|
||||
int h = targetHeight <= 0 ? 30 : targetHeight;
|
||||
if (h < 18) h = 18;
|
||||
double ratio = (double)h / (double)src.Height;
|
||||
int w = (int)Math.Round((double)src.Width * ratio);
|
||||
if (w < 1) w = 1;
|
||||
return new Bitmap(src, new Size(w, h));
|
||||
}
|
||||
|
||||
private static Image CopyBitmap(Bitmap src)
|
||||
{
|
||||
return new Bitmap(src);
|
||||
}
|
||||
|
||||
private static void BeginInvokeSafe(System.Windows.Forms.Control c, Action action)
|
||||
{
|
||||
if (action == null) return;
|
||||
try
|
||||
{
|
||||
if (c != null && !c.IsDisposed)
|
||||
c.BeginInvoke(action);
|
||||
else
|
||||
action();
|
||||
}
|
||||
catch
|
||||
{
|
||||
try { action(); } catch { }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -543,4 +543,40 @@ public static class LabPicUrlPreview_TreeList
|
||||
{
|
||||
using (Image img = Image.FromStream(ms))
|
||||
{
|
||||
return new
|
||||
return new Bitmap(img);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static Image ScaleBitmap(Bitmap src, int targetHeight)
|
||||
{
|
||||
int h = targetHeight <= 0 ? 30 : targetHeight;
|
||||
if (h < 18) h = 18;
|
||||
double ratio = (double)h / (double)src.Height;
|
||||
int w = (int)Math.Round((double)src.Width * ratio);
|
||||
if (w < 1) w = 1;
|
||||
return new Bitmap(src, new Size(w, h));
|
||||
}
|
||||
|
||||
private static Image CopyBitmap(Bitmap src)
|
||||
{
|
||||
return new Bitmap(src);
|
||||
}
|
||||
|
||||
private static void BeginInvokeSafe(System.Windows.Forms.Control c, Action action)
|
||||
{
|
||||
if (action == null) return;
|
||||
try
|
||||
{
|
||||
if (c != null && !c.IsDisposed)
|
||||
c.BeginInvoke(action);
|
||||
else
|
||||
action();
|
||||
}
|
||||
catch
|
||||
{
|
||||
try { action(); } catch { }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -146,4 +146,31 @@ namespace Lskj.Control.Model.MenuStrip
|
||||
this._gridView.ClearSelection();
|
||||
this._gridView.SelectRowHandler(this._oldRowHandler);
|
||||
}
|
||||
protected override List<string> HandleRightMenuParams(List<string> para
|
||||
protected override List<string> HandleRightMenuParams(List<string> paramList, DataRow rowData, DataRow[] rowDatas = null, int actionType = 0)
|
||||
{
|
||||
List<string> handleParamList = base.HandleRightMenuParams(paramList, rowData, rowDatas, actionType);
|
||||
|
||||
foreach (string item in handleParamList)
|
||||
{
|
||||
if (item.StartsWith("{"))
|
||||
{
|
||||
string field = item.Replace("{", "").Replace("}", "");
|
||||
if ("COLUMN_NAME".Equals(field))
|
||||
{
|
||||
handleParamList.Add(this._gridView.FocusedColumn.FieldName);
|
||||
}
|
||||
else if ("COLUMN_TITLE".Equals(field))
|
||||
{
|
||||
|
||||
handleParamList.Add(this._gridView.FocusedColumn.GetTextCaption());
|
||||
}
|
||||
else
|
||||
{
|
||||
handleParamList.Add(rowData[field] + "");
|
||||
}
|
||||
}
|
||||
}
|
||||
return handleParamList;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2056,4 +2056,28 @@ namespace Lskj.Control.Model
|
||||
DataRow[] dataRows = columnsTab.Select().Where(n => (n["name"] + "").Equals(colunmField.Key)).ToArray();
|
||||
if (dataRows.Length == 0)
|
||||
{
|
||||
string a
|
||||
string addColSql = string.Format("alter table P_PrivateDllTab add {0} {1}", colunmField.Key, colunmField.Value);
|
||||
SqlHelper.ExecuteNonQuery(addColSql);//添加列
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
string createTabSql = "create table P_PrivateDllTab(id int IDENTITY(1,1) NOT NULL,{0})";
|
||||
string createCol = string.Empty;
|
||||
foreach (KeyValuePair<string, string> colunmField in colDic)
|
||||
{
|
||||
createCol += string.Format("{0} {1},", colunmField.Key, colunmField.Value);
|
||||
}
|
||||
createTabSql = string.Format(createTabSql, createCol.TrimEnd(','));
|
||||
SqlHelper.ExecuteNonQuery(createTabSql);//创建表
|
||||
}
|
||||
return true;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -234,4 +234,31 @@ namespace Lskj.Control.Model
|
||||
this._gridView.SelectRowHandler(this._oldRowHandler);
|
||||
}
|
||||
}
|
||||
protected override List<string> HandleRightMenuParams(List<string> para
|
||||
protected override List<string> HandleRightMenuParams(List<string> paramList, DataRow rowData, DataRow[] rowDatas = null, int actionType = 0)
|
||||
{
|
||||
List<string> handleParamList = base.HandleRightMenuParams(paramList, rowData, rowDatas, actionType);
|
||||
|
||||
foreach (string item in handleParamList)
|
||||
{
|
||||
if (item.StartsWith("{"))
|
||||
{
|
||||
string field = item.Replace("{", "").Replace("}", "");
|
||||
if ("COLUMN_NAME".Equals(field))
|
||||
{
|
||||
handleParamList.Add(this._gridView.FocusedColumn.FieldName);
|
||||
}
|
||||
else if ("COLUMN_TITLE".Equals(field))
|
||||
{
|
||||
|
||||
handleParamList.Add(this._gridView.FocusedColumn.GetTextCaption());
|
||||
}
|
||||
else
|
||||
{
|
||||
handleParamList.Add(rowData[field] + "");
|
||||
}
|
||||
}
|
||||
}
|
||||
return handleParamList;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -477,4 +477,23 @@ namespace Lskj.Control.Model
|
||||
this.UnionZTid = string.IsNullOrWhiteSpace(item["UnionZTid"] + "") ? "" : item["UnionZTid"] + "";
|
||||
if (item.Table.Columns.Contains("DisableSuccessfulPrompt"))
|
||||
this.DisableSuccessfulPrompt = string.IsNullOrWhiteSpace(item["DisableSuccessfulPrompt"] + "") ? false : "1".Equals(item["DisableSuccessfulPrompt"] + "");
|
||||
if (item.Table.Columns.
|
||||
if (item.Table.Columns.Contains("PageName"))
|
||||
this.PageName = item["PageName"] + "";
|
||||
if (item.Table.Columns.Contains("ClickCond"))
|
||||
this.ClickCond = item["ClickCond"] + "";
|
||||
if (item.Table.Columns.Contains("VerifyUpdate"))
|
||||
this.VerifyUpdate = string.IsNullOrWhiteSpace(item["VerifyUpdate"] + "") ? false : "1".Equals(item["VerifyUpdate"] + "");
|
||||
if (item.Table.Columns.Contains("CancelDefaultReplace"))
|
||||
this.CancelDefaultReplace = string.IsNullOrWhiteSpace(item["CancelDefaultReplace"] + "") ? false : "1".Equals(item["CancelDefaultReplace"] + "");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///是否必须选中行
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance has must select row; otherwise, <c>false</c>.</value>
|
||||
public bool IsMustSelectRow()
|
||||
{
|
||||
return ParamList.Contains("{") || _beforeMsg.Contains("{") || _successMsg.Contains("{") || Action.Contains("{");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,4 +146,30 @@ namespace Lskj.Control.Model.MenuStrip
|
||||
TreeListCell cell = cells[0];
|
||||
DataRow focusedRow = this.BaseGridView.GetFocusedDataRow();
|
||||
string colValue = focusedRow == null || !focusedRow.Table.Columns.Contains(cell.Column.Name) ? "" : focusedRow[cell.Column.Name] + "";
|
||||
cond = cond.ReplaceColumnParam(
|
||||
cond = cond.ReplaceColumnParam(cell.Column.Name, cell.Column.Caption, colValue);
|
||||
}
|
||||
}
|
||||
if (ControlObj != null)
|
||||
cond = ControlObj.ReplaceParentControlValue(cond);
|
||||
//cms.Enabled = ReplaceHelper.EvalCond(cond);
|
||||
|
||||
if (model.ForbiddenDisplay)
|
||||
{
|
||||
cms.Visible = ValidateCond(cond, null);
|
||||
}
|
||||
|
||||
cms.Enabled = ValidateCond(cond, null); ;
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
string Message = ErrorMessage.PromptErrorMessage(ex);
|
||||
MessageUtil.Show(ResourceKeys.SetRightMenuCondFault + "\r\n" + Message);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -265,4 +265,29 @@ namespace Lskj.Control
|
||||
.SkipWhile(frame =>
|
||||
frame.GetMethod()?.DeclaringType == typeof(MessageUtil) // 跳过当前类的方法
|
||||
|| frame.GetMethod()?.Module.ScopeName.StartsWith("System.") == true // 跳过系统框架方法
|
||||
|| fr
|
||||
|| frame.GetMethod()?.Module.ScopeName.StartsWith("DevExpress.") == true) // 跳过DevExpress框架方法
|
||||
.Take(5); // 只取前5层,避免过长
|
||||
|
||||
// 拼接调用栈信息
|
||||
var stackLines = businessFrames.Select(frame =>
|
||||
{
|
||||
var method = frame.GetMethod();
|
||||
var fileName = frame.GetFileName();
|
||||
var lineNumber = frame.GetFileLineNumber();
|
||||
|
||||
return $"方法:{method?.DeclaringType?.FullName}.{method?.Name}" +
|
||||
(string.IsNullOrEmpty(fileName) ? "" : $" | 文件:{fileName}") +
|
||||
(lineNumber > 0 ? $" | 行号:{lineNumber}" : "");
|
||||
});
|
||||
|
||||
return string.Join(Environment.NewLine, stackLines) ?? "无有效调用栈";
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return $"获取调用栈失败:{ex.Message}";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6429,4 +6429,41 @@ namespace Lskj.Control.Model
|
||||
}
|
||||
//else
|
||||
//{
|
||||
|
||||
// baseControl.ForeColor = ColorTranslator.FromHtml("#000000");
|
||||
// baseControl.ContentBold = false;
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 清空控件颜色(无需传入txt_ 内部已经追加)
|
||||
/// </summary>
|
||||
/// <param name="controlName"></param>
|
||||
public void SetClearBackgroundColor()
|
||||
{
|
||||
try
|
||||
{
|
||||
foreach (ControlModel item in _models)
|
||||
{
|
||||
BaseUserControl control = this.FindControl(item.FieldName);
|
||||
if (control != null)
|
||||
{
|
||||
control.BackgroundColor = Color.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -179,4 +179,33 @@ namespace Lskj.Control.Model
|
||||
form.Dispose();
|
||||
}
|
||||
|
||||
private static void Preview_OnPrint(object sender, PreviewControl.PrintEventArgs e)
|
||||
private static void Preview_OnPrint(object sender, PreviewControl.PrintEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
if (e.Preview != null && e.Preview.Report != null && e.Preview.Report.Preview != null)
|
||||
{
|
||||
//this.ReportObj.PrintSettings.PageRange = PageRange.All; // 设置为全部页面
|
||||
//this.ReportObj.PrintSettings.PageNumbers = ""; // 清空页码范围
|
||||
bool isPrint = e.Preview.Report.Preview.Print();
|
||||
if (isPrint)
|
||||
{
|
||||
if (OnAfterPrint != null)
|
||||
OnAfterPrint(sender, e);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageUtil.Show("Preview, Report or Report Preview is null");
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
string Message = ErrorMessage.PromptErrorMessage(ex);
|
||||
MessageUtil.Show(Message, ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,4 +50,38 @@ namespace Lskj.Control.Model
|
||||
/// <summary>
|
||||
/// 当前右键点击时的表格
|
||||
/// </summary>
|
||||
public static GridView _
|
||||
public static GridView _RightMenuGridView;
|
||||
public static GridView RightMenuGridView
|
||||
{
|
||||
get
|
||||
{
|
||||
return StaticControl._RightMenuGridView;
|
||||
}
|
||||
set
|
||||
{
|
||||
StaticControl._RightMenuGridView = value;
|
||||
StaticControl.Comprefix = "";
|
||||
StaticControl.ReturnRowLisy.Clear();
|
||||
}
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// bom附件修改时的关联页签
|
||||
/// </summary>
|
||||
public static XtraTabPage BomUnionPage;
|
||||
/// <summary>
|
||||
/// 当前右键点击时的控件对象
|
||||
/// </summary>
|
||||
public static MyControl RightMenuMyControl;
|
||||
/// <summary>
|
||||
/// 当前右键点击时的表格的列前缀
|
||||
/// </summary>
|
||||
public static string Comprefix;
|
||||
/// <summary>
|
||||
/// 浏览器返回数据
|
||||
/// </summary>
|
||||
public static List<DataRow> ReturnRowLisy = new List<DataRow>();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -216,4 +216,33 @@ namespace Lskj.Control.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>说明:源树表格鼠�
|
||||
/// <para>说明:源树表格鼠标按下</para>
|
||||
/// <para>创建人:</para>
|
||||
/// <para>创建日期:2023-3-20 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
private void treeList_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
//this._sourceTreeList.AllowDrop = false;
|
||||
//this._targetGridView.GridControl.AllowDrop = true;
|
||||
|
||||
TreeList treelist = sender as TreeList;
|
||||
downHitInfo = null;
|
||||
_hitInfo = null;
|
||||
TreeListHitInfo hitInfo = treelist.CalcHitInfo(new Point(e.X, e.Y));
|
||||
|
||||
// if (Control.ModifierKeys != Keys.None) return;
|
||||
if (e.Button == MouseButtons.Left && hitInfo != null)
|
||||
{
|
||||
StaticControl.SourceDragGridView = null;
|
||||
this._draging = true;
|
||||
downHitInfo = hitInfo;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -288,3 +288,29 @@ namespace Lskj.Control.Model
|
||||
if (!NeglectingNodes)
|
||||
{
|
||||
|
||||
if (treeNode == null) return;
|
||||
if (treeNode.Nodes.Count() > 0 && !CanDragParentNode)
|
||||
{
|
||||
MessageUtil.Show(string.Format(ResourceKeys.UnLastTreeNode, treeNode.GetDisplayText(treeListGrid.KeyFieldName)));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!e.Data.GetDataPresent(typeof(TreeNode)))
|
||||
{
|
||||
if (OnDragComplete != null)
|
||||
{
|
||||
TreeGridDragTreeGridArgs args = new TreeGridDragTreeGridArgs();
|
||||
args.SourceTreeList = this._sourceTreeList;
|
||||
args.TargetTreeList = this._targetTreeList;
|
||||
args.GridViewSelectRows = this.GetViewFocusedDataRows(); ;
|
||||
args.SelectTreeNode = treeNode;
|
||||
OnDragComplete(sender, args);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,4 +50,34 @@ namespace Lskj.Control.Model
|
||||
public static void ShowForm(string msg = null)
|
||||
{
|
||||
_dataMsg = msg ?? ResourceKeys.DataLoading;
|
||||
if (LanguageTrans
|
||||
if (LanguageTranslation.Translatable) _dataMsg = LanguageTranslation.GetTranslatedText(_dataMsg);
|
||||
bool flag = !LoadForm.IsSplashFormVisible;
|
||||
if (flag)
|
||||
{
|
||||
_loadForm.ShowWaitForm();
|
||||
_loadForm.SetWaitFormCaption(_dataMsg);
|
||||
}
|
||||
else
|
||||
{
|
||||
_loadForm.SetWaitFormCaption(_dataMsg);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:关闭等待窗体</para>
|
||||
/// <para>创建人:龚宇超</para>
|
||||
/// <para>创建日期:2017-08-11 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
public static void HideForm()
|
||||
{
|
||||
bool isSplashFormVisible = LoadForm.IsSplashFormVisible;
|
||||
if (isSplashFormVisible)
|
||||
{
|
||||
_loadForm.CloseWaitForm();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user