SVN r1190

SVN-Revision: r1190
This commit is contained in:
cyf
2026-06-01 01:53:15 +00:00
parent 6245aa0768
commit 141493a620
23 changed files with 1491 additions and 278 deletions
+17 -14
View File
@@ -254,13 +254,14 @@ namespace Lskj.Control
e.Appearance.ForeColor = ColorTranslator.FromHtml(model.ForceColor);
}
FontStyle fontStyle = new FontStyle();
if (model.IsBold) fontStyle = fontStyle | FontStyle.Bold;
if (model.IsItalic) fontStyle = fontStyle | FontStyle.Italic;
if (model.IsStrickOut) fontStyle = fontStyle | FontStyle.Strikeout;
if (model.IsUnderLine) fontStyle = fontStyle | FontStyle.Underline;
FontStyle fontStyle = FontStyle.Regular;
e.Appearance.Font = new Font(e.Appearance.Font, fontStyle);
if (model.IsBold) fontStyle |= FontStyle.Bold;
if (model.IsItalic) fontStyle |= FontStyle.Italic;
if (model.IsStrickOut) fontStyle |= FontStyle.Strikeout;
if (model.IsUnderLine) fontStyle |= FontStyle.Underline;
e.Appearance.FontStyleDelta = fontStyle;
}
}
catch (Exception)
@@ -355,13 +356,14 @@ namespace Lskj.Control
e.Appearance.ForeColor = ColorTranslator.FromHtml(model.ForceColor);
}
FontStyle fontStyle = new FontStyle();
FontStyle fontStyle = FontStyle.Regular;
if (model.IsBold) fontStyle |= FontStyle.Bold;
if (model.IsItalic) fontStyle |= FontStyle.Italic;
if (model.IsStrickOut) fontStyle |= FontStyle.Strikeout;
if (model.IsUnderLine) fontStyle |= FontStyle.Underline;
e.Appearance.Font = new Font(e.Appearance.Font, fontStyle);
e.Appearance.FontStyleDelta = fontStyle;
}
}
catch (Exception ex)
@@ -987,13 +989,14 @@ namespace Lskj.Control
e.Appearance.ForeColor = ColorTranslator.FromHtml(model.ForceColor);
}
FontStyle fontStyle = new FontStyle();
if (model.IsBold) fontStyle = fontStyle | FontStyle.Bold;
if (model.IsItalic) fontStyle = fontStyle | FontStyle.Italic;
if (model.IsStrickOut) fontStyle = fontStyle | FontStyle.Strikeout;
if (model.IsUnderLine) fontStyle = fontStyle | FontStyle.Underline;
FontStyle fontStyle = FontStyle.Regular;
e.Appearance.Font = new Font(e.Appearance.Font, fontStyle);
if (model.IsBold) fontStyle |= FontStyle.Bold;
if (model.IsItalic) fontStyle |= FontStyle.Italic;
if (model.IsStrickOut) fontStyle |= FontStyle.Strikeout;
if (model.IsUnderLine) fontStyle |= FontStyle.Underline;
e.Appearance.FontStyleDelta = fontStyle;
}
}
catch (Exception)
@@ -17,13 +17,4 @@ namespace Lskj.Control.BrowserSetting
}
protected override void OnAfterCreated(Xilium.CefGlue.CefBrowser browser)
{
base.OnAfterCreated(browser);
BsClient.Created(browser);
}
protected override void OnBeforeClose(CefBrowser browser)
{
base.OnBeforeClose(browser);
}
}
}
base.OnAfterCreated(browser
@@ -6,4 +6,71 @@ using Xilium.CefGlue;
namespace Lskj.Control.BrowserSetting
{
public class BsRequestHandle
public class BsRequestHandler : CefRequestHandler
{
private readonly CefResourceRequestHandler externalProtocolResourceRequestHandler = new BsExternalProtocolResourceRequestHandler();
protected override CefResourceRequestHandler GetResourceRequestHandler(CefBrowser browser, CefFrame frame, CefRequest request, bool isNavigation, bool isDownload, string requestInitiator, ref bool disableDefaultHandling)
{
if (BsExternalProtocolHandler.IsPrintProtocol(request.Url))
return externalProtocolResourceRequestHandler;
return null;
}
protected override bool OnBeforeBrowse(CefBrowser browser, CefFrame frame, CefRequest request, bool userGesture, bool isRedirect)
{
string url = request.Url;
if (BsExternalProtocolHandler.IsPrintProtocol(url))
{
if (frame == null || frame.IsMain)
{
BsExternalProtocolHandler.TryHandle(url);
return true;
}
return false;
}
return base.OnBeforeBrowse(browser, frame, request, userGesture, isRedirect);
}
protected override bool OnOpenUrlFromTab(CefBrowser browser, CefFrame frame, string targetUrl, CefWindowOpenDisposition targetDisposition, bool userGesture)
{
if (BsExternalProtocolHandler.TryHandle(targetUrl))
return true;
return base.OnOpenUrlFromTab(browser, frame, targetUrl, targetDisposition, userGesture);
}
protected override void OnRenderProcessTerminated(CefBrowser browser, CefTerminationStatus status)
{
browser.Reload();
}
}
internal static class BsExternalProtocolHandler
{
private const string PrintProtocol = "lskjprint:";
public static bool IsPrintProtocol(string url)
{
return !string.IsNullOrEmpty(url) && url.StartsWith(PrintProtocol, StringComparison.OrdinalIgnoreCase);
}
public static bool TryHandle(string url)
{
if (!IsPrintProtocol(url))
return false;
try
{
var processStartInfo = new System.Diagnostics.ProcessStartInfo(url)
{
UseShellExecute = true
};
System.Diagnostics.Process.Start(processStartInfo);
}
catch (Exception ex)
@@ -25,5 +25,25 @@ namespace Lskj.Control.BrowserSetting2
base.OnBeforeClose(browser);
}
protected override bool OnBeforePopup(
CefBrowser browser,
CefFrame frame,
string targetUrl,
string targetFrameName,
CefWindowOpenDisposition targetDisposition,
bool userGesture,
CefPopupFeatures popupFeatures,
CefWindowInfo windowInfo,
ref CefClient client,
CefBrowserSettings settings,
ref CefDictionaryValue extraInfo,
ref bool noJavascriptAccess)
{
if (BsExternalProtocolHandler.TryHandle(targetUrl))
return true;
return base.OnBeforePopup(browser, frame, targetUrl, targetFrameName, targetDisposition,
userGesture, popupFeatures, windowInfo, ref client, settings, ref extraInfo, ref noJavascriptAccess);
}
}
}
}
@@ -2,4 +2,105 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
us
using Xilium.CefGlue;
namespace Lskj.Control.BrowserSetting2
{
public class BsRequestHandler : CefRequestHandler
{
private readonly CefResourceRequestHandler externalProtocolResourceRequestHandler = new BsExternalProtocolResourceRequestHandler();
protected override CefResourceRequestHandler GetResourceRequestHandler(CefBrowser browser, CefFrame frame, CefRequest request, bool isNavigation, bool isDownload, string requestInitiator, ref bool disableDefaultHandling)
{
if (BsExternalProtocolHandler.TryMatch(request.Url))
return externalProtocolResourceRequestHandler;
return null;
}
protected override bool OnBeforeBrowse(CefBrowser browser, CefFrame frame, CefRequest request, bool userGesture, bool isRedirect)
{
string url = request.Url;
if (BsExternalProtocolHandler.TryMatch(url))
{
if (frame == null || frame.IsMain)
{
BsExternalProtocolHandler.TryHandle(url);
return true;
}
return false;
}
return base.OnBeforeBrowse(browser, frame, request, userGesture, isRedirect);
}
protected override bool OnOpenUrlFromTab(CefBrowser browser, CefFrame frame, string targetUrl, CefWindowOpenDisposition targetDisposition, bool userGesture)
{
if (BsExternalProtocolHandler.TryHandle(targetUrl))
return true;
return base.OnOpenUrlFromTab(browser, frame, targetUrl, targetDisposition, userGesture);
}
protected override void OnRenderProcessTerminated(CefBrowser browser, CefTerminationStatus status)
{
browser.Reload();
}
}
internal static class BsExternalProtocolHandler
{
private const string PrintProtocol = "lskjprint:";
public static bool TryMatch(string url)
{
return !string.IsNullOrEmpty(url) && url.StartsWith(PrintProtocol, StringComparison.OrdinalIgnoreCase);
}
public static bool TryHandle(string url)
{
if (!TryMatch(url))
return false;
try
{
var processStartInfo = new System.Diagnostics.ProcessStartInfo(url)
{
UseShellExecute = true
};
System.Diagnostics.Process.Start(processStartInfo);
}
catch (Exception ex)
{
System.Windows.Forms.MessageBox.Show(
"打开打印程序失败:" + ex.Message,
"提示",
System.Windows.Forms.MessageBoxButtons.OK,
System.Windows.Forms.MessageBoxIcon.Warning);
}
return true;
}
}
internal sealed class BsExternalProtocolResourceRequestHandler : CefResourceRequestHandler
{
protected override CefCookieAccessFilter GetCookieAccessFilter(CefBrowser browser, CefFrame frame, CefRequest request)
{
return null;
}
protected override void OnProtocolExecution(CefBrowser browser, CefFrame frame, CefRequest request, ref bool allowOsExecution)
{
if (BsExternalProtocolHandler.TryMatch(request.Url))
{
allowOsExecution = true;
return;
}
base.OnProtocolExecution(browser, frame, request, ref allowOsExecution);
}
}
}
+39
View File
@@ -0,0 +1,39 @@
namespace Lskj.Control
{
partial class FrmAnnouncement
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.txtEdit = new DevExpress.XtraEditors.MemoEdit();
((System.ComponentModel.ISupportInitialize)(this.txtEdit.Properties)).BeginInit();
this.SuspendLayout();
//
// txtEdit
//
this.txtEdit.Dock = System.Windows.Forms.DockStyle.Fill;
this.txtEdit.Loca
+158
View File
@@ -0,0 +1,158 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Lskj.Business.Impl;
using Lskj.Core;
using Lskj.Util;
namespace Lskj.Control
{
public partial class FrmAnnouncement : BaseForm
{
private const string AnnouncementSql = "select * from p_ErpProUpdateInfo where AnnouncementDisplay=1 order by updateDate desc";
private Panel bottomPanel;
private DevExpress.XtraEditors.SimpleButton btnConfirm;
public FrmAnnouncement()
{
InitializeComponent();
InitializeAnnouncementForm();
this.Load += FrmAnnouncement_Load;
this.Shown += FrmAnnouncement_Shown;
}
private void InitializeAnnouncementForm()
{
this.FormBorderStyle = FormBorderStyle.Sizable;
this.MaximizeBox = true;
this.MinimizeBox = true;
this.MinimumSize = new Size(500, 300);
this.txtEdit.ReadOnly = true;
this.txtEdit.Properties.ScrollBars = ScrollBars.Vertical;
bottomPanel = new Panel();
bottomPanel.Dock = DockStyle.Bottom;
bottomPanel.Height = 50;
btnConfirm = new DevExpress.XtraEditors.SimpleButton();
btnConfirm.Text = "确定";
btnConfirm.Size = new Size(90, 28);
btnConfirm.Click += BtnConfirm_Click;
bottomPanel.Controls.Add(btnConfirm);
bottomPanel.Resize += BottomPanel_Resize;
this.Controls.Add(bottomPanel);
bottomPanel.BringToFront();
CenterConfirmButton();
}
private void FrmAnnouncement_Load(object sender, EventArgs e)
{
try
{
DataTable table = SqlHelper.ExecuteDataTable(AnnouncementSql);
this.txtEdit.Text = BuildAnnouncementText(table);
this.txtEdit.SelectionStart = 0;
this.txtEdit.SelectionLength = 0;
}
catch (Exception ex)
{
string message = ErrorMessage.PromptErrorMessage(ex);
MessageUtil.Show(message, ex.Message);
LogHelper.Instance.WriteError(ex);
}
}
private void FrmAnnouncement_Shown(object sender, EventArgs e)
{
if (btnConfirm != null)
{
btnConfirm.Focus();
}
}
private void BottomPanel_Resize(object sender, EventArgs e)
{
CenterConfirmButton();
}
private void CenterConfirmButton()
{
if (bottomPanel == null || btnConfirm == null) return;
btnConfirm.Location = new Point(
(bottomPanel.ClientSize.Width - btnConfirm.Width) / 2,
(bottomPanel.ClientSize.Height - btnConfirm.Height) / 2);
}
private void BtnConfirm_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.OK;
this.Close();
}
private string BuildAnnouncementText(DataTable table)
{
if (table == null || table.Rows.Count == 0) return string.Empty;
// 按日期分组(SQL已按updateDate desc排序,分组后日期自然从大到小)
var dateGroups = new List<KeyValuePair<DateTime, List<string>>>();
DateTime? currentDate = null;
List<string> currentGroup = null;
foreach (DataRow row in table.Rows)
{
DateTime updateDate;
if (!DateTime.TryParse(row["updateDate"] + "", out updateDate))
continue;
DateTime dateOnly = updateDate.Date;
string content = row["verDesp"] + "";
if (currentDate != dateOnly)
{
currentDate = dateOnly;
currentGroup = new List<string>();
dateGroups.Add(new KeyValuePair<DateTime, List<string>>(dateOnly, currentGroup));
}
currentGroup.Add(content);
}
StringBuilder text = new StringBuilder();
foreach (var group in dateGroups)
{
if (text.Length > 0) text.AppendLine();
text.Append("时间:");
text.AppendLine(group.Key.ToString("yyyy-MM-dd"));
for (int i = 0; i < group.Value.Count; i++)
{
text.AppendLine((i + 1) + ". " + group.Value[i]);
}
}
return text.ToString();
}
private string FormatUpdateDate(object value)
{
if (value == null || value == DBNull.Value) return string.Empty;
DateTime updateDate;
if (DateTime.TryParse(value + "", out updateDate))
{
return updateDate.ToString("yyyy-MM-dd");
}
return value + "";
}
}
}
+120
View File
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
+4 -4
View File
@@ -133,7 +133,7 @@ namespace Lskj.Control
hasBoolean = true;
}
GridColumnModel model = col.Tag as GridColumnModel;
if (model != null && (model.FieldType == ControlType.LabMultiSelectValue || model.FieldType == ControlType.LabMultiSelectValueNew || model.FieldType == ControlType.LabTreeLookValue || model.FieldType == ControlType.LabMultiSelectValueParam || model.FieldType == ControlType.LabSelectReturnId || (model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText)))
if (model != null && (model.FieldType == ControlType.LabMultiSelectValue || model.FieldType == ControlType.LabMultiSelectValueNew || model.FieldType == ControlType.LabTreeLookValue || model.FieldType == ControlType.LabMultiSelectValueParam || model.FieldType == ControlType.LabSelectReturnId || (model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText) || model.FieldType == ControlType.LabModuleAddRowsID))
{
StoreValueList.Add(col.FieldName);
hasBoolean = true;
@@ -455,7 +455,7 @@ namespace Lskj.Control
}
GridColumnModel model = col.Tag as GridColumnModel;
if (model != null && (model.FieldType == ControlType.LabMultiSelectValue || model.FieldType == ControlType.LabMultiSelectValueNew || model.FieldType == ControlType.LabTreeLookValue || model.FieldType == ControlType.LabMultiSelectValueParam || model.FieldType == ControlType.LabSelectReturnId || (model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText)))
if (model != null && (model.FieldType == ControlType.LabMultiSelectValue || model.FieldType == ControlType.LabMultiSelectValueNew || model.FieldType == ControlType.LabTreeLookValue || model.FieldType == ControlType.LabMultiSelectValueParam || model.FieldType == ControlType.LabSelectReturnId || (model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText) || model.FieldType == ControlType.LabModuleAddRowsID))
{
StoreValueList.Add(col.FieldName);
hasBoolean = true;
@@ -992,10 +992,10 @@ namespace Lskj.Control
}
}
else if (model.FieldType == ControlType.LabSelectReturnId || (model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText))
else if (model.FieldType == ControlType.LabSelectReturnId || (model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText) || model.FieldType == ControlType.LabModuleAddRowsID)
{
string sqlValue = model.SqlSource;
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);
+154 -24
View File
@@ -29,7 +29,6 @@ using Lskj.Util;
using Lskj.Control.Properties;
using Lskj.Model;
using Lskj.Data;
using System.Diagnostics;
using DevExpress.XtraEditors;
using System.Data.SqlClient;
using System.IO;
@@ -54,6 +53,7 @@ using System.Collections;
using Newtonsoft.Json;
using System.Net;
using System.Data.Common;
using Lskj.Control.SpecialDate;
namespace Lskj.Control
{
@@ -1053,6 +1053,9 @@ namespace Lskj.Control
case ControlType.LabShortDate:
InitDateTimeEdit(column, model.FieldType);
break;
case ControlType.LabDateHalfDay:
InitSpecialDate(column, model);
break;
case ControlType.LabTime:
case ControlType.LabShortTime:
InitTimeEdit(column, model.FieldType);
@@ -1176,6 +1179,9 @@ namespace Lskj.Control
InitComboxEdit(column, model);
}
}
/// <summary>
/// <para>说明:设置列格式化</para>
/// <para>创建人:龚宇超</para>
@@ -3773,6 +3779,125 @@ namespace Lskj.Control
gridControl.RepositoryItems.Add(dateEdit);
gridColumn.ColumnEdit = dateEdit;
}
/// <summary>
/// 初始化表格专用日期半天选择列,保存值格式为 yyyy-MM-dd 上午/下午。
/// </summary>
private void InitSpecialDate(GridColumn gridColumn, GridColumnModel model)
{
SpecialDatePopup specialDatePopup = new SpecialDatePopup();
specialDatePopup.Dock = DockStyle.Fill;
PopupContainerControl popupControl = new PopupContainerControl();
popupControl.Controls.Add(specialDatePopup);
popupControl.Size = specialDatePopup.Size;
// 通过 PopupControl.Tag 保存弹出层实例,QueryPopUp 时可取回并同步当前单元格值。
popupControl.Tag = specialDatePopup;
RepositoryItemPopupContainerEdit dateEdit = new RepositoryItemPopupContainerEdit();
dateEdit.NullText = "";
dateEdit.Buttons.Clear();
dateEdit.Buttons.Add(new EditorButton(ButtonPredefines.Combo));
// 允许手工修改文本,同时保留下拉选择。
//dateEdit.TextEditStyle = TextEditStyles.Standard;
// 只能下拉选择
dateEdit.TextEditStyle = TextEditStyles.DisableTextEditor;
dateEdit.PopupControl = popupControl;
// 下拉打开前,把当前单元格值回填到弹出层。
dateEdit.QueryPopUp += OnSpecialDateQueryPopUp;
dateEdit.Tag = model;
// 弹出层只抛出按钮动作,真正写入表格单元格由 GridControlEx 统一处理。
specialDatePopup.ConfirmClick += OnSpecialDateConfirmClick;
specialDatePopup.ClearClick += OnSpecialDateClearClick;
specialDatePopup.CancelClick += OnSpecialDateCancelClick;
gridControl.RepositoryItems.Add(dateEdit);
gridColumn.ColumnEdit = dateEdit;
}
/// <summary>
/// 下拉框弹出前,同步当前编辑器和当前单元格值到 SpecialDatePopup。
/// </summary>
private void OnSpecialDateQueryPopUp(object sender, CancelEventArgs e)
{
try
{
PopupContainerEdit popupEdit = sender as PopupContainerEdit;
if (popupEdit == null) return;
SpecialDatePopup specialDatePopup = popupEdit.Properties.PopupControl.Tag as SpecialDatePopup;
if (specialDatePopup == null) return;
popupEdit.Properties.PopupControl.Size = specialDatePopup.Size;
// 记录本次正在编辑的 PopupContainerEdit,确定/清空/取消时需要回写或关闭它。
specialDatePopup.OwnerEdit = popupEdit;
specialDatePopup.SetValue(popupEdit.EditValue + "");
}
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex, Model.ModuleCode);
MessageUtil.Show(Message, ex.Message);
}
}
/// <summary>
/// 用户点击确定,把弹出层选择的日期和上午/下午写回当前单元格。
/// </summary>
private void OnSpecialDateConfirmClick(object sender, EventArgs e)
{
SpecialDatePopup specialDatePopup = sender as SpecialDatePopup;
if (specialDatePopup == null) return;
SpecialDateSetEditValue(sender, specialDatePopup.SelectedValue);
}
/// <summary>
/// 用户点击清除,清空当前单元格值。
/// </summary>
private void OnSpecialDateClearClick(object sender, EventArgs e)
{
SpecialDateSetEditValue(sender, string.Empty);
}
/// <summary>
/// 用户点击取消,只关闭下拉框,不修改当前单元格值。
/// </summary>
private void OnSpecialDateCancelClick(object sender, EventArgs e)
{
PopupContainerEdit popupEdit = GetSpecialDateOwnerEdit(sender);
if (popupEdit != null)
{
popupEdit.ClosePopup();
}
}
/// <summary>
/// 统一设置当前单元格值,并提交编辑器,让 GridView 后续保存流程能取到新值。
/// </summary>
private void SpecialDateSetEditValue(object sender, string value)
{
PopupContainerEdit popupEdit = GetSpecialDateOwnerEdit(sender);
if (popupEdit == null) return;
popupEdit.EditValue = value;
popupEdit.ClosePopup();
this.gridView.PostEditor();
}
/// <summary>
/// 从弹出层取回本次正在编辑的 PopupContainerEdit。
/// </summary>
private PopupContainerEdit GetSpecialDateOwnerEdit(object sender)
{
SpecialDatePopup specialDatePopup = sender as SpecialDatePopup;
return specialDatePopup == null ? null : specialDatePopup.OwnerEdit;
}
/// <summary>
/// <para>说明:创建Time控件</para>
/// <para>创建人:龚宇超</para>
@@ -5032,7 +5157,8 @@ namespace Lskj.Control
btnEdit.SeparatorChar = ',';
btnEdit.ValueMember = model.FieldType == ControlType.LabSelectReturnIdNew ? model.ValueMember : model.TextMember;
if (model.ModuleFrameDisplayText)
//model.ModuleFrameDisplayText 2026-5-23 丁哥说不需要这个字段
if (model.FieldType == ControlType.LabSelectReturnIdNew)
{
DataTable dataTable = MainImpl.GetDataTableResult(modelLookUp.SysModel.MenuSql);
btnEdit.DataSource = dataTable;
@@ -5325,10 +5451,10 @@ namespace Lskj.Control
public virtual void SetGridRowColors(DataTable table)
{
this.GridRowColorsTable = table;
if (table != null && table.Rows.Count > 0)
{
DataRow rowItem = table.Select("1=1").FirstOrDefault(x => (x["condition"] + "").Contains("COLUMN_"));
if (rowItem != null)
{
this.gridView.RowCellStyle -= new RowCellStyleEventHandler(OnGridViewRowCellStyle);
@@ -6361,15 +6487,17 @@ namespace Lskj.Control
e.Appearance.ForeColor = ColorTranslator.FromHtml(model.ForceColor);
}
}
FontStyle fontStyle = new FontStyle();
if (model.IsBold) fontStyle = fontStyle | FontStyle.Bold;
if (model.IsItalic) fontStyle = fontStyle | FontStyle.Italic;
if (model.IsStrickOut) fontStyle = fontStyle | FontStyle.Strikeout;
if (model.IsUnderLine) fontStyle = fontStyle | FontStyle.Underline;
e.Appearance.Font = new Font(e.Appearance.Font, fontStyle);
FontStyle fontStyle = FontStyle.Regular;
if (model.IsBold) fontStyle |= FontStyle.Bold;
if (model.IsItalic) fontStyle |= FontStyle.Italic;
if (model.IsStrickOut) fontStyle |= FontStyle.Strikeout;
if (model.IsUnderLine) fontStyle |= FontStyle.Underline;
e.Appearance.FontStyleDelta = fontStyle;
}
}
catch (Exception)
@@ -6413,13 +6541,14 @@ namespace Lskj.Control
e.Appearance.ForeColor = ColorTranslator.FromHtml(model.ForceColor);
}
FontStyle fontStyle = new FontStyle();
if (model.IsBold) fontStyle = fontStyle | FontStyle.Bold;
if (model.IsItalic) fontStyle = fontStyle | FontStyle.Italic;
if (model.IsStrickOut) fontStyle = fontStyle | FontStyle.Strikeout;
if (model.IsUnderLine) fontStyle = fontStyle | FontStyle.Underline;
FontStyle fontStyle = FontStyle.Regular;
e.Appearance.Font = new Font(e.Appearance.Font, fontStyle);
if (model.IsBold) fontStyle |= FontStyle.Bold;
if (model.IsItalic) fontStyle |= FontStyle.Italic;
if (model.IsStrickOut) fontStyle |= FontStyle.Strikeout;
if (model.IsUnderLine) fontStyle |= FontStyle.Underline;
e.Appearance.FontStyleDelta = fontStyle;
}
}
catch (Exception)
@@ -6480,7 +6609,6 @@ namespace Lskj.Control
// mergedRowHandle.Add(item.RowHandle);
// }
//}
if (gridView.OptionsSelection.MultiSelect == true && gridView.OptionsSelection.MultiSelectMode == GridMultiSelectMode.CheckBoxRowSelect)
{
int[] selectRows = gridView.GetSelectedRows();
@@ -6552,13 +6680,14 @@ namespace Lskj.Control
e.Appearance.ForeColor = ColorTranslator.FromHtml(model.ForceColor);
}
FontStyle fontStyle = new FontStyle();
if (model.IsBold) fontStyle = fontStyle | FontStyle.Bold;
if (model.IsItalic) fontStyle = fontStyle | FontStyle.Italic;
if (model.IsStrickOut) fontStyle = fontStyle | FontStyle.Strikeout;
if (model.IsUnderLine) fontStyle = fontStyle | FontStyle.Underline;
FontStyle fontStyle = FontStyle.Regular;
e.Appearance.Font = new Font(e.Appearance.Font, fontStyle);
if (model.IsBold) fontStyle |= FontStyle.Bold;
if (model.IsItalic) fontStyle |= FontStyle.Italic;
if (model.IsStrickOut) fontStyle |= FontStyle.Strikeout;
if (model.IsUnderLine) fontStyle |= FontStyle.Underline;
e.Appearance.FontStyleDelta = fontStyle;
}
}
catch (Exception)
@@ -6584,7 +6713,7 @@ namespace Lskj.Control
string PromptText = string.Empty;
// 判断单元格值是否为 null 或空
if (PromptMessage.TryGetValue(e.Column.FieldName, out PromptText) && (e.CellValue == null || string.IsNullOrEmpty(e.CellValue.ToString())))
if ((e.CellValue == null || string.IsNullOrEmpty(e.CellValue.ToString()))&&PromptMessage.TryGetValue(e.Column.FieldName, out PromptText))
{
// 绘制默认单元格背景
e.DefaultDraw();
@@ -9066,6 +9195,7 @@ namespace Lskj.Control
foreach (GridColumn item in gc)
{
GridColumnModel model = item.Tag as GridColumnModel;
if (model == null) continue;
item.OptionsColumn.AllowEdit = false;
item.OptionsColumn.ReadOnly = !item.OptionsColumn.AllowEdit;
+100
View File
@@ -0,0 +1,100 @@
namespace Lskj.Control
{
partial class LabelDateHalfDayEdit
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.plRight = new System.Windows.Forms.Panel();
this.txtEdit = new DevExpress.XtraEditors.PopupContainerEdit();
this.plLeft = new System.Windows.Forms.Panel();
this.lblText = new System.Windows.Forms.Label();
this.plRight.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.txtEdit.Properties)).BeginInit();
this.plLeft.SuspendLayout();
this.SuspendLayout();
//
// plRight
//
this.plRight.Controls.Add(this.txtEdit);
this.plRight.Dock = System.Windows.Forms.DockStyle.Fill;
this.plRight.Location = new System.Drawing.Point(40, 0);
this.plRight.Name = "plRight";
this.plRight.Size = new System.Drawing.Size(122, 21);
this.plRight.TabIndex = 3;
//
// txtEdit
//
this.txtEdit.Dock = System.Windows.Forms.DockStyle.Fill;
this.txtEdit.Location = new System.Drawing.Point(0, 0);
this.txtEdit.Name = "txtEdit";
this.txtEdit.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.txtEdit.Size = new System.Drawing.Size(122, 20);
this.txtEdit.TabIndex = 0;
//
// plLeft
//
this.plLeft.Controls.Add(this.lblText);
this.plLeft.Dock = System.Windows.Forms.DockStyle.Left;
this.plLeft.Location = new System.Drawing.Point(0, 0);
this.plLeft.Name = "plLeft";
this.plLeft.Size = new System.Drawing.Size(40, 21);
this.plLeft.TabIndex = 2;
//
// lblText
//
this.lblText.AutoSize = true;
this.lblText.Location = new System.Drawing.Point(5, 4);
this.lblText.Name = "lblText";
this.lblText.Size = new System.Drawing.Size(29, 12);
this.lblText.TabIndex = 0;
this.lblText.Text = "名称";
//
// LabelDateHalfDayEdit
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.Transparent;
this.Controls.Add(this.plRight);
this.Controls.Add(this.plLeft);
this.Name = "LabelDateHalfDayEdit";
this.Size = new System.Drawing.Size(162, 21);
this.plRight.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.txtEdit.Properties)).EndInit();
this.plLeft.ResumeLayout(false);
this.plLeft.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel plRight;
private DevExpress.XtraEditors.PopupContainerEdit txtEdit;
private System.Windows.Forms.Panel plLeft;
private System.Windows.Forms.Label lblText;
}
}
@@ -0,0 +1,199 @@
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using DevExpress.XtraEditors.Controls;
using Lskj.Control.SpecialDate;
namespace Lskj.Control
{
/// <summary>
/// 日期半天控件,显示格式为 yyyy-MM-dd 上午/下午。
/// </summary>
public partial class LabelDateHalfDayEdit : BaseUserControl
{
private SpecialDatePopup specialDatePopup;
private PopupContainerControl popupControl;
/// <summary>
/// 日期半天下拉编辑框。
/// </summary>
public PopupContainerEdit TextEdit { get { return txtEdit; } }
/// <summary>
/// 左侧文本。
/// </summary>
public Label Label { get { return lblText; } }
public LabelDateHalfDayEdit()
{
InitializeComponent();
InitPopup();
}
/// <summary>
/// 设置控件显示文本。
/// </summary>
public override string LabelText
{
get
{
return this.lblText.Text;
}
set
{
this.lblText.Text = value;
if (FontSize > 0)
{
this.plLeft.Dock = DockStyle.Left;
this.plLeft.AutoSize = false;
this.lblText.AutoSize = false;
this.lblText.Dock = DockStyle.Fill;
this.lblText.Location = new Point(0, 0);
this.lblText.TextAlign = ContentAlignment.MiddleLeft;
this.txtEdit.Properties.AutoHeight = false;
this.plLeft.Width = value.Length * GetCharWidth();
GetCharWidthMultilingual(this.lblText, this.lblText.Text, this.plLeft);
}
else
{
this.plLeft.Width = this.lblText.Width + PaddingLeft;
}
}
}
/// <summary>
/// 字体大小。
/// </summary>
public override float FontSize
{
get
{
return base.FontSize;
}
set
{
base.FontSize = value;
if (value > 0)
{
this.lblText.Font = new Font(this.lblText.Font.FontFamily, value);
this.TextEdit.Font = new Font(this.TextEdit.Font.FontFamily, value);
}
}
}
/// <summary>
/// 设置控件值,MyControl.SetControlValue 会通过该属性给控件赋值。
/// </summary>
public override string EditText
{
get
{
return this.txtEdit.Text;
}
set
{
this.txtEdit.EditValue = string.IsNullOrWhiteSpace(value) ? null : value;
}
}
/// <summary>
/// 控件提示文本。
/// </summary>
public override string NullText
{
get
{
return this.txtEdit.Properties.NullValuePrompt;
}
set
{
if (!string.IsNullOrEmpty(value))
{
this.TextEdit.Properties.NullValuePromptShowForEmptyValue = true;
this.TextEdit.Properties.NullValuePrompt = value;
}
base.NullText = value;
}
}
/// <summary>
/// 只读状态。
/// </summary>
public override bool ReadOnly
{
get
{
return base.ReadOnly;
}
set
{
base.ReadOnly = value;
this.txtEdit.Properties.ReadOnly = value;
this.txtEdit.Enabled = !value;
this.lblText.ForeColor = value ? base.ReadOnlyLabelForceColor : Required ? base.RequiredLabelForceColor : base.DefaultLabelForceColor;
}
}
/// <summary>
/// 必填状态。
/// </summary>
public override bool Required
{
get
{
return base.Required;
}
set
{
base.Required = value;
if (value)
{
this.lblText.ForeColor = base.RequiredLabelForceColor;
}
}
}
private void InitPopup()
{
this.specialDatePopup = new SpecialDatePopup();
this.specialDatePopup.Dock = DockStyle.Fill;
this.popupControl = new PopupContainerControl();
this.popupControl.Controls.Add(this.specialDatePopup);
this.popupControl.Size = this.specialDatePopup.Size;
this.txtEdit.Properties.PopupControl = this.popupControl;
this.txtEdit.Properties.TextEditStyle = TextEditStyles.Standard;
this.txtEdit.QueryPopUp += TextEdit_QueryPopUp;
this.specialDatePopup.ConfirmClick += SpecialDatePopup_ConfirmClick;
this.specialDatePopup.ClearClick += SpecialDatePopup_ClearClick;
this.specialDatePopup.CancelClick += SpecialDatePopup_CancelClick;
}
private void TextEdit_QueryPopUp(object sender, CancelEventArgs e)
{
this.popupControl.Size = this.specialDatePopup.Size;
this.specialDatePopup.OwnerEdit = this.txtEdit;
this.specialDatePopup.SetValue(this.txtEdit.EditValue + "");
}
private void SpecialDatePopup_ConfirmClick(object sender, System.EventArgs e)
{
this.txtEdit.EditValue = this.specialDatePopup.SelectedValue;
this.txtEdit.ClosePopup();
}
private void SpecialDatePopup_ClearClick(object sender, System.EventArgs e)
{
this.txtEdit.EditValue = string.Empty;
this.txtEdit.ClosePopup();
}
private void SpecialDatePopup_CancelClick(object sender, System.EventArgs e)
{
this.txtEdit.ClosePopup();
}
}
}
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
+2 -1
View File
@@ -419,7 +419,8 @@ namespace Lskj.Control.Model
default:
List<string> str = new List<string>
{
_model.FormText,
//_model.FormText,
model.MenuName,
ERPInfo.Instance.UserId,
ERPInfo.Instance.UserName,
"3",
+8 -1
View File
@@ -332,4 +332,11 @@ namespace Lskj.Control.Model
///是否为 单据动态生成列开始日期控件
/// </summary>
public bool SchedStartDataControl { get; set; }
/// <summary>
/// <summary>
/// 弹出列表框中字体大小
/// </summary>
public int ListBoxFontSize { get; set; }
/// <summary>
/// 字段浏览权限
/// </summary>
public string PrivilegeVie
+14 -1
View File
@@ -67,6 +67,10 @@ namespace Lskj.Control.Model
/// 日期框 显示(年-月)
/// </summary>
public const int LabShortDate = 444444;
/// <summary>
/// 日期框 显示(年-月-日 上午/下午),保存字符串
/// </summary>
public const int LabDateHalfDay = 445;
/// <summary>
/// 自动搜索框 保存Value值, 显示Text值
@@ -477,6 +481,14 @@ namespace Lskj.Control.Model
///模块选择返回行,返回text
/// </summary>
public const int LabModuleAddRowsText = 168;
/// <summary>
/// 模块选择返回ID(新版)单选
/// </summary>
public const int LabSelectReturnIdSingleNew = 171;
/// <summary>
/// 模块选择返回Text(新版)单选
/// </summary>
public const int LabSelectReturnTextSingleNew = 172;
/// <summary>
/// <para>说明:是否为Value类型</para>
@@ -577,4 +589,5 @@ namespace Lskj.Control.Model
/// <summary>
/// 不需要根据数据源sql获取数据源的控件
/// </summary>
/// <param name=
/// <param name="fieldType"></param>
/// <returns></return
@@ -489,4 +489,8 @@ namespace Lskj.Control.Model
this.PrivilegeOper = item.Table.Columns.Contains("PrivilegeOper") ? item["PrivilegeOper"] + "" : string.Empty;
this.AdditionalAssociations = item.Table.Columns.Contains("AdditionalAssociations") ? "1".Equals(item["AdditionalAssociations"] + "") : false;
this.ProhibitPaste = item.Table.Columns.Contains("ProhibitPaste") ? "1".Equals(item["ProhibitPaste"] + "") : false;
this.ModuleFrameDisplayText = item.Table.Columns.Contains("ModuleFrameDisplayText") ? "1".Equals(item["ModuleFrameDisplayT
this.ModuleFrameDisplayText = item.Table.Columns.Contains("ModuleFrameDisplayText") ? "1".Equals(item["ModuleFrameDisplayText"] + "") : false;
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
@@ -283,7 +283,7 @@ namespace Lskj.Control.Model
/// </summary>
public string PlanLetfControl;
/// <summary>
/// 隐藏下方操作按钮
/// 隐藏下方操作按钮(后续配置Dll模板,配置为Lskj.Report.dll也会隐藏下方,dll模板的配置是cs和bs通用的)
/// </summary>
public bool HideBottomPanel;
/// <summary>
@@ -298,6 +298,10 @@ namespace Lskj.Control.Model
/// 刷新单表明细时忽略关联字段(单表中,有关联模块,但是没有关联条件,关联值,是不会去查询数据的)
/// </summary>
public bool IgnoreAssociatedFields;
/// <summary>
/// Dll模板
/// </summary>
public string Library;
/// <summary>
/// 主模块编号
@@ -361,4 +365,5 @@ namespace Lskj.Control.Model
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.DynamicDetails = item.Table.Columns.Contains("DynamicDetails") ? "1".Equals(item["DynamicDetails"] + "") : false;
this.DetailSearch = item.Tabl
this.DetailSearch = item.Table.Columns.Contains("DetailSearch") ? "1".Equals(item["DetailSearch"] + "") : false;
+48 -3
View File
@@ -402,6 +402,7 @@ namespace Lskj.Control.Model
if (control != null)
{
BaseUserControl baseControl = control as BaseUserControl;
baseControl.Location = model.Location;
System.Threading.SynchronizationContext.Current.Post(SetProperty, null);
void SetProperty(object state)
{
@@ -412,7 +413,7 @@ namespace Lskj.Control.Model
baseControl.LabelText = model.LabelText;
baseControl.NullText = model.NullText;
//baseControl.EditText = model.DefaultValue;
baseControl.Location = model.Location;
//baseControl.Location = model.Location;
baseControl.Size = model.Size;
if (!model.ReadOnly && !string.IsNullOrWhiteSpace(model.ControlTitleColor))
{
@@ -1647,11 +1648,18 @@ namespace Lskj.Control.Model
{
SetControlValue(model, this.ParentKey);
}
else if (model.RememberValue&& ConditionalCaching.ConditionalCaches.ContainsKey(model.id) && !string.IsNullOrWhiteSpace(ConditionalCaching.ConditionalCaches[model.id]))
{
SetControlValue(model, ConditionalCaching.ConditionalCaches[model.id]);
}
else if (!string.IsNullOrEmpty(model.DefaultValue))
{
string defaultValue = this.SystemModel != null ? ReplaceHelper.ReplaceRowParam(this.SystemModel.maintabFocusedRow, model.DefaultValue) : model.DefaultValue;
SetControlValue(model, defaultValue);
}
}
//智能搜索框第一次加载时手动触发
if (changeLabelAutoGridLooks.Count > 0)
@@ -2013,6 +2021,11 @@ namespace Lskj.Control.Model
}
//value = dateEdit.TextEdit.EditValue == null ? dateEdit.EditText : dateEdit.TextEdit.EditValue.ToString();
break;
case ControlType.LabDateHalfDay:
// 日期半天控件
LabelDateHalfDayEdit dateHalfDayEdit = ctr as LabelDateHalfDayEdit;
if (dateHalfDayEdit != null) value = dateHalfDayEdit.TextEdit.EditValue == null ? dateHalfDayEdit.EditText : dateHalfDayEdit.TextEdit.EditValue.ToString();
break;
case ControlType.LabShortDate:
//为保存和表格保存格式相同。默认取EditValue值
LabelDateEdit dateEditNew = ctr as LabelDateEdit;
@@ -4120,6 +4133,9 @@ namespace Lskj.Control.Model
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;
model.RememberValue = item.Table.Columns.Contains("RememberValue") ? "1".Equals(item["RememberValue"] + "") : false;
//为了和工具里和bs里统一
if (model.FieldType == 42)
{
@@ -4133,6 +4149,18 @@ namespace Lskj.Control.Model
model.FieldType = 160;
model.IsRadio = false;
}
if (model.FieldType == 171)
{
//模块选择返回ID(新版)单选
model.FieldType = 160;
model.IsRadio = true;
}
if (model.FieldType == 172)
{
//模块选择返回Text(新版)单选
model.FieldType = 161;
model.IsRadio = true;
}
return model;
}
@@ -4239,6 +4267,16 @@ namespace Lskj.Control.Model
}
baseControl = dateEdit;
break;
case ControlType.LabDateHalfDay:
// 日期半天控件
LabelDateHalfDayEdit dateHalfDayEdit = new LabelDateHalfDayEdit();
dateHalfDayEdit.TextEdit.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
dateHalfDayEdit.TextEdit.KeyDown += new KeyEventHandler(OnTextEditKeyDown);
dateHalfDayEdit.TextEdit.TextChanged += new EventHandler(OnTextEditTextChanged);
if (!isLoadBorder) dateHalfDayEdit.TextEdit.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
baseControl = dateHalfDayEdit;
break;
case ControlType.LabComboxValue:
case ControlType.LabComboxText:
case ControlType.LabComboxValueParam:
@@ -4667,7 +4705,7 @@ namespace Lskj.Control.Model
model.SourceSql = "";
//设置了ModuleFrameDisplayText(显示text值),就把配置的模块sql传给model.SourceSql
if (model.ModuleFrameDisplayText)
if (model.FieldType == ControlType.LabSelectReturnIdNew)
{
moduleReturnsIdNew.ModuleFrameDisplayText = true;
model.SourceSql = moduleReturnsIdNew._lookUpForm.SysModel.MenuSql;
@@ -5175,6 +5213,13 @@ namespace Lskj.Control.Model
if (baseControl != null && baseControl.Model != null)
{
ControlModel model = baseControl.Model as ControlModel;
if (model.RememberValue)
{
//记录控件值
string fieldValue = GetControlValue(model);
ConditionalCaching.ConditionalCaches[model.id] = fieldValue;
}
if (this.CanExecControl)
{
// 是否存在计算值
@@ -6258,4 +6303,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
else if (
+27
View File
@@ -671,6 +671,8 @@ namespace Lskj.Control
sqlValue = ReplaceHelper.ReplaceRowParam(this.treeGridLeft.GetViewFocusedDataRow(), sqlValue);
//isLoadGridSplit = rowitem != null && rowitem.Table.Columns.Contains("ReminderInformation");
}
//if (isLoadGridSplit)
//{
// this.ModuleGridObj.VisibleSearchPanel = false;
@@ -1109,6 +1111,19 @@ namespace Lskj.Control
}
}
if (this.SysModel.LeftUnioCond && e != null)
{
DataRow dr = this.gridLeft.GetViewFocusedDataRow();
foreach (ControlModel item in this.ModuleGridObj.SearchObj.ControlModels)
{
if (dr.Table.Columns.Contains(item.FieldName))
{
this.ModuleGridObj.SearchObj.SetControlValue(item, dr[item.FieldName] + "");
}
}
}
if (this.SysModel.IgnoreMainload)
{
// 只加载明细
@@ -1247,6 +1262,18 @@ namespace Lskj.Control
this.ModuleGridObj.SetDisplayColumns(dataRow["ReminderInformation"] + "");
}
}
if (this.SysModel.LeftUnioCond )
{
DataRow dr = this.treeGridLeft.GetViewFocusedDataRow();
foreach (ControlModel item in this.ModuleGridObj.SearchObj.ControlModels)
{
if (dr.Table.Columns.Contains(item.FieldName))
{
this.ModuleGridObj.SearchObj.SetControlValue(item, dr[item.FieldName] + "");
}
}
}
this.SetMainGridView();
if (this.IsDragDetail)
+4 -1
View File
@@ -1385,7 +1385,10 @@ namespace Lskj.Control
}
gridEx.VisibleOperPanel = !model.IsReadOnly;
if (model.HideBottomPanel) gridEx.VisibleOperPanel = false;
if (model.HideBottomPanel|| model.Library.Equals("Lskj.Report.dll", StringComparison.OrdinalIgnoreCase))
{
gridEx.VisibleOperPanel = false;
}
gridEx.InitializeControl(model.SystemModel, dyncModel);
gridEx.GridControlObj.Tag = model;
@@ -54,19 +54,29 @@ namespace Lskj.Control
/// 获取模块配置
/// </summary>
public ModuleModel moduleModel;
public TreeList TreeListObj { get { return gcMain; } }
public override TreeList TreeListObj { get { return gcMain; } }
/// <summary>
/// 树表格固定菜单
/// </summary>
public ContextMenuStrip MenuStrip { get { return contextMenuStrip; } }
public override ContextMenuStrip MenuStrip { get { return contextMenuStrip; } }
/// <summary>
/// 默认全部展开
/// </summary>
public string Expansion = "1";
private string _expansion = "1";
public override string Expansion
{
get { return _expansion; }
set { _expansion = value; }
}
//treeList树展开的节点块
public List<TreeListNode> treeListNodes = new List<TreeListNode>();
private List<TreeListNode> _treeListNodes = new List<TreeListNode>();
public override List<TreeListNode> treeListNodes
{
get { return _treeListNodes; }
set { _treeListNodes = value; }
}
/// <summary>
/// 按初始顺序保存全部gridBand
@@ -272,7 +282,7 @@ namespace Lskj.Control
/// </summary>
/// <param name="sender">The sender.</param>
/// <param name="e">The <see cref="RowStyleEventArgs"/> instance containing the event data.</param>
protected void OnGridViewRowStyle(object sender, GetCustomNodeCellStyleEventArgs e)
protected override void OnGridViewRowStyle(object sender, GetCustomNodeCellStyleEventArgs e)
{
if (this.GridRowColorsTable != null && this.GridRowColorsTable.Rows.Count > 0)
{
@@ -324,7 +334,7 @@ namespace Lskj.Control
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="DevExpress.XtraGrid.Views.Grid.RowCellStyleEventArgs"/> instance containing the event data.</param>
/// <exception cref="System.NotImplementedException"></exception>
protected void OnGridViewRowCellStyle(object sender, CustomDrawNodeCellEventArgs e)
protected override void OnGridViewRowCellStyle(object sender, CustomDrawNodeCellEventArgs e)
{
if (this.GridRowColorsTable != null && this.GridRowColorsTable.Rows.Count > 0 && !string.IsNullOrEmpty(e.CellValue + ""))
{
@@ -596,7 +606,7 @@ namespace Lskj.Control
/// <para>版本:1.0</para>
/// </summary>
/// <param name="item">The dr row.</param>
protected void InitEditColumns(TreeListColumn column, GridColumnModel model)
protected override void InitEditColumns(TreeListColumn column, GridColumnModel model)
{
switch (model.FieldType)
{
@@ -722,7 +732,7 @@ namespace Lskj.Control
/// <para>版本:1.0</para>
/// </summary>
/// <param name="gridColumn">The grid column.</param>
public void InitAutoLinefeedEdit(TreeListColumn gridColumn, GridColumnModel model)
public override void InitAutoLinefeedEdit(TreeListColumn gridColumn, GridColumnModel model)
{
DevExpress.XtraEditors.Repository.RepositoryItemMemoEdit AutoLinefeedEdit = new DevExpress.XtraEditors.Repository.RepositoryItemMemoEdit();
gridColumn.ColumnEdit = AutoLinefeedEdit;
@@ -738,7 +748,7 @@ namespace Lskj.Control
/// <para>版本:1.0</para>
/// </summary>
/// <param name="gridColumn">The grid column.</param>
public void InitPasswordEdit(TreeListColumn gridColumn, GridColumnModel model)
public override void InitPasswordEdit(TreeListColumn gridColumn, GridColumnModel model)
{
RepositoryItemTextEdit passEdit = new RepositoryItemTextEdit();
passEdit.UseSystemPasswordChar = true;
@@ -756,7 +766,7 @@ namespace Lskj.Control
/// <para>版本:1.0</para>
/// </summary>
/// <param name="gridColumn">The grid column.</param>
public void InitComboxEdit(TreeListColumn gridColumn, GridColumnModel model)
public override void InitComboxEdit(TreeListColumn gridColumn, GridColumnModel model)
{
RepositoryItemLookUpEdit comboxEdit = new RepositoryItemLookUpEdit();
if (model.FontSize > 0) comboxEdit.Appearance.Font = new Font("微软雅黑", model.FontSize);
@@ -811,7 +821,7 @@ namespace Lskj.Control
/// <para>版本:1.0</para>
/// </summary>
/// <param name="gridColumn">The grid column.</param>
public void InitProgressEdit(TreeListColumn gridColumn)
public override void InitProgressEdit(TreeListColumn gridColumn)
{
RepositoryItemProgressBar progressEdit = new RepositoryItemProgressBar();
progressEdit.ShowTitle = true;
@@ -831,7 +841,7 @@ namespace Lskj.Control
/// <para>版本:1.0</para>
/// </summary>
/// <param name="gridColumn">The grid column.</param>
public void InitAutoSearchEdit(TreeListColumn gridColumn, GridColumnModel model)
public override void InitAutoSearchEdit(TreeListColumn gridColumn, GridColumnModel model)
{
int popWidth = 0;
@@ -935,7 +945,7 @@ namespace Lskj.Control
/// </summary>
/// <param name="gridColumn">The grid column.</param>
/// <param name="fieldType">Type of the field.</param>
public void InitDateTimeEdit(TreeListColumn gridColumn, int fieldType)
public override void InitDateTimeEdit(TreeListColumn gridColumn, int fieldType)
{
RepositoryItemDateEdit dateEdit = new RepositoryItemDateEdit();
dateEdit.DisplayFormat.FormatString = dateEdit.EditFormat.FormatString = dateEdit.Mask.EditMask = DateFormat.Format(fieldType);
@@ -971,7 +981,7 @@ namespace Lskj.Control
/// </summary>
/// <param name="gridColumn">The grid column.</param>
/// <param name="fieldType">Type of the field.</param>
public void InitTimeEdit(TreeListColumn gridColumn, int fieldType)
public override void InitTimeEdit(TreeListColumn gridColumn, int fieldType)
{
RepositoryItemTimeEdit timeEdit = new RepositoryItemTimeEdit();
timeEdit.DisplayFormat.FormatString = timeEdit.EditFormat.FormatString = timeEdit.Mask.EditMask = DateFormat.Format(fieldType);
@@ -991,7 +1001,7 @@ namespace Lskj.Control
/// <para>版本:1.0</para>
/// </summary>
/// <param name="gridColumn">The grid column.</param>
public void InitCalcEdit(TreeListColumn gridColumn)
public override void InitCalcEdit(TreeListColumn gridColumn)
{
RepositoryItemCalcEdit calcEdit = new RepositoryItemCalcEdit();
calcEdit.AllowMouseWheel = false;
@@ -1010,7 +1020,7 @@ namespace Lskj.Control
/// <para>版本:1.0</para>
/// </summary>
/// <param name="gridColumn">The grid column.</param>
public void InitMemoEdit(TreeListColumn gridColumn)
public override void InitMemoEdit(TreeListColumn gridColumn)
{
RepositoryItemMemoExEdit memoEdit = new RepositoryItemMemoExEdit();
memoEdit.WordWrap = true;
@@ -1037,7 +1047,7 @@ namespace Lskj.Control
/// <para>版本:1.0</para>
/// </summary>
/// <param name="gridColumn">The grid column.</param>
public void InitRemarkEdit(TreeListColumn gridColumn)
public override void InitRemarkEdit(TreeListColumn gridColumn)
{
RepositoryItemMemoEdit memo = new RepositoryItemMemoEdit();
memo.Appearance.TextOptions.WordWrap = WordWrap.Wrap;//自动换行
@@ -1056,7 +1066,7 @@ namespace Lskj.Control
/// <para>版本:1.0</para>
/// </summary>
/// <param name="gridColumn">The grid column.</param>
public void InitMutilEdit(TreeListColumn gridColumn, GridColumnModel model)
public override void InitMutilEdit(TreeListColumn gridColumn, GridColumnModel model)
{
FrmLookUp mutilLookUp = new FrmLookUp();
mutilLookUp.ValueField = model.ValueMember;
@@ -1103,7 +1113,7 @@ namespace Lskj.Control
/// <para>版本:1.0</para>
/// </summary>
/// <param name="gridColumn">The grid column.</param>
public void InitAutoTreeSearchEdit(TreeListColumn gridColumn, GridColumnModel model, bool isMulitClick = true, bool isRootNode = true)
public override void InitAutoTreeSearchEdit(TreeListColumn gridColumn, GridColumnModel model, bool isMulitClick = true, bool isRootNode = true)
{
PubTreeLookUp _popup = new PubTreeLookUp();
//_popup.LookUp = gridColumn;
@@ -1150,7 +1160,7 @@ namespace Lskj.Control
/// </summary>
/// <param name="gridColumn">The grid column.</param>
/// <param name="model">The model.</param>
public void InitMutilComboxEdit(TreeListColumn gridColumn, GridColumnModel model)
public override void InitMutilComboxEdit(TreeListColumn gridColumn, GridColumnModel model)
{
RepositoryItemCheckedComboBoxEdit comboxEdit = new RepositoryItemCheckedComboBoxEdit();
comboxEdit.AllowFocused = true;
@@ -1177,7 +1187,7 @@ namespace Lskj.Control
/// </summary>
/// <param name="gridColumn">The grid column.</param>
/// <param name="model">The model.</param>
public void InitRichEdit(TreeListColumn gridColumn)
public override void InitRichEdit(TreeListColumn gridColumn)
{
RepositoryItemRichTextEdit richEdit = new RepositoryItemRichTextEdit();
richEdit.Encoding = Encoding.UTF8;//乱码问题
@@ -1194,7 +1204,7 @@ namespace Lskj.Control
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
public void InitPicEdit(TreeListColumn gridColumn)
public override void InitPicEdit(TreeListColumn gridColumn)
{
RepositoryItemPictureEdit picEdit = new RepositoryItemPictureEdit();
picEdit.AutoHeight = true;
@@ -1309,7 +1319,7 @@ namespace Lskj.Control
/// <para>版本:1.0</para>
/// </summary>
/// <param name="gridColumn">The grid column.</param>
public void InitCheckEdit(TreeListColumn gridColumn)
public override void InitCheckEdit(TreeListColumn gridColumn)
{
RepositoryItemCheckEdit checkEdit = new RepositoryItemCheckEdit();
checkEdit.ValueChecked = 1;
@@ -1488,13 +1498,13 @@ namespace Lskj.Control
/// </summary>
/// <param name="table">The table.</param>
/// <param name="customColumKey">The custom colum key.</param>
public void InitializeTreeMethod()
public override void InitializeTreeMethod()
{
this.TreeListObj.CellValueChanging += new DevExpress.XtraTreeList.CellValueChangedEventHandler(OnCellValueChaning);
}
protected void OnCellValueChaning(object sender, CellValueChangedEventArgs e)
protected override void OnCellValueChaning(object sender, CellValueChangedEventArgs e)
{
try
{
@@ -1522,7 +1532,7 @@ namespace Lskj.Control
/// <param name="node">The node.</param>
/// <param name="check">The check.</param>
/// <param name="gridColumn">The grid column.</param>
protected void SetCheckedChildNodes(DevExpress.XtraTreeList.Nodes.TreeListNode node, Object check, TreeListColumn gridColumn)
protected override void SetCheckedChildNodes(DevExpress.XtraTreeList.Nodes.TreeListNode node, Object check, TreeListColumn gridColumn)
{
for (int i = 0; i < node.Nodes.Count; i++)
{
@@ -1544,7 +1554,7 @@ namespace Lskj.Control
/// <param name="node">The node.</param>
/// <param name="check">The check.</param>
/// <param name="gridColumn">The grid column.</param>
protected void SetCheckedParentNodes(DevExpress.XtraTreeList.Nodes.TreeListNode node, Object check, TreeListColumn gridColumn)
protected override void SetCheckedParentNodes(DevExpress.XtraTreeList.Nodes.TreeListNode node, Object check, TreeListColumn gridColumn)
{
if (node.ParentNode != null)
{
@@ -1572,13 +1582,13 @@ namespace Lskj.Control
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
protected void SetGridRowHeightAndFont()
protected override void SetGridRowHeightAndFont()
{
if (SystemInfo.Instance.GridRowFontSize > 0)
this.gcMain.Appearance.Row.Font = new Font("微软雅黑", SystemInfo.Instance.GridRowFontSize);
this.TreeListObj.Appearance.Row.Font = new Font("微软雅黑", SystemInfo.Instance.GridRowFontSize);
if (SystemInfo.Instance.GridRowHeight > 0)
{
this.gcMain.ColumnPanelRowHeight = this.gcMain.RowHeight = SystemInfo.Instance.GridRowHeight;
this.TreeListObj.ColumnPanelRowHeight = this.TreeListObj.RowHeight = SystemInfo.Instance.GridRowHeight;
}
}
/// <summary>
@@ -1749,7 +1759,7 @@ namespace Lskj.Control
/// </summary>
/// <param name="gridColumn">The grid column.</param>
/// <param name="model">The model.</param>
protected virtual void SetColumnFormat(TreeListColumn gridColumn, GridColumnModel model)
public override void SetColumnFormat(TreeListColumn gridColumn, GridColumnModel model)
{
if (gridColumn == null || model == null) return;
@@ -1927,7 +1937,7 @@ namespace Lskj.Control
/// </summary>
/// <param name="sender">The sender.</param>
/// <param name="e">The <see cref="KeyEventArgs"/> instance containing the event data.</param>
protected virtual void OnTreeGridViewKeyDown(object sender, KeyEventArgs e)
protected override void OnTreeGridViewKeyDown(object sender, KeyEventArgs e)
{
try
{
@@ -2058,7 +2068,7 @@ namespace Lskj.Control
/// </summary>
/// <param name="table">The table.</param>
/// <param name="selectRowHandler">if set to <c>true</c> [select row handler].</param>
public DataTable GetGridViewDataSource()
public override DataTable GetGridViewDataSource()
{
return this.gcMain.DataSource as DataTable;
}
@@ -2197,7 +2207,7 @@ namespace Lskj.Control
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
protected virtual void SetAutoColumns()
protected override void SetAutoColumns()
{
try
{
@@ -2361,7 +2371,7 @@ namespace Lskj.Control
/// <summary>
/// 记录展开的节点
/// </summary>
public void GetTreeExpanded()
public override void GetTreeExpanded()
{
treeListNodes.Clear();
@@ -2372,7 +2382,7 @@ namespace Lskj.Control
}
public void setRecursive(TreeListNode treeNode)
public override void setRecursive(TreeListNode treeNode)
{
if (treeNode.Expanded) treeListNodes.Add(treeNode);
// Visit each node recursively.
@@ -2448,7 +2458,7 @@ namespace Lskj.Control
/// </summary>
/// <param name="sender">The sender.</param>
/// <param name="e">The <see cref="PopupMenuShowingEventArgs"/> instance containing the event data.</param>
protected void OnAutoSearchEditPopupMenuShowing(object sender, DevExpress.XtraGrid.Views.Grid.PopupMenuShowingEventArgs e)
protected override void OnAutoSearchEditPopupMenuShowing(object sender, DevExpress.XtraGrid.Views.Grid.PopupMenuShowingEventArgs e)
{
try
{
@@ -2595,7 +2605,7 @@ namespace Lskj.Control
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
protected void OnPopupGridViewEnter(object sender, KeyEventArgs e)
protected override void OnPopupGridViewEnter(object sender, KeyEventArgs e)
{
try
{
@@ -2744,7 +2754,7 @@ namespace Lskj.Control
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
protected void OnModuleChoice(object sender, ButtonPressedEventArgs e)
protected override void OnModuleChoice(object sender, ButtonPressedEventArgs e)
{
try
{
@@ -2798,7 +2808,7 @@ namespace Lskj.Control
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
protected void OnModuleRowsChoice(object sender, ButtonPressedEventArgs e)
protected override void OnModuleRowsChoice(object sender, ButtonPressedEventArgs e)
{
try
{
@@ -3072,4 +3082,4 @@ namespace Lskj.Control
}
table.Rows.Add(newRow);
//this.gridView.FocusedRowHandle = _rowNumber - 1;
File diff suppressed because it is too large Load Diff