SVN r689
SVN-Revision: r689
This commit is contained in:
+90
-95
@@ -28,36 +28,38 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.btnSave = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.btnDel = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.btnAdd = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.pm_print = new DevExpress.XtraBars.PopupMenu();
|
||||
this.barManager1 = new DevExpress.XtraBars.BarManager();
|
||||
this.pm_print = new DevExpress.XtraBars.PopupMenu(this.components);
|
||||
this.barManager1 = new DevExpress.XtraBars.BarManager(this.components);
|
||||
this.barDockControlTop = new DevExpress.XtraBars.BarDockControl();
|
||||
this.barDockControlBottom = new DevExpress.XtraBars.BarDockControl();
|
||||
this.barDockControlLeft = new DevExpress.XtraBars.BarDockControl();
|
||||
this.barDockControlRight = new DevExpress.XtraBars.BarDockControl();
|
||||
this.pm_oper = new DevExpress.XtraBars.PopupMenu();
|
||||
this.pm_oper = new DevExpress.XtraBars.PopupMenu(this.components);
|
||||
this.pl_buttom = new DevExpress.XtraEditors.PanelControl();
|
||||
this.dpbTools = new DevExpress.XtraEditors.DropDownButton();
|
||||
this.pm_common = new DevExpress.XtraBars.PopupMenu();
|
||||
this.pm_common = new DevExpress.XtraBars.PopupMenu(this.components);
|
||||
this.btnUpdate = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.btnPrint = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.btnExport = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.btnImport = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.btnAttach = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.pl_top = new DevExpress.XtraEditors.PanelControl();
|
||||
this.TipsPanel = new System.Windows.Forms.Panel();
|
||||
this.pl_top_right = new DevExpress.XtraEditors.PanelControl();
|
||||
this.btnRefresh = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.btnHelp = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.ddbPrint = new DevExpress.XtraEditors.DropDownButton();
|
||||
this.ddbOper = new DevExpress.XtraEditors.DropDownButton();
|
||||
this.pl_top_search = new DevExpress.XtraEditors.PanelControl();
|
||||
this.pl_top_fix_search = new DevExpress.XtraEditors.PanelControl();
|
||||
this.cbField = new System.Windows.Forms.ComboBox();
|
||||
this.btnFixSearch = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.txtFixKey = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.pl_top_right = new DevExpress.XtraEditors.PanelControl();
|
||||
this.btnRefresh = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.btnHelp = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.ddbPrint = new DevExpress.XtraEditors.DropDownButton();
|
||||
this.ddbOper = new DevExpress.XtraEditors.DropDownButton();
|
||||
this.pl_top_RightMenus = new DevExpress.XtraEditors.PanelControl();
|
||||
this.panelControl1 = new DevExpress.XtraEditors.PanelControl();
|
||||
this.gcMain = new Lskj.Control.GridControlEx();
|
||||
@@ -69,12 +71,12 @@
|
||||
((System.ComponentModel.ISupportInitialize)(this.pm_common)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pl_top)).BeginInit();
|
||||
this.pl_top.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pl_top_right)).BeginInit();
|
||||
this.pl_top_right.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pl_top_search)).BeginInit();
|
||||
this.pl_top_search.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pl_top_fix_search)).BeginInit();
|
||||
this.pl_top_fix_search.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pl_top_right)).BeginInit();
|
||||
this.pl_top_right.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pl_top_RightMenus)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.panelControl1)).BeginInit();
|
||||
this.panelControl1.SuspendLayout();
|
||||
@@ -266,14 +268,86 @@
|
||||
// pl_top
|
||||
//
|
||||
this.pl_top.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
|
||||
this.pl_top.Controls.Add(this.pl_top_search);
|
||||
this.pl_top.Controls.Add(this.TipsPanel);
|
||||
this.pl_top.Controls.Add(this.pl_top_right);
|
||||
this.pl_top.Controls.Add(this.pl_top_search);
|
||||
this.pl_top.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.pl_top.Location = new System.Drawing.Point(0, 35);
|
||||
this.pl_top.Name = "pl_top";
|
||||
this.pl_top.Size = new System.Drawing.Size(843, 34);
|
||||
this.pl_top.TabIndex = 6;
|
||||
//
|
||||
// TipsPanel
|
||||
//
|
||||
this.TipsPanel.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.TipsPanel.Location = new System.Drawing.Point(0, 0);
|
||||
this.TipsPanel.Name = "TipsPanel";
|
||||
this.TipsPanel.Size = new System.Drawing.Size(441, 34);
|
||||
this.TipsPanel.TabIndex = 10;
|
||||
this.TipsPanel.Visible = false;
|
||||
//
|
||||
// pl_top_right
|
||||
//
|
||||
this.pl_top_right.Appearance.BackColor = System.Drawing.Color.Transparent;
|
||||
this.pl_top_right.Appearance.Options.UseBackColor = true;
|
||||
this.pl_top_right.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
|
||||
this.pl_top_right.Controls.Add(this.btnRefresh);
|
||||
this.pl_top_right.Controls.Add(this.btnAttach);
|
||||
this.pl_top_right.Controls.Add(this.btnHelp);
|
||||
this.pl_top_right.Controls.Add(this.ddbPrint);
|
||||
this.pl_top_right.Controls.Add(this.ddbOper);
|
||||
this.pl_top_right.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.pl_top_right.Location = new System.Drawing.Point(441, 0);
|
||||
this.pl_top_right.Name = "pl_top_right";
|
||||
this.pl_top_right.Size = new System.Drawing.Size(402, 34);
|
||||
this.pl_top_right.TabIndex = 7;
|
||||
//
|
||||
// btnRefresh
|
||||
//
|
||||
this.btnRefresh.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnRefresh.Appearance.Options.UseFont = true;
|
||||
this.btnRefresh.Location = new System.Drawing.Point(319, 4);
|
||||
this.btnRefresh.Name = "btnRefresh";
|
||||
this.btnRefresh.Size = new System.Drawing.Size(75, 24);
|
||||
this.btnRefresh.TabIndex = 41;
|
||||
this.btnRefresh.Text = "刷新列数据";
|
||||
this.btnRefresh.Click += new System.EventHandler(this.btnRefresh_Click);
|
||||
//
|
||||
// btnHelp
|
||||
//
|
||||
this.btnHelp.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnHelp.Appearance.Options.UseFont = true;
|
||||
this.btnHelp.Location = new System.Drawing.Point(250, 4);
|
||||
this.btnHelp.Name = "btnHelp";
|
||||
this.btnHelp.Size = new System.Drawing.Size(63, 24);
|
||||
this.btnHelp.TabIndex = 34;
|
||||
this.btnHelp.Text = "帮助文档";
|
||||
this.btnHelp.Click += new System.EventHandler(this.OnBtnHelpClick);
|
||||
//
|
||||
// ddbPrint
|
||||
//
|
||||
this.ddbPrint.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.ddbPrint.Appearance.Options.UseFont = true;
|
||||
this.ddbPrint.DropDownArrowStyle = DevExpress.XtraEditors.DropDownArrowStyle.Show;
|
||||
this.ddbPrint.DropDownControl = this.pm_print;
|
||||
this.ddbPrint.Location = new System.Drawing.Point(169, 4);
|
||||
this.ddbPrint.Name = "ddbPrint";
|
||||
this.ddbPrint.Size = new System.Drawing.Size(75, 24);
|
||||
this.ddbPrint.TabIndex = 12;
|
||||
this.ddbPrint.Text = "常用打印";
|
||||
//
|
||||
// ddbOper
|
||||
//
|
||||
this.ddbOper.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.ddbOper.Appearance.Options.UseFont = true;
|
||||
this.ddbOper.DropDownArrowStyle = DevExpress.XtraEditors.DropDownArrowStyle.Show;
|
||||
this.ddbOper.DropDownControl = this.pm_oper;
|
||||
this.ddbOper.Location = new System.Drawing.Point(88, 4);
|
||||
this.ddbOper.Name = "ddbOper";
|
||||
this.ddbOper.Size = new System.Drawing.Size(75, 24);
|
||||
this.ddbOper.TabIndex = 13;
|
||||
this.ddbOper.Text = "常用操作";
|
||||
//
|
||||
// pl_top_search
|
||||
//
|
||||
this.pl_top_search.Appearance.BackColor = System.Drawing.Color.Transparent;
|
||||
@@ -283,7 +357,7 @@
|
||||
this.pl_top_search.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.pl_top_search.Location = new System.Drawing.Point(0, 0);
|
||||
this.pl_top_search.Name = "pl_top_search";
|
||||
this.pl_top_search.Size = new System.Drawing.Size(444, 34);
|
||||
this.pl_top_search.Size = new System.Drawing.Size(843, 34);
|
||||
this.pl_top_search.TabIndex = 8;
|
||||
//
|
||||
// pl_top_fix_search
|
||||
@@ -336,68 +410,6 @@
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "查询";
|
||||
//
|
||||
// pl_top_right
|
||||
//
|
||||
this.pl_top_right.Appearance.BackColor = System.Drawing.Color.Transparent;
|
||||
this.pl_top_right.Appearance.Options.UseBackColor = true;
|
||||
this.pl_top_right.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
|
||||
this.pl_top_right.Controls.Add(this.btnRefresh);
|
||||
this.pl_top_right.Controls.Add(this.btnAttach);
|
||||
this.pl_top_right.Controls.Add(this.btnHelp);
|
||||
this.pl_top_right.Controls.Add(this.ddbPrint);
|
||||
this.pl_top_right.Controls.Add(this.ddbOper);
|
||||
this.pl_top_right.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.pl_top_right.Location = new System.Drawing.Point(444, 0);
|
||||
this.pl_top_right.Name = "pl_top_right";
|
||||
this.pl_top_right.Size = new System.Drawing.Size(399, 34);
|
||||
this.pl_top_right.TabIndex = 7;
|
||||
//
|
||||
// btnRefresh
|
||||
//
|
||||
this.btnRefresh.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnRefresh.Appearance.Options.UseFont = true;
|
||||
this.btnRefresh.Location = new System.Drawing.Point(319, 4);
|
||||
this.btnRefresh.Name = "btnRefresh";
|
||||
this.btnRefresh.Size = new System.Drawing.Size(75, 24);
|
||||
this.btnRefresh.TabIndex = 41;
|
||||
this.btnRefresh.Text = "刷新列数据";
|
||||
this.btnRefresh.Click += new System.EventHandler(this.btnRefresh_Click);
|
||||
//
|
||||
// btnHelp
|
||||
//
|
||||
this.btnHelp.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnHelp.Appearance.Options.UseFont = true;
|
||||
this.btnHelp.Location = new System.Drawing.Point(250, 4);
|
||||
this.btnHelp.Name = "btnHelp";
|
||||
this.btnHelp.Size = new System.Drawing.Size(63, 24);
|
||||
this.btnHelp.TabIndex = 34;
|
||||
this.btnHelp.Text = "帮助文档";
|
||||
this.btnHelp.Click += new System.EventHandler(this.OnBtnHelpClick);
|
||||
//
|
||||
// ddbPrint
|
||||
//
|
||||
this.ddbPrint.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.ddbPrint.Appearance.Options.UseFont = true;
|
||||
this.ddbPrint.DropDownArrowStyle = DevExpress.XtraEditors.DropDownArrowStyle.Show;
|
||||
this.ddbPrint.DropDownControl = this.pm_print;
|
||||
this.ddbPrint.Location = new System.Drawing.Point(169, 4);
|
||||
this.ddbPrint.Name = "ddbPrint";
|
||||
this.ddbPrint.Size = new System.Drawing.Size(75, 24);
|
||||
this.ddbPrint.TabIndex = 12;
|
||||
this.ddbPrint.Text = "常用打印";
|
||||
//
|
||||
// ddbOper
|
||||
//
|
||||
this.ddbOper.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.ddbOper.Appearance.Options.UseFont = true;
|
||||
this.ddbOper.DropDownArrowStyle = DevExpress.XtraEditors.DropDownArrowStyle.Show;
|
||||
this.ddbOper.DropDownControl = this.pm_oper;
|
||||
this.ddbOper.Location = new System.Drawing.Point(88, 4);
|
||||
this.ddbOper.Name = "ddbOper";
|
||||
this.ddbOper.Size = new System.Drawing.Size(75, 24);
|
||||
this.ddbOper.TabIndex = 13;
|
||||
this.ddbOper.Text = "常用操作";
|
||||
//
|
||||
// pl_top_RightMenus
|
||||
//
|
||||
this.pl_top_RightMenus.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
|
||||
@@ -451,13 +463,13 @@
|
||||
((System.ComponentModel.ISupportInitialize)(this.pm_common)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pl_top)).EndInit();
|
||||
this.pl_top.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.pl_top_right)).EndInit();
|
||||
this.pl_top_right.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.pl_top_search)).EndInit();
|
||||
this.pl_top_search.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.pl_top_fix_search)).EndInit();
|
||||
this.pl_top_fix_search.ResumeLayout(false);
|
||||
this.pl_top_fix_search.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pl_top_right)).EndInit();
|
||||
this.pl_top_right.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.pl_top_RightMenus)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.panelControl1)).EndInit();
|
||||
this.panelControl1.ResumeLayout(false);
|
||||
@@ -485,21 +497,4 @@
|
||||
private DevExpress.XtraBars.PopupMenu pm_common;
|
||||
private DevExpress.XtraEditors.DropDownButton dpbTools;
|
||||
private DevExpress.XtraEditors.PanelControl pl_top;
|
||||
private DevExpress.XtraEditors.PanelControl pl_top_search;
|
||||
private DevExpress.XtraEditors.PanelControl pl_top_fix_search;
|
||||
private System.Windows.Forms.ComboBox cbField;
|
||||
private DevExpress.XtraEditors.SimpleButton btnFixSearch;
|
||||
private System.Windows.Forms.TextBox txtFixKey;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private DevExpress.XtraEditors.PanelControl pl_top_right;
|
||||
private DevExpress.XtraEditors.SimpleButton btnHelp;
|
||||
private DevExpress.XtraEditors.DropDownButton ddbPrint;
|
||||
private DevExpress.XtraEditors.DropDownButton ddbOper;
|
||||
private DevExpress.XtraEditors.PanelControl pl_buttom;
|
||||
private DevExpress.XtraEditors.SimpleButton btnAttach;
|
||||
private DevExpress.XtraEditors.PanelControl pl_top_RightMenus;
|
||||
private DevExpress.XtraEditors.PanelControl panelControl1;
|
||||
private GridControlEx gcMain;
|
||||
private DevExpress.XtraEditors.SimpleButton btnRefresh;
|
||||
}
|
||||
}
|
||||
private DevExpress.XtraEditors.Pane
|
||||
@@ -421,6 +421,18 @@ namespace Lskj.Control
|
||||
/// 作为明细时对应的标签名
|
||||
/// </summary>
|
||||
public string TagName;
|
||||
/// <summary>
|
||||
/// 上方提示框是否创建
|
||||
/// </summary>
|
||||
public bool CreatePromptBox = false;
|
||||
/// <summary>
|
||||
/// 上方提示框
|
||||
/// </summary>
|
||||
public LabelRemarkEdit PromptBox = null;
|
||||
/// <summary>
|
||||
/// 上方高度
|
||||
/// </summary>
|
||||
public int TopHeight = 0;
|
||||
|
||||
/// <summary>
|
||||
/// 点击搜索时,判断当前表的明细是否有修改或新增状态的行
|
||||
@@ -3272,6 +3284,40 @@ namespace Lskj.Control
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 传入模块号打印完成需要参数
|
||||
/// </summary>
|
||||
private void GetPrintOtherParam(string ModeCond)
|
||||
{
|
||||
//取得打印完成后的参数
|
||||
|
||||
if (!string.IsNullOrEmpty(ModeCond) )
|
||||
{
|
||||
|
||||
DataRow item = AttachImpl.GetSystemModule(ModeCond);
|
||||
string tableName = item["TableName"] + "";
|
||||
string modetype = item["modType"] + "";
|
||||
string comprefix = BaseImpl.GetColumnPrefix(tableName);
|
||||
string primaryKey = modetype == "1" ? BaseImpl.GetBasePrimaryKey(ModeCond) : comprefix + "billdocument_id";
|
||||
//表名,列前缀,主键字段,主键值,模块编号,主打印Sql
|
||||
_printSaveParams = new List<string>() { tableName, comprefix, primaryKey, "", ModeCond, _mainPrintSql };
|
||||
|
||||
//判断是否直接打印 modetype 区别单据和基础档案模块
|
||||
switch (modetype)
|
||||
{
|
||||
case "1":
|
||||
ModuleModel mode = new ModuleModel(MainImpl.GetSystemdllTab(ModeCond));
|
||||
if (mode != null) _isExcPrint = mode.PrintType == 3;
|
||||
break;
|
||||
case "2":
|
||||
BaseAccraditationModel model = new BaseAccraditationModel(BillAuditImpl.GetPubAuditProperty(ModeCond));
|
||||
if (model != null) _isExcPrint = model.BillPrintType == 3;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public method
|
||||
@@ -3903,7 +3949,7 @@ namespace Lskj.Control
|
||||
string printType = printRowItem["printType"] + "";
|
||||
string sourceType = printRowItem["sourceType"] + "";
|
||||
string printPath = PubUtil.PrintFileAbsolutelyPath70;
|
||||
|
||||
string modid= printRowItem["modid"] + "";
|
||||
if (!File.Exists(printPath))
|
||||
{
|
||||
MessageUtil.Show(ResourceKeys.NotFoundPrintFile);
|
||||
@@ -3912,23 +3958,89 @@ namespace Lskj.Control
|
||||
|
||||
try
|
||||
{
|
||||
if ("2".Equals(sourceType) || "3".Equals(sourceType))
|
||||
if (printFile.Contains(PrintUtil.TemplateFlag))
|
||||
{
|
||||
//int[] rows = this.gcMain.GridView.GetSelectedRows();
|
||||
//List<DataRow> rowList = new List<DataRow>();
|
||||
//for (int i = 0; i < rows.Length; i++)
|
||||
//{
|
||||
// rowList.Add(this.gcMain.GridView.GetDataRow(rows[i]));
|
||||
//}
|
||||
DataRow[] dataRows = this.gcMain.GetViewFocusedDataRows();
|
||||
printParams = dataRows != null && dataRows.Length > 0 ? dataRows.CopyToDataTable().ToJsonArray() : "";
|
||||
|
||||
this.GetPrintOtherParam(modid);
|
||||
|
||||
DataRow dataRow = gcMain.GetViewFocusedDataRow();
|
||||
string ids = string.Empty;
|
||||
string tmpSql = printRowItem["printSQL"] + "";
|
||||
string tmpSql1 = printRowItem["printSQL1"] + "";
|
||||
string tmpSql2 = printRowItem["printSQL2"] + "";
|
||||
|
||||
tmpSql = this.SearchObj.ReplaceParentControlValue(tmpSql);
|
||||
tmpSql1 = this.SearchObj.ReplaceParentControlValue(tmpSql1);
|
||||
tmpSql2 = this.SearchObj.ReplaceParentControlValue(tmpSql2);
|
||||
|
||||
//目前固定替换焦点行数据,数据来源类型(sourceType)和Delphi里的用法有冲突,先不考虑
|
||||
tmpSql = ReplaceHelper.ReplaceRowParam(dataRow, tmpSql);
|
||||
tmpSql1 = ReplaceHelper.ReplaceRowParam(dataRow, tmpSql1);
|
||||
tmpSql2 = ReplaceHelper.ReplaceRowParam(dataRow, tmpSql2);
|
||||
|
||||
//替换左侧数据
|
||||
if (this.LeftTreeViewEx != null || this.LeftGridEx != null)
|
||||
{
|
||||
string nodeKey = string.Empty;
|
||||
if (this.LeftTreeViewEx != null)
|
||||
{
|
||||
nodeKey = this.LeftTreeViewEx.GetSelectNodeValue();
|
||||
ids = LeftTreeViewEx.GetCheckValues();
|
||||
}
|
||||
if (this.LeftGridEx != null)
|
||||
{
|
||||
nodeKey = this.LeftGridEx.GetViewFocusedDataRow()[ParentKeyField] + "";
|
||||
if (LeftGridEx is TreeGridControlEx) nodeKey = LeftGridEx.GetViewFocusedDataRow()[ParentKeyField] + "";
|
||||
}
|
||||
|
||||
nodeKey = string.IsNullOrEmpty(ids) ? nodeKey : ids;
|
||||
// select语句追加条件
|
||||
tmpSql = ReplaceHelper.ReplaceTreeViewParentKeyCond(tmpSql, nodeKey);
|
||||
tmpSql1 = ReplaceHelper.ReplaceTreeViewParentKeyCond(tmpSql1, nodeKey);
|
||||
tmpSql2 = ReplaceHelper.ReplaceTreeViewParentKeyCond(tmpSql2, nodeKey);
|
||||
}
|
||||
|
||||
//主Sql
|
||||
string mainSql = string.Empty;
|
||||
List<string> tmpSqls = new List<string>();
|
||||
tmpSqls.Add(tmpSql);
|
||||
tmpSqls.Add(tmpSql1);
|
||||
tmpSqls.AddRange(tmpSql2.Split(';').ToList());
|
||||
if (_printSaveParams != null && _printSaveParams.Count > 0)
|
||||
{
|
||||
_printSaveParams[5] = tmpSql+ tmpSql1+ tmpSql2;
|
||||
_printSaveParams[3] = dataRow[_printSaveParams[2]] + "";
|
||||
}
|
||||
|
||||
if (printFile.Contains(PrintUtil.TemplateFlag))
|
||||
{
|
||||
PrintUtil.OnAfterPrint -= new EventHandler(OnReportPrintAfter);
|
||||
PrintUtil.OnAfterPrint += new EventHandler(OnReportPrintAfter);
|
||||
PrintUtil.FastReportPrint(tmpSqls, printFile, _isExcPrint);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if ("2".Equals(sourceType) || "3".Equals(sourceType))
|
||||
{
|
||||
//int[] rows = this.gcMain.GridView.GetSelectedRows();
|
||||
//List<DataRow> rowList = new List<DataRow>();
|
||||
//for (int i = 0; i < rows.Length; i++)
|
||||
//{
|
||||
// rowList.Add(this.gcMain.GridView.GetDataRow(rows[i]));
|
||||
//}
|
||||
DataRow[] dataRows = this.gcMain.GetViewFocusedDataRows();
|
||||
printParams = dataRows != null && dataRows.Length > 0 ? dataRows.CopyToDataTable().ToJsonArray() : "";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
printParams = ReplaceHelper.ReplaceRowParam(this.gcMain.GetViewFocusedDataRow(), printParams);
|
||||
printParams = ReplaceHelper.ReplaceRowParam(this.gcMain.GetViewFocusedDataRow(), printParams);
|
||||
}
|
||||
DelphiHelper.LoadDelphiDll(printPath, printPath, this.Model.ModuleCode, printName, printParams, Convert.ToInt32(printType), "");
|
||||
}
|
||||
DelphiHelper.LoadDelphiDll(printPath, printPath, this.Model.ModuleCode, printName, printParams, Convert.ToInt32(printType), "");
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -4249,7 +4361,7 @@ namespace Lskj.Control
|
||||
{
|
||||
LogUtil.WriteError("基础档案明细保存失败", ex);
|
||||
}
|
||||
IsApi: if (isExec)
|
||||
IsApi: if (isExec)
|
||||
{
|
||||
this.SaveGridRecord();
|
||||
if (OnSaveGridCallBack != null)
|
||||
@@ -5228,4 +5340,88 @@ namespace Lskj.Control
|
||||
|
||||
public void SelectTheSpecifiedRow()
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(this.TagName) && ParentGridEx != null && ParentGridEx.GridView.OptionsSelection.MultiSelect == true && GridControlObj.GridView.OptionsSelection.MultiSelect == true && this.P
|
||||
if (!string.IsNullOrWhiteSpace(this.TagName) && ParentGridEx != null && ParentGridEx.GridView.OptionsSelection.MultiSelect == true && GridControlObj.GridView.OptionsSelection.MultiSelect == true && this.ParentControlEx.DetailSelection.ContainsKey(this.TagName))
|
||||
{
|
||||
|
||||
DataRow rowItem = this.ParentGridEx.GridView.GetFocusedDataRow();
|
||||
Dictionary<DataRow, string> dictionary = this.ParentControlEx.DetailSelection[this.TagName];
|
||||
if (dictionary.ContainsKey(rowItem))
|
||||
{
|
||||
DataTable dataTable = GridControlObj.GridControl.DataSource as DataTable;
|
||||
string value = dictionary[rowItem];
|
||||
for (int rowHandle = 0; rowHandle < GridControlObj.GridView.RowCount; rowHandle++)
|
||||
{
|
||||
string cellValue = GridControlObj.GridView.GetRowCellValue(rowHandle, ParmaryKey) + "";
|
||||
if (value.Split(',').Contains(cellValue))
|
||||
{
|
||||
GridControlObj.GridView.SelectRow(rowHandle); // 勾选
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置动态列提示信息
|
||||
/// </summary>
|
||||
/// <param name="ColumnName"></param>
|
||||
public void SetDisplayColumns(string text,int ForceSize, string ForceColor)
|
||||
{
|
||||
if (!this.SysModel.SearchEnable)
|
||||
{
|
||||
|
||||
//不能搜索,并且传入提示值
|
||||
this.pl_top_fix_search.Visible = false;
|
||||
this.TipsPanel.Visible = true;
|
||||
|
||||
//提示内容有值的情况下,隐藏右侧按钮
|
||||
if (string.IsNullOrWhiteSpace(text))
|
||||
{
|
||||
this.pl_top_right.Visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.pl_top_right.Visible = false;
|
||||
}
|
||||
|
||||
if (!CreatePromptBox)
|
||||
{
|
||||
this.TopHeight = this.pl_top.Height;
|
||||
//代码的方式创建,直接拖的控件会提示线程问题
|
||||
this.TipsPanel.Controls.Clear();
|
||||
this.PromptBox = new LabelRemarkEdit();
|
||||
this.PromptBox.Dock = DockStyle.Fill;
|
||||
this.PromptBox.Padding = new Padding(3, 5, 0, 0);
|
||||
this.PromptBox.FontSize = ForceSize;
|
||||
this.PromptBox.LabelText = "";
|
||||
this.PromptBox.TextEdit.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
|
||||
this.PromptBox.TextEdit.BackColor = Color.FromArgb(173, 216, 230);
|
||||
this.TipsPanel.BackColor = Color.FromArgb(173, 216, 230);
|
||||
if (!string.IsNullOrWhiteSpace(ForceColor))
|
||||
{
|
||||
this.PromptBox.TextEdit.ForeColor = ColorTranslator.FromHtml(ForceColor);
|
||||
}
|
||||
this.PromptBox.TextEdit.ReadOnly = true;
|
||||
this.TipsPanel.Controls.Add(this.PromptBox);
|
||||
|
||||
CreatePromptBox = true;
|
||||
}
|
||||
PromptBox.EditText = text;
|
||||
|
||||
|
||||
int textHeight = this.GetFirstThreeLinesHeight(PromptBox.TextEdit)+4;
|
||||
if (textHeight > this.TopHeight)
|
||||
{
|
||||
this.pl_top.Height = textHeight;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.pl_top.Height = this.TopHeight;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int GetFirstThreeLinesHeight(MemoEdit memoEdit)
|
||||
{
|
||||
if (string.IsNullOrEmpty(memoEdit.Te
|
||||
Reference in New Issue
Block a user