diff --git a/插件库/Lskj.Control/AuditPanel2.cs b/插件库/Lskj.Control/AuditPanel2.cs
index 8cf3129..4f5419a 100644
--- a/插件库/Lskj.Control/AuditPanel2.cs
+++ b/插件库/Lskj.Control/AuditPanel2.cs
@@ -382,6 +382,7 @@ namespace Lskj.Control
{
this.gridFinish.SetReadOnlyColumns(BaseAuditImpl.GetAuditMainGridCoulmns(AuditComModelObj.SystemTable, this.SysModel.ModuleCode), modelkeyName + key);
}
+ this.gridFinish.Model = this.SysModel;
// 创建自定义搜索控件
this.SearchCreateTopControl();
}
@@ -616,6 +617,7 @@ namespace Lskj.Control
pcGrid.Parent = gridPanel;
pcGrid.Dock = DockStyle.Fill;
pcGrid.GridView.Tag = accrModel;
+ pcGrid.Model = SysModel;
//pcGrid.GridView.RowClick += new DevExpress.XtraGrid.Views.Grid.RowClickEventHandler(OnPcgridRowCellClick);
//pcGrid.GridView.FocusedRowChanged += new DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventHandler(OnPcgridRowFocusedRowChanged);
LabelControl lab = new LabelControl();
diff --git a/插件库/Lskj.Control/FrmComboxMutilPopup.cs b/插件库/Lskj.Control/FrmComboxMutilPopup.cs
index 9879fd3..18d41ce 100644
--- a/插件库/Lskj.Control/FrmComboxMutilPopup.cs
+++ b/插件库/Lskj.Control/FrmComboxMutilPopup.cs
@@ -20,22 +20,35 @@ namespace Lskj.Control
public string ShowValue = "", ShowText = "";
public MyControl ControlObj;
public ControlModel mControlModel;
-
+ public int ListBoxFontSize = 0;
public FrmComboxMutilPopup()
{
InitializeComponent();
}
- public FrmComboxMutilPopup(ControlModel model, string showValue, string showText, MyControl ControlObj)
+ public FrmComboxMutilPopup(ControlModel model, string showValue, string showText, MyControl ControlObj,int FontSize= 0)
{
try {
InitializeComponent();
-
+ this.ListBoxFontSize = FontSize;
this.ShowValue = showValue;
this.ShowText = showText;
this.mControlModel = model;
this.ControlObj = ControlObj;
this.Text = model.LabelText + "选择";
+ if (this.ListBoxFontSize>0)
+ {
+ foreach (System.Windows.Forms.Control ctrol in this.panel2.Controls)
+ {
+ if (ctrol is SimpleButton)
+ {
+ SimpleButton simpleButton = ctrol as SimpleButton;
+ Font oldFont = simpleButton.Font;
+ simpleButton.Font = new Font(oldFont.Name, ListBoxFontSize);
+
+ }
+ }
+ }
this.OnLoad();
}
catch (Exception ex)
@@ -82,6 +95,14 @@ namespace Lskj.Control
btn.Text = text.Length > 6 ? text.Substring(0, 6) + "\n" + text.Substring(6) : text;
btn.Click -= new EventHandler(btn_Click);
btn.Click += new EventHandler(btn_Click);
+
+ if (ListBoxFontSize>0)
+ {
+ Font oldFont = btn.Font;
+ btn.Font = new Font(oldFont.Name, ListBoxFontSize);
+ }
+
+
this.SetSelect(btn, this.ShowValue.Contains(rowItem[this.mControlModel.ValueMember] + ","));
}
controlIndex++;
@@ -184,41 +205,4 @@ namespace Lskj.Control
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex);
- MessageUtil.Show(Message,ex.Message);
- }
-
- }
-
- private void simpleButton24_Click(object sender, EventArgs e)
- {
- try {
- if (this.mPage < this.mMaxPage)
- {
- this.mPage += 1;
- this.InitControl();
- }
- }
- catch (Exception ex)
- {
- string Message = ErrorMessage.PromptErrorMessage(ex);
- MessageUtil.Show(Message,ex.Message);
- }
-
- }
-
- private void simpleButton25_Click(object sender, EventArgs e)
- {
- try {
- if (this.mPage == this.mMaxPage) return;
- this.mPage = this.mMaxPage;
- this.InitControl();
- }
- catch (Exception ex)
- {
- string Message = ErrorMessage.PromptErrorMessage(ex);
- MessageUtil.Show(Message,ex.Message);
- }
-
- }
- }
-}
\ No newline at end of file
+ MessageUtil.Show(Message,ex.Messag
\ No newline at end of file
diff --git a/插件库/Lskj.Control/FrmComboxPopup.cs b/插件库/Lskj.Control/FrmComboxPopup.cs
index 60604b3..77ae886 100644
--- a/插件库/Lskj.Control/FrmComboxPopup.cs
+++ b/插件库/Lskj.Control/FrmComboxPopup.cs
@@ -20,20 +20,34 @@ namespace Lskj.Control
public string ShowValue, ShowText;
public MyControl ControlObj;
public ControlModel mControlModel;
+ public int ListBoxFontSize = 0;
public FrmComboxPopup()
{
InitializeComponent();
}
- public FrmComboxPopup(ControlModel model, MyControl controlObj)
+ public FrmComboxPopup(ControlModel model, MyControl controlObj, int FontSize = 0)
{
try {
InitializeComponent();
-
+ this.ListBoxFontSize = FontSize;
this.mControlModel = model;
this.ControlObj = controlObj;
this.Text = model.LabelText + "选择";
+ if (this.ListBoxFontSize > 0)
+ {
+ foreach (System.Windows.Forms.Control ctrol in this.panel3.Controls)
+ {
+ if (ctrol is SimpleButton)
+ {
+ SimpleButton simpleButton = ctrol as SimpleButton;
+ Font oldFont = simpleButton.Font;
+ simpleButton.Font = new Font(oldFont.Name, ListBoxFontSize);
+
+ }
+ }
+ }
this.OnLoad();
}
catch (Exception ex)
@@ -79,7 +93,16 @@ namespace Lskj.Control
btn.Tag = rowItem;
//text.Length > 6 ? text.Substring(0, 6) + "\n" + text.Substring(6) :
btn.Text = text;
- btn.Font = new Font("微软雅黑", 12);
+ if (ListBoxFontSize > 0)
+ {
+ btn.Font = new Font("微软雅黑", ListBoxFontSize);
+ }
+ else
+ {
+ btn.Font = new Font("微软雅黑", 12);
+ }
+
+
btn.Click -= new EventHandler(btn_Click);
btn.Click += new EventHandler(btn_Click);
}
@@ -140,41 +163,4 @@ namespace Lskj.Control
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex);
- MessageUtil.Show(Message,ex.Message);
- }
-
- }
-
- private void simpleButton24_Click(object sender, EventArgs e)
- {
- try {
- if (this.mPage < this.mMaxPage)
- {
- this.mPage += 1;
- this.InitControl();
- }
- }
- catch (Exception ex)
- {
- string Message = ErrorMessage.PromptErrorMessage(ex);
- MessageUtil.Show(Message,ex.Message);
- }
-
- }
-
- private void simpleButton25_Click(object sender, EventArgs e)
- {
- try {
- if (this.mPage == this.mMaxPage) return;
- this.mPage = this.mMaxPage;
- this.InitControl();
- }
- catch (Exception ex)
- {
- string Message = ErrorMessage.PromptErrorMessage(ex);
- MessageUtil.Show(Message,ex.Message);
- }
-
- }
- }
-}
\ No newline at end of file
+ MessageUtil.Show(Message,ex.Messa
\ No newline at end of file
diff --git a/插件库/Lskj.Control/LabelComboxMutilPopupEdit.cs b/插件库/Lskj.Control/LabelComboxMutilPopupEdit.cs
index d03f9e3..68a8a1f 100644
--- a/插件库/Lskj.Control/LabelComboxMutilPopupEdit.cs
+++ b/插件库/Lskj.Control/LabelComboxMutilPopupEdit.cs
@@ -15,6 +15,10 @@ namespace Lskj.Control
{
public string editValue = "";
///
+ /// 弹出框中字体大小
+ ///
+ public int ListBoxFontSize = 0;
+ ///
/// 文本控件
///
public TextEdit TextEdit { get { return txtEdit; } }
@@ -185,7 +189,7 @@ namespace Lskj.Control
public void ShowPopup()
{
- FrmComboxMutilPopup popup = new FrmComboxMutilPopup(this.Model, this.editValue, this.EditText, ControlObj);
+ FrmComboxMutilPopup popup = new FrmComboxMutilPopup(this.Model, this.editValue, this.EditText, ControlObj, ListBoxFontSize);
DialogResult result = popup.ShowDialog();
if (result == DialogResult.OK)
{
@@ -215,41 +219,4 @@ namespace Lskj.Control
this.ShowPopup();
}
catch (Exception ex)
- {
- string Message = ErrorMessage.PromptErrorMessage(ex);
- MessageUtil.Show(Message,ex.Message);
- }
- }
-
- private void simpleButton1_Click(object sender, EventArgs e)
- {
- try
- {
- this.ShowPopup();
- }
- catch (Exception ex)
- {
- string Message = ErrorMessage.PromptErrorMessage(ex);
- MessageUtil.Show(Message,ex.Message);
- }
-
- }
-
- private void simpleButton4_Click(object sender, EventArgs e)
- {
- try
- {
- this.editValue = this.EditText = "";
- }
- catch (Exception ex)
- {
- string Message = ErrorMessage.PromptErrorMessage(ex);
- MessageUtil.Show(Message,ex.Message);
- }
-
- }
-
- public Control.Model.MyControl ControlObj { get; set; }
-
- }
-}
+
\ No newline at end of file
diff --git a/插件库/Lskj.Control/LabelComboxPopupEdit.cs b/插件库/Lskj.Control/LabelComboxPopupEdit.cs
index a0bedc2..ccfceca 100644
--- a/插件库/Lskj.Control/LabelComboxPopupEdit.cs
+++ b/插件库/Lskj.Control/LabelComboxPopupEdit.cs
@@ -24,6 +24,10 @@ namespace Lskj.Control
/// 数据源
///
public DataTable table = new DataTable();
+ ///
+ /// 弹出框中字体大小
+ ///
+ public int ListBoxFontSize = 0;
public LabelComboxPopupEdit()
{
@@ -230,7 +234,7 @@ namespace Lskj.Control
///
public void ShowPopup()
{
- FrmComboxPopup popup = new FrmComboxPopup(this.Model, this.ControlObj);
+ FrmComboxPopup popup = new FrmComboxPopup(this.Model, this.ControlObj, ListBoxFontSize);
DialogResult result = popup.ShowDialog();
if (result == DialogResult.OK)
{
@@ -257,43 +261,4 @@ namespace Lskj.Control
{
try
{
- this.ShowPopup();
- }
- catch (Exception ex)
- {
- string Message = ErrorMessage.PromptErrorMessage(ex);
- MessageUtil.Show(Message,ex.Message);
- }
-
- }
-
- private void simpleButton1_Click(object sender, EventArgs e)
- {
- try
- {
- this.ShowPopup();
- }
- catch (Exception ex)
- {
- string Message = ErrorMessage.PromptErrorMessage(ex);
- MessageUtil.Show(Message,ex.Message);
- }
-
- }
-
- private void simpleButton4_Click(object sender, EventArgs e)
- {
- try
- {
- this.editValue = this.EditText = "";
- }
- catch (Exception ex)
- {
- string Message = ErrorMessage.PromptErrorMessage(ex);
- MessageUtil.Show(Message,ex.Message);
- }
-
- }
-
- }
-}
\ No newline at end of file
+ this.ShowPopup();
\ No newline at end of file
diff --git a/插件库/Lskj.Control/LabelDateEdit.cs b/插件库/Lskj.Control/LabelDateEdit.cs
index 3465628..fd492da 100644
--- a/插件库/Lskj.Control/LabelDateEdit.cs
+++ b/插件库/Lskj.Control/LabelDateEdit.cs
@@ -16,6 +16,8 @@ using System.Linq;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
+using DevExpress.XtraEditors.Repository;
+using System.Reflection;
namespace Lskj.Control
{
@@ -37,12 +39,13 @@ namespace Lskj.Control
///
/// The label.
public Label Label { get { return lblText; } }
-
+
public LabelDateEdit()
{
InitializeComponent();
}
+
///
/// 说明:设置控件显示文本
/// 创建人:龚宇超
@@ -204,17 +207,4 @@ namespace Lskj.Control
/// 版本:1.0
///
/// The format string.
- public void DateFormat(string formatString)
- {
- if (!string.IsNullOrWhiteSpace(formatString))
- {
- this.txtEdit.Properties.DisplayFormat.FormatString = this.txtEdit.Properties.EditFormat.FormatString = this.txtEdit.Properties.Mask.EditMask = formatString;
- this.txtEdit.Properties.DisplayFormat.FormatType = this.txtEdit.Properties.EditFormat.FormatType = DevExpress.Utils.FormatType.Custom;
- }
- }
-
-
-
-
- }
-}
+ publi
\ No newline at end of file
diff --git a/插件库/Lskj.Control/Model/ControlModel.cs b/插件库/Lskj.Control/Model/ControlModel.cs
index f3e2c30..ecdcf4c 100644
--- a/插件库/Lskj.Control/Model/ControlModel.cs
+++ b/插件库/Lskj.Control/Model/ControlModel.cs
@@ -298,4 +298,8 @@ namespace Lskj.Control.Model
/// 条件
///
public string SplicingConditions;
- /// <
\ No newline at end of file
+ ///
+ ///模块选择返回框,是否单选模式
+ ///
+ public bool IsRadio { get; set; }
+ /
\ No newline at end of file
diff --git a/插件库/Lskj.Control/Model/GridColumnModel.cs b/插件库/Lskj.Control/Model/GridColumnModel.cs
index 88f464a..c0ed63e 100644
--- a/插件库/Lskj.Control/Model/GridColumnModel.cs
+++ b/插件库/Lskj.Control/Model/GridColumnModel.cs
@@ -347,6 +347,10 @@ namespace Lskj.Control.Model
/// 聚合字段列
///
public int IsCustomGroupField;
+ ///
+ /// 导入时转格式
+ ///
+ public string ImportConversionFormat;
#endregion
@@ -439,4 +443,4 @@ namespace Lskj.Control.Model
this._lookUpWidth = item.Table.Columns.Contains("LookUpWidth") ? int.TryParse(item["LookUpWidth"] + "", out int lookUpWidth) ? lookUpWidth : 0 : 0;
this._lookUpFieldsWidth = item.Table.Columns.Contains("LookUpFieldsWidth") ? item["LookUpFieldsWidth"] + "" : "";
this.isDynamic = item.Table.Columns.Contains("isDynamic") && !string.IsNullOrWhiteSpace(item["isDynamic"] + "") ? "1".Equals(item["isDynamic"] + "") : false;
- th
\ No newline at end of file
+ this.ConfigureColumnMode = item.Table.Columns.Contains("ConfigureColumnMode") && !string.IsNullOrWhiteSpace(item["ConfigureColumnMode"] + "") ? "1".Equa
\ No newline at end of file
diff --git a/插件库/Lskj.Control/Model/GridExtend.cs b/插件库/Lskj.Control/Model/GridExtend.cs
index b4d5ddf..23c8db6 100644
--- a/插件库/Lskj.Control/Model/GridExtend.cs
+++ b/插件库/Lskj.Control/Model/GridExtend.cs
@@ -1920,19 +1920,49 @@ namespace Lskj.Control.Model
{
string selWhere = "1=1";
DataTable table = ValueGridColumnTable[model];
- if (table != null && table.Rows.Count > 0)
+
+ if (model.FieldType == ControlType.LabMultiSelectValue || model.FieldType == ControlType.LabMultiSelectValueNew || model.FieldType == ControlType.LabMultiSelectValueParam)
{
- DataRow rowItemValue = table.Rows.Cast().FirstOrDefault(x => x[model.TextMember] + "" == text);
- DataRow rowItemText = table.Rows.Cast().FirstOrDefault(x => x[model.ValueMember] + "" == text);
- //value = rowItemValue != null ? rowItemValue[isBillImport ? model.ValueMember : model.TextMember] + "" : rowItemText != null ? rowItemText[isBillImport ? model.ValueMember : model.TextMember] + "" : "";
- value = rowItemValue != null ? rowItemValue[model.ValueMember] + "" : rowItemText != null ? rowItemText[model.ValueMember] + "" : "";
+ string[] splitString = text.Split(',');
+ string nemValue = string.Empty;
+ foreach (string newText in splitString)
+ {
+ if (table != null && table.Rows.Count > 0)
+ {
+ DataRow rowItemValue = table.Rows.Cast().FirstOrDefault(x => x[model.TextMember] + "" == newText);
+ DataRow rowItemText = table.Rows.Cast().FirstOrDefault(x => x[model.ValueMember] + "" == newText);
+ value = rowItemValue != null ? rowItemValue[model.ValueMember] + "" : rowItemText != null ? rowItemText[model.ValueMember] + "" : "";
+ }
+ else
+ {
+ value = "";
+ }
+ nemValue += value + ',';
+ }
+ value = nemValue.TrimEnd(',');
}
else
- value = "";
+ {
+ if (table != null && table.Rows.Count > 0)
+ {
+ DataRow rowItemValue = table.Rows.Cast().FirstOrDefault(x => x[model.TextMember] + "" == text);
+ DataRow rowItemText = table.Rows.Cast().FirstOrDefault(x => x[model.ValueMember] + "" == text);
+ //value = rowItemValue != null ? rowItemValue[isBillImport ? model.ValueMember : model.TextMember] + "" : rowItemText != null ? rowItemText[isBillImport ? model.ValueMember : model.TextMember] + "" : "";
+ value = rowItemValue != null ? rowItemValue[model.ValueMember] + "" : rowItemText != null ? rowItemText[model.ValueMember] + "" : "";
+ }
+ else
+ value = "";
+ }
}
}
return value;
}
+
+
+
+
+
+
///
/// 说明:导入到表格中
/// 创建人:龚宇超
@@ -2074,6 +2104,22 @@ namespace Lskj.Control.Model
// dataRow[col.FieldName] = cell.StringCellValue;
continue;
}
+
+ if(SystemInfo.Instance.ImportRemoveSpaces && cell.CellType == CellType.String)
+ {
+ // 清除字符串前后空格
+ string cellValue = cell.StringCellValue.Trim();
+ cell.SetCellValue(cellValue);
+ }
+
+ if ((model.ImportConversionFormat+"").Equals("1"))
+ {
+ // 转成全大写
+ string cellValue = cell.StringCellValue.ToUpper();
+ cell.SetCellValue(cellValue);
+ }
+
+
if (cell.CellType == CellType.Numeric && (cell.NumericCellValue + "").StartsWith("-"))
{
dataRow[col.FieldName] = cell.NumericCellValue;
@@ -2411,6 +2457,14 @@ namespace Lskj.Control.Model
//isImportRows = false;
continue;
}
+
+ if (SystemInfo.Instance.ImportRemoveSpaces && cell.CellType == CellType.String)
+ {
+ // 清除字符串前后空格
+ string cellValue = cell.StringCellValue.Trim();
+ cell.SetCellValue(cellValue);
+ }
+
if (cell.CellType == CellType.Numeric && (cell.NumericCellValue + "").StartsWith("-"))
{
dataRow[col.FieldName] = cell.NumericCellValue;
@@ -3686,47 +3740,4 @@ namespace Lskj.Control.Model
// 设置填充模式为实心填充
cellStyle.FillPattern = FillPattern.SolidForeground;
}
- cell.CellStyle = cellStyle;
- }
-
-
-
-
- // 保存更改回原始文件
- using (FileStream file = new FileStream(excelFilePath, FileMode.Create, FileAccess.Write))
- {
- workbook.Write(file);
- }
- }
- catch (Exception ex)
- {
-
- }
- }
-
-
-
- ///
- /// 是否存在未保存的数据
- ///
- ///
- ///
- public static bool IsDataNotSaved(this GridControlEx control)
- {
- DataTable table = control.gridControl.DataSource as DataTable;
- foreach (DataRow row in table.Rows)
- {
- if (row.RowState == DataRowState.Modified || row.RowState == DataRowState.Added)
- {
- return true;
- }
- }
-
- return false;
- }
-
-
-
-
- }
-}
+
\ No newline at end of file
diff --git a/插件库/Lskj.Control/Model/MenuStrip/BaseMenuStrip.cs b/插件库/Lskj.Control/Model/MenuStrip/BaseMenuStrip.cs
index 5c2b7bd..fa7624d 100644
--- a/插件库/Lskj.Control/Model/MenuStrip/BaseMenuStrip.cs
+++ b/插件库/Lskj.Control/Model/MenuStrip/BaseMenuStrip.cs
@@ -1505,7 +1505,7 @@ namespace Lskj.Control.Model
// 右键调用Lskj.PubBill.dll、Lskj.PubBillBrp,并且为多选新增,则汇总明细数据且只执行一次.
bool isOnlyOne = (model.DllName.Equals("lskj.pubbill.dll", StringComparison.OrdinalIgnoreCase) ||
model.DllName.Equals("lskj.pubbillbrp.dll", StringComparison.OrdinalIgnoreCase)) &&
- !string.IsNullOrEmpty(model.DllParam8) && !string.IsNullOrEmpty(model.DllParam9) && model.MoreClick;
+ !string.IsNullOrEmpty(model.DllParam8) && !string.IsNullOrEmpty(model.DllParam9) && model.Mergeexec;
if (isOnlyOne)
{
string fieldValue = paramList[8];
@@ -1675,14 +1675,18 @@ namespace Lskj.Control.Model
else
{
//多条合并执行时替换参数
- fieldValue = fieldValue.Replace("[", "{").Replace("]", "}");
+ //先替换{},替换的是选中行的数据
+ fieldValue = ReplaceHelper.ReplaceRowParam(rowData, fieldValue.Replace("#", ""));
+ //替换[],替换的是多选行中的数据
+ fieldValue = ReplaceHelper.ReplaceRowParam(rowDatas, fieldValue.Replace("[", "{").Replace("]", "}"), "", "");
+
//如果是sql的情况,可能有 select '[xx]' as xxx 和 where xx in([xxx]) 的情况,start和end不好统一设置,先默认为空
//string start = "'", end = "'";
//if (fieldValue.ToUpper().Contains("EXEC"))
//{
// start = end = string.Empty;
//}
- handleParamList.Add(ReplaceHelper.ReplaceRowParam(rowDatas, fieldValue, "", "") + "");
+ handleParamList.Add(fieldValue);
}
break;
case "[": //[FormTitle_格式数据
@@ -1788,4 +1792,28 @@ namespace Lskj.Control.Model
DataRow[] dataRows = columnsTab.Select().Where(n => (n["name"] + "").Equals(colunmField.Key)).ToArray();
if (dataRows.Length == 0)
{
- string a
\ No newline at end of file
+ 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 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;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/插件库/Lskj.Control/Model/MyControl.cs b/插件库/Lskj.Control/Model/MyControl.cs
index 0521627..a054a42 100644
--- a/插件库/Lskj.Control/Model/MyControl.cs
+++ b/插件库/Lskj.Control/Model/MyControl.cs
@@ -2969,7 +2969,7 @@ namespace Lskj.Control.Model
#endregion
#region 保存成功后上传附件
string idValue = primaryValue;
- if (SystemModel!=null&&!string.IsNullOrWhiteSpace(SystemModel.AttachmentAssociated))
+ if (SystemModel != null && !string.IsNullOrWhiteSpace(SystemModel.AttachmentAssociated))
{
idValue = GetControlValue(SystemModel.AttachmentAssociated);
}
@@ -3024,7 +3024,7 @@ namespace Lskj.Control.Model
}
#endregion
#region 保存后执行某个右键
- if (SystemModel!=null&&!string.IsNullOrEmpty(SystemModel.AfterSaveExec))
+ if (SystemModel != null && !string.IsNullOrEmpty(SystemModel.AfterSaveExec))
{
DataRow menuRow = BaseModuleImpl.GetBaseGridRightMenuById(SystemModel.AfterSaveExec);
if (menuRow != null)
@@ -3287,7 +3287,10 @@ namespace Lskj.Control.Model
this._mainGridEx.LastSearchSql = sqlValue;
this._mainGridEx.LastSearchButtonhSql = sqlValue;
-
+ //while (!_mainGridEx.IsHandleCreated)
+ //{
+ // System.Threading.Thread.Sleep(100);
+ //}
if (_mainGridEx.IsHandleCreated)
{
// 窗口加载完成搜索,采用异步加载
@@ -3924,6 +3927,7 @@ namespace Lskj.Control.Model
model.ImportReturnValue = item.Table.Columns.Contains("ImportReturnValue") && !string.IsNullOrWhiteSpace(item["ImportReturnValue"] + "") ? "1".Equals(item["ImportReturnValue"] + "") : false;
model.ImportCurrentValue = item.Table.Columns.Contains("ImportCurrentValue") && !string.IsNullOrWhiteSpace(item["ImportCurrentValue"] + "") ? "1".Equals(item["ImportCurrentValue"] + "") : false;
model.SchedStartDataControl = item.Table.Columns.Contains("SchedStartDataControl") && !string.IsNullOrWhiteSpace(item["SchedStartDataControl"] + "") ? "1".Equals(item["SchedStartDataControl"] + "") : false;
+ model.ListBoxFontSize = item.Table.Columns.Contains("ListBoxFontSize") && !string.IsNullOrEmpty(item["ListBoxFontSize"] + "") ? Convert.ToInt32(item["ListBoxFontSize"] + "") : 0;
return model;
}
///
@@ -4066,19 +4070,19 @@ namespace Lskj.Control.Model
case ControlType.LabMultiComTreeboxTextParam:
// 自动树节点搜索框
LabelAutoTreeEdit autoTreeEdit = new LabelAutoTreeEdit();
- autoTreeEdit.isMultiClick = (ControlType.LabMulitTreeValue == model.FieldType || ControlType.LabMulitTreeText == model.FieldType || ControlType.LabMulitTreeValueParam == model.FieldType || ControlType.LabMulitTreeTextParam == model.FieldType|| ControlType.LabMultiComTreeboxValue == model.FieldType || ControlType.LabMultiComTreeboxText == model.FieldType || ControlType.LabMultiComTreeboxValueParam == model.FieldType || ControlType.LabMultiComTreeboxTextParam == model.FieldType);
- autoTreeEdit.ValueMember = ControlType.LabMultiComTreeboxValueParam == model.FieldType || ControlType.LabMultiComTreeboxValue == model.FieldType||ControlType.LabMulitTreeValue == model.FieldType || ControlType.LabMulitTreeValueParam == model.FieldType || ControlType.LabTreeLookValue == model.FieldType || ControlType.LabCheckTreeLookValue == model.FieldType || ControlType.LabTreeLastlevelValue == model.FieldType || ControlType.LabCheckTreeLastlevelValue == model.FieldType ? model.ValueMember : model.TextMember;
+ autoTreeEdit.isMultiClick = (ControlType.LabMulitTreeValue == model.FieldType || ControlType.LabMulitTreeText == model.FieldType || ControlType.LabMulitTreeValueParam == model.FieldType || ControlType.LabMulitTreeTextParam == model.FieldType || ControlType.LabMultiComTreeboxValue == model.FieldType || ControlType.LabMultiComTreeboxText == model.FieldType || ControlType.LabMultiComTreeboxValueParam == model.FieldType || ControlType.LabMultiComTreeboxTextParam == model.FieldType);
+ autoTreeEdit.ValueMember = ControlType.LabMultiComTreeboxValueParam == model.FieldType || ControlType.LabMultiComTreeboxValue == model.FieldType || ControlType.LabMulitTreeValue == model.FieldType || ControlType.LabMulitTreeValueParam == model.FieldType || ControlType.LabTreeLookValue == model.FieldType || ControlType.LabCheckTreeLookValue == model.FieldType || ControlType.LabTreeLastlevelValue == model.FieldType || ControlType.LabCheckTreeLastlevelValue == model.FieldType ? model.ValueMember : model.TextMember;
autoTreeEdit.ValueField = model.ValueMember;
autoTreeEdit.TextField = model.TextMember;
if (ControlType.LabTreeLastlevelValue == model.FieldType || ControlType.LabTreeLastlevelText == model.FieldType || ControlType.LabCheckTreeLastlevelValue == model.FieldType || ControlType.LabCheckTreeLastlevelText == model.FieldType) autoTreeEdit.isRootNode = false;
-
+
//工具中和bs里 132-135都是只能选末级,136-139可以选中全部
if (ControlType.LabMultiComTreeboxValue == model.FieldType || ControlType.LabMultiComTreeboxText == model.FieldType || ControlType.LabMultiComTreeboxValueParam == model.FieldType || ControlType.LabMultiComTreeboxTextParam == model.FieldType)
{
autoTreeEdit.TextEdit.SelectAll = true;
}
-
+
//autoTreeEdit.FormKey = model.FieldName + "_" + model.FormKey;
//autoEdit.SetDataSource(dataSource);
autoTreeEdit.TextEdit.SourceSQL = model.SourceSql;
@@ -4348,6 +4352,7 @@ namespace Lskj.Control.Model
case ControlType.LabComboxPopupText:
// 弹出下拉列表框
LabelComboxPopupEdit comboxPopupEdit = new LabelComboxPopupEdit();
+ comboxPopupEdit.ListBoxFontSize = model.ListBoxFontSize;
comboxPopupEdit.ControlObj = this;
comboxPopupEdit.TextEdit.TextChanged += new EventHandler(OnTextEditTextChanged);
if (!isLoadBorder) comboxPopupEdit.TextEdit.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
@@ -4357,6 +4362,7 @@ namespace Lskj.Control.Model
case ControlType.LabComboxPopupMutilText:
// 弹出多选列表框
LabelComboxMutilPopupEdit comboxMutilPopupEdit = new LabelComboxMutilPopupEdit();
+ comboxMutilPopupEdit.ListBoxFontSize = model.ListBoxFontSize;
comboxMutilPopupEdit.ControlObj = this;
comboxMutilPopupEdit.TextEdit.TextChanged += new EventHandler(OnTextEditTextChanged);
if (!isLoadBorder) comboxMutilPopupEdit.TextEdit.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
diff --git a/插件库/Lskj.Control/ModuleGridDetailEx.cs b/插件库/Lskj.Control/ModuleGridDetailEx.cs
index c0a88d6..258dd15 100644
--- a/插件库/Lskj.Control/ModuleGridDetailEx.cs
+++ b/插件库/Lskj.Control/ModuleGridDetailEx.cs
@@ -480,7 +480,7 @@ namespace Lskj.Control
else
{
DataRow rowItem = this.ModuleGridObj.GridControlObj.GetViewFocusedDataRow();
- string mainModuleCode = rowItem[SysModel.MainModuleCodeField] + "";
+ string mainModuleCode = (rowItem[SysModel.MainModuleCodeField] + "").ToLower();
//mainModuleCode = String.Empty;
this.TabObj.TabPages.Clear();
//if (string.IsNullOrWhiteSpace(mainModuleCode)) return;
diff --git a/插件库/Lskj.Control/TabControlEx.cs b/插件库/Lskj.Control/TabControlEx.cs
index 2e46424..ae250bf 100644
--- a/插件库/Lskj.Control/TabControlEx.cs
+++ b/插件库/Lskj.Control/TabControlEx.cs
@@ -575,16 +575,17 @@ namespace Lskj.Control
detailTabPageModel.DetailModel = model;
if (!string.IsNullOrEmpty(model.ParentModuleCode))
{
- if (this.DetailTabPagesDic.ContainsKey(model.ParentModuleCode))
+ string ParentModuleCode = model.ParentModuleCode.ToLower();
+ if (this.DetailTabPagesDic.ContainsKey(ParentModuleCode))
{
- List detailTabPageModels = this.DetailTabPagesDic[model.ParentModuleCode];
+ List detailTabPageModels = this.DetailTabPagesDic[ParentModuleCode];
detailTabPageModels.Add(detailTabPageModel);
}
else
{
List detailTabPageModels = new List();
detailTabPageModels.Add(detailTabPageModel);
- this.DetailTabPagesDic.Add(model.ParentModuleCode, detailTabPageModels);
+ this.DetailTabPagesDic.Add(ParentModuleCode, detailTabPageModels);
}
}
}
diff --git a/插件库/Lskj.Control/TreeGridControlEx.cs b/插件库/Lskj.Control/TreeGridControlEx.cs
index 26fa1b7..2fdc5f3 100644
--- a/插件库/Lskj.Control/TreeGridControlEx.cs
+++ b/插件库/Lskj.Control/TreeGridControlEx.cs
@@ -2188,11 +2188,16 @@ namespace Lskj.Control
/// if set to true [select row handler].
public override void SetGridViewDataSource(DataTable table, bool selectRowHandler = true)
{
+ if (this.ColumnList == null || this.ColumnList.Count == 0)
+ {
+ this.gcMain.Columns.Clear();
+ }
lastNodeIndex = 0;
if (selectRowHandler) lastNodeIndex = this.TreeListObj.GetVisibleIndexByNode(this.TreeListObj.FocusedNode);
GetTreeExpanded();
this.gcMain.ClearNodes();
this.gcMain.DataSource = table;
+ this.SetAutoColumns();
}
public override int SetGridViewDataSource(SqlDataAdapter adapter, bool selectRowHandler = true)
{
@@ -2203,10 +2208,17 @@ namespace Lskj.Control
DataSet dataSet = new DataSet();
adapter.Fill(dataSet, "SetGridViewDataSource");
+ if (this.ColumnList == null || this.ColumnList.Count == 0)
+ {
+ this.gcMain.Columns.Clear();
+ }
+
SqlCommandBuilder cb = new SqlCommandBuilder(this.AdapterObj);
GetTreeExpanded();
this.gcMain.DataSource = dataSet.Tables[0];
+ this.SetAutoColumns();
+
if ((Expansion + "").Equals("1"))
{
this.gcMain.ExpandAll();
@@ -2221,6 +2233,97 @@ namespace Lskj.Control
}
return dataSet.Tables[0] != null ? dataSet.Tables[0].Rows.Count : 0;
}
+
+
+ ///
+ /// 说明:设置动态列
+ /// 创建人:龚宇超
+ /// 创建日期:2019-06-03
+ /// 修改人:
+ /// 修改日期:
+ /// 修改备注:
+ /// 版本:1.0
+ ///
+ protected virtual void SetAutoColumns()
+ {
+ if (this.ColumnList == null || this.ColumnList.Count == 0)
+ {
+ bool isShowFooter = false;
+ for (int i = 0; i < gcMain.Columns.Count; i++)
+ {
+ try
+ {
+ TreeListColumn col = gcMain.Columns[i];
+ col.OptionsFilter.AutoFilterCondition = AutoFilterCondition.Contains;
+ col.OptionsFilter.FilterPopupMode = FilterPopupMode.CheckedList;
+
+ if (col.FieldName.Contains("_"))
+ {
+ string[] colSplit = col.FieldName.Split('_');
+ if (colSplit.Length >= 2)
+ {
+ col.Caption = colSplit[0];
+ col.Width = Convert.ToInt32(colSplit[1]);
+ if (Convert.ToInt32(colSplit[1]) == 0)
+ col.Visible = false;
+ if (colSplit.Length > 2)
+ {
+ bool visible = "1".Equals(colSplit[2]);
+ // 设置底部合计
+ if (col.VisibleIndex == 0)
+ {
+ isShowFooter = true;
+
+ gcMain.OptionsView.ShowSummaryFooter = true;
+ col.AllNodesSummary = true;
+ col.SummaryFooter = SummaryItemType.Count;
+ col.SummaryFooterStrFormat = "合计:{0:#,###}行";
+
+
+ }
+ else
+ {
+ if (visible)
+ {
+ isShowFooter = true;
+
+ gcMain.OptionsView.ShowSummaryFooter = true;
+ col.AllNodesSummary = true;
+ col.SummaryFooter = DevExpress.XtraTreeList.SummaryItemType.Sum;
+ col.SummaryFooterStrFormat = "{0:}";
+
+ }
+ }
+ if (colSplit.Length > 3)
+ {
+ string dataFormat = colSplit[3];
+
+ if (!string.IsNullOrWhiteSpace(dataFormat))
+ {
+ col.Format.FormatType = FormatType.Custom;
+ col.Format.FormatString = dataFormat;
+
+ }
+ }
+ }
+ }
+ }
+ else
+ {
+ col.Width = 150;
+ }
+ //cMain.OptionsView.ShowFooter = isShowFooter;
+ }
+ catch (Exception)
+ {
+
+ }
+ }
+ }
+ }
+
+
+
///
/// 记录展开的节点
///