SVN-Revision: r282
This commit is contained in:
cyf
2025-02-25 01:54:47 +00:00
parent 90e6885779
commit 645ed54877
7 changed files with 594 additions and 408 deletions
+40 -29
View File
@@ -1907,6 +1907,45 @@ namespace Lskj.Control
}
}
}
/// <summary>
/// <para>说明:验证表格列是否有为空的值</para>
/// <para>创建人:龚宇超</para>
/// <para>创建日期:2017-12-08 </para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
public override bool VerifyNull()
{
DataTable table = this.GridControl.DataSourceTable().TrimEmptyRows();
List<GridColumnModel> columns = this.ColumnList.FindAll(x => x.CanNull);
foreach (DataRow item in table.Rows)
{
foreach (GridColumnModel model in columns)
{
BandedGridColumn column = this.bandedGridView.Columns[model.FieldName];
string value = item[model.FieldName] + "";
string displayText = this.bandedGridView.GetDisplayTextByColumnValue(column, item[model.FieldName]);
if (string.IsNullOrWhiteSpace(value) || string.IsNullOrWhiteSpace(displayText))
{
MessageUtil.Show(string.Format(ResourceKeys.NullField, model.FieldText));
this.bandedGridView.Focus();
this.bandedGridView.SelectRowHandler(table.Rows.IndexOf(item));
this.bandedGridView.FocusedColumn = this.bandedGridView.Columns[model.FieldName];
this.bandedGridView.SelectCell(bandedGridView.FocusedRowHandle, this.bandedGridView.Columns[model.FieldName]);
this.bandedGridView.ShowEditorByMouse();
return false;
}
}
}
return true;
}
/// <summary>
/// 冻结
/// </summary>
@@ -2988,32 +3027,4 @@ namespace Lskj.Control
}
}
string tempSql = string.Format(@"insert into {3}(GroupName,GroupAmount,OperAtorId) values('{0}','{1}','{2}');", editValue, groupText, ERPInfo.Instance.UserId, ResourceKeys.SettingGrouprptab);
SqlHelper.ExecuteNonQuery(tempSql);
}
}
}
}
}
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex, Model.ModuleCode);
MessageUtil.Show(Message, ex.Message);
}
}
/// <summary>
/// 点击标题行排序后,默认选中第一行
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void BandedGridView_EndSorting(object sender, EventArgs e)
{
this.bandedGridView.MoveFirst(); // 将焦点行移动到第一行
this.bandedGridView.FocusedRowHandle = 0;// 确保第一行被聚焦
}
}
}
string tempSql = string.Format(@"insert i
+4 -34
View File
@@ -2051,7 +2051,9 @@ namespace Lskj.Control
{
string fieldName = rowItem["fieldName"] + "";
int.TryParse(rowItem["fieldWidth"] + "", out int fieldWidth);
int.TryParse(rowItem["orderid"] + "", out int index);
//int.TryParse(rowItem["orderid"] + "", out int index);
//2025-02-20 依米康把orderid字段类型改成了decimal(18, 2),不能int.TryParse直接转换
int index =Convert.ToInt32(Math.Round(double.Parse(rowItem["orderid"] + "")));
bool visible = "1".Equals(rowItem["isVisible"] + "") && fieldWidth > 0;
bool isFix = "True".Equals(rowItem["IfFixColumn"] + "", StringComparison.OrdinalIgnoreCase);
string FilterInfo = rowItem.Table.Columns.Contains("FilterInfo") ? rowItem["FilterInfo"] + "" : "";//列筛选条件
@@ -7727,36 +7729,4 @@ namespace Lskj.Control
{
int returnIndex = 0;
isContain = false;
DataRow dragEndRow = sourceTab.Rows[dragEndRowIndex];
if (selectRows.Contains(dragEndRow))
{
isContain = true;
dragEndRowIndex = dragEndRowIndex - 1;
if (dragEndRowIndex >= 0)
{
dragEndRow = sourceTab.Rows[dragEndRowIndex];
if (selectRows.Contains(dragEndRow))
{
bool iscontain = false;
returnIndex = GetDragEndRowIndex(sourceTab, dragEndRowIndex, selectRows, out iscontain);
}
else
{
returnIndex = dragEndRowIndex;
}
}
else
{
returnIndex = -1;
}
}
else
{
returnIndex = dragEndRowIndex;
}
return returnIndex;
}
#endregion
}
}
DataRow dragEn
+29 -51
View File
@@ -28,35 +28,18 @@
/// </summary>
private void InitializeComponent()
{
this.scc_container = new DevExpress.XtraEditors.SplitContainerControl();
this.pl_bottom = new DevExpress.XtraEditors.PanelControl();
this.panelControl2 = new DevExpress.XtraEditors.PanelControl();
this.mg_control = new Lskj.Control.ModuleGridEx();
this.tcButtom = new Lskj.Control.TabControlEx();
((System.ComponentModel.ISupportInitialize)(this.scc_container)).BeginInit();
this.scc_container.SuspendLayout();
this.mg_control = new Lskj.Control.ModuleGridEx();
this.scc_container = new DevExpress.XtraEditors.SplitContainerControl();
((System.ComponentModel.ISupportInitialize)(this.pl_bottom)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.panelControl2)).BeginInit();
this.panelControl2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.scc_container)).BeginInit();
this.scc_container.SuspendLayout();
this.SuspendLayout();
//
// scc_container
//
this.scc_container.CollapsePanel = DevExpress.XtraEditors.SplitCollapsePanel.Panel2;
this.scc_container.Dock = System.Windows.Forms.DockStyle.Fill;
this.scc_container.Horizontal = false;
this.scc_container.Location = new System.Drawing.Point(0, 0);
this.scc_container.Name = "scc_container";
this.scc_container.Panel1.AutoScroll = true;
this.scc_container.Panel1.Controls.Add(this.mg_control);
this.scc_container.Panel1.Text = "Panel1";
this.scc_container.Panel2.Controls.Add(this.tcButtom);
this.scc_container.Panel2.Text = "Panel2";
this.scc_container.Size = new System.Drawing.Size(703, 534);
this.scc_container.SplitterPosition = 363;
this.scc_container.TabIndex = 0;
this.scc_container.SplitterMoved += new System.EventHandler(this.OnSplitterMoved);
//
// pl_bottom
//
this.pl_bottom.Appearance.BackColor = System.Drawing.Color.Transparent;
@@ -80,6 +63,14 @@
this.panelControl2.Size = new System.Drawing.Size(703, 534);
this.panelControl2.TabIndex = 2;
//
// tcButtom
//
this.tcButtom.Dock = System.Windows.Forms.DockStyle.Fill;
this.tcButtom.Location = new System.Drawing.Point(0, 0);
this.tcButtom.Name = "tcButtom";
this.tcButtom.Size = new System.Drawing.Size(703, 166);
this.tcButtom.TabIndex = 0;
//
// mg_control
//
this.mg_control.BackColor = System.Drawing.Color.Transparent;
@@ -89,40 +80,27 @@
this.mg_control.OperShortMode = false;
this.mg_control.Size = new System.Drawing.Size(703, 363);
this.mg_control.TabIndex = 0;
this.mg_control.VisibleMrpSearchPanel = false;
this.mg_control.VisibleOperPanel = true;
this.mg_control.VisibleSearchPanel = true;
//
// tcButtom
// scc_container
//
this.tcButtom.Dock = System.Windows.Forms.DockStyle.Fill;
this.tcButtom.Location = new System.Drawing.Point(0, 0);
this.tcButtom.Name = "tcButtom";
this.tcButtom.Size = new System.Drawing.Size(703, 165);
this.tcButtom.TabIndex = 0;
this.scc_container.CollapsePanel = DevExpress.XtraEditors.SplitCollapsePanel.Panel2;
this.scc_container.Dock = System.Windows.Forms.DockStyle.Fill;
this.scc_container.Horizontal = false;
this.scc_container.Location = new System.Drawing.Point(0, 0);
this.scc_container.Name = "scc_container";
this.scc_container.Panel1.AutoScroll = true;
this.scc_container.Panel1.Controls.Add(this.mg_control);
this.scc_container.Panel1.Text = "Panel1";
this.scc_container.Panel2.Controls.Add(this.tcButtom);
this.scc_container.Panel2.Text = "Panel2";
this.scc_container.Size = new System.Drawing.Size(703, 534);
this.scc_container.SplitterPosition = 363;
this.scc_container.TabIndex = 0;
this.scc_container.SplitterMoved += new System.EventHandler(this.OnSplitterMoved);
//
// ModuleGridDetailEx
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.Controls.Add(this.panelControl2);
this.Controls.Add(this.pl_bottom);
this.Name = "ModuleGridDetailEx";
this.Size = new System.Drawing.Size(703, 580);
((System.ComponentModel.ISupportInitialize)(this.scc_container)).EndInit();
this.scc_container.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pl_bottom)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.panelControl2)).EndInit();
this.panelControl2.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private ModuleGridEx mg_control;
private TabControlEx tcButtom;
private DevExpress.XtraEditors.PanelControl pl_bottom;
private DevExpress.XtraEditors.PanelControl panelControl2;
public DevExpress.XtraEditors.SplitContainerControl scc_container;
}
}
+1 -37
View File
@@ -1217,40 +1217,4 @@ namespace Lskj.Control
}
}
}
/// <summary>
/// 判断是否有未保存的数据,并保存
/// </summary>
/// <returns></returns>
public bool VerificationInterface()
{
if (SystemInfo.Instance.EfficientVerification)
{
//页签验证
if (!this.TcButtom.CheckIfSaved())
{
return false;
}
//主表验证
if (this.ModuleGridObj.GridControlObj.IsDataNotSaved())
{
DialogResult dialog = MessageUtil.Show("主表有数据未保存,是否保存", MessageBoxButtons.YesNo);
if (dialog == DialogResult.Yes)
{
bool SaveResults = this.ModuleGridObj.SaveWhenSwitching();
if (!SaveResults) return false;
}
}
}
return true;
}
}
}
+6 -44
View File
@@ -1774,11 +1774,11 @@ namespace Lskj.Control
if (controlRowItem != null && controlRowItem.Table.Columns.Contains(column.FieldName))
{
if (dt.Rows[view.FocusedRowHandle][ERPInfo.Instance.isAddRows] != "1")
{
view.SetRowCellValue(view.FocusedRowHandle, column, controlRowItem[column.FieldName]);
}
//if (dt.Rows[view.FocusedRowHandle][ERPInfo.Instance.isAddRows] != "1")
//{
// view.SetRowCellValue(view.FocusedRowHandle, column, controlRowItem[column.FieldName]);
//}
view.SetRowCellValue(view.FocusedRowHandle, column, controlRowItem[column.FieldName]);
}
}
}
@@ -5063,42 +5063,4 @@ namespace Lskj.Control
int focusedRowHandle = this.gcMain.GridView.FocusedRowHandle;
GridColumn[] Columns = this.gcMain.GridView.GetSelectedCells(focusedRowHandle);//当前选中的单元格
//判断是否为最后一行,最后一列
if (Columns.Length > 0 && Columns[0].VisibleIndex == this.gcMain.GridView.Columns.Count - 1 && focusedRowHandle == this.gcMain.GridView.RowCount - 1)
{
this.AddGridViewRecord();
}
//判断表格是否为空
if (this.gcMain.GridView.RowCount == 0)
{
this.AddGridViewRecord();
}
}
}
}
catch (Exception ex)
{
}
}
#endregion
/// <summary>
/// 切换时保存(作为明细页签被切换时)
/// </summary>
/// <returns></returns>
public bool SaveWhenSwitching()
{
this.SaveResults = false;
if (this.pl_buttom.Visible && this.btnSave.Visible && this.btnSave.Enabled)
{
this.SaveGridRecord(false);
}
return SaveResults;
}
}
}
if (Columns.Length > 0 && Columns[0].VisibleIndex == this.gcMain.GridView.Columns.
+201 -173
View File
@@ -29,98 +29,59 @@ namespace Lskj.Control
/// </summary>
private void InitializeComponent()
{
this.pl_buttom = new DevExpress.XtraEditors.PanelControl();
this.panelControl2 = new DevExpress.XtraEditors.PanelControl();
this.ddb_print = new DevExpress.XtraEditors.DropDownButton();
this.pm_print = new DevExpress.XtraBars.PopupMenu();
this.barManager1 = new DevExpress.XtraBars.BarManager();
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.btnClear = new DevExpress.XtraEditors.SimpleButton();
this.btnCopyNew = new DevExpress.XtraEditors.SimpleButton();
this.btnAttach = new DevExpress.XtraEditors.SimpleButton();
this.btnUpdate = new DevExpress.XtraEditors.SimpleButton();
this.ddb_common = new DevExpress.XtraEditors.DropDownButton();
this.pm_common = new DevExpress.XtraBars.PopupMenu();
this.btnApply = new DevExpress.XtraEditors.SimpleButton();
this.btnAdd = new DevExpress.XtraEditors.SimpleButton();
this.btnClose = new DevExpress.XtraEditors.SimpleButton();
this.simpleButton1 = new DevExpress.XtraEditors.SimpleButton();
this.pm_oper = new DevExpress.XtraBars.PopupMenu();
this.pl_main_top = new DevExpress.XtraEditors.PanelControl();
this.lteOper = new Lskj.Control.LabelTextEdit();
this.lteSpeciesName = new Lskj.Control.LabelTextEdit();
this.lteSpeciesNo = new Lskj.Control.LabelTextEdit();
this.panel1 = new System.Windows.Forms.Panel();
this.scc_container = new DevExpress.XtraEditors.SplitContainerControl();
this.panel_Main = new System.Windows.Forms.Panel();
this.xtraScrollableControl1 = new DevExpress.XtraEditors.XtraScrollableControl();
this.pl_main = new DevExpress.XtraEditors.XtraScrollableControl();
this.panelControl1 = new DevExpress.XtraEditors.PanelControl();
this.BtnMesSave = new DevExpress.XtraEditors.SimpleButton();
this.BtnMesClose = new DevExpress.XtraEditors.SimpleButton();
((System.ComponentModel.ISupportInitialize)(this.pl_buttom)).BeginInit();
this.pl_buttom.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.panelControl2)).BeginInit();
this.panelControl2.SuspendLayout();
this.pl_buttom = new DevExpress.XtraEditors.PanelControl();
this.panelControl2 = new DevExpress.XtraEditors.PanelControl();
this.ddb_print = new DevExpress.XtraEditors.DropDownButton();
this.btnClear = new DevExpress.XtraEditors.SimpleButton();
this.btnCopyNew = new DevExpress.XtraEditors.SimpleButton();
this.btnAttach = new DevExpress.XtraEditors.SimpleButton();
this.btnUpdate = new DevExpress.XtraEditors.SimpleButton();
this.ddb_common = new DevExpress.XtraEditors.DropDownButton();
this.btnApply = new DevExpress.XtraEditors.SimpleButton();
this.btnAdd = new DevExpress.XtraEditors.SimpleButton();
this.btnClose = new DevExpress.XtraEditors.SimpleButton();
this.simpleButton1 = new DevExpress.XtraEditors.SimpleButton();
this.pl_main_top = new DevExpress.XtraEditors.PanelControl();
this.lteOper = new Lskj.Control.LabelTextEdit();
this.lteSpeciesName = new Lskj.Control.LabelTextEdit();
this.lteSpeciesNo = new Lskj.Control.LabelTextEdit();
this.tcButtom = new Lskj.Control.TabControlEx();
((System.ComponentModel.ISupportInitialize)(this.pm_print)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.barManager1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pm_common)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pm_oper)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pl_main_top)).BeginInit();
this.pl_main_top.SuspendLayout();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.scc_container)).BeginInit();
this.scc_container.SuspendLayout();
this.panel_Main.SuspendLayout();
this.xtraScrollableControl1.SuspendLayout();
this.pl_main.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.panelControl1)).BeginInit();
this.panelControl1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pl_buttom)).BeginInit();
this.pl_buttom.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.panelControl2)).BeginInit();
this.panelControl2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pl_main_top)).BeginInit();
this.pl_main_top.SuspendLayout();
this.SuspendLayout();
//
// pl_buttom
//
this.pl_buttom.Appearance.BackColor = System.Drawing.Color.Transparent;
this.pl_buttom.Appearance.Options.UseBackColor = true;
this.pl_buttom.Controls.Add(this.panelControl2);
this.pl_buttom.Controls.Add(this.simpleButton1);
this.pl_buttom.Dock = System.Windows.Forms.DockStyle.Bottom;
this.pl_buttom.Location = new System.Drawing.Point(0, 515);
this.pl_buttom.Name = "pl_buttom";
this.pl_buttom.Padding = new System.Windows.Forms.Padding(5);
this.pl_buttom.Size = new System.Drawing.Size(910, 42);
this.pl_buttom.TabIndex = 0;
//
// panelControl2
//
this.panelControl2.Appearance.BackColor = System.Drawing.Color.Transparent;
this.panelControl2.Appearance.Options.UseBackColor = true;
this.panelControl2.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
this.panelControl2.Controls.Add(this.ddb_print);
this.panelControl2.Controls.Add(this.btnClear);
this.panelControl2.Controls.Add(this.btnCopyNew);
this.panelControl2.Controls.Add(this.btnAttach);
this.panelControl2.Controls.Add(this.btnUpdate);
this.panelControl2.Controls.Add(this.ddb_common);
this.panelControl2.Controls.Add(this.btnApply);
this.panelControl2.Controls.Add(this.btnAdd);
this.panelControl2.Controls.Add(this.btnClose);
this.panelControl2.Dock = System.Windows.Forms.DockStyle.Right;
this.panelControl2.Location = new System.Drawing.Point(81, 7);
this.panelControl2.Name = "panelControl2";
this.panelControl2.Padding = new System.Windows.Forms.Padding(5);
this.panelControl2.Size = new System.Drawing.Size(822, 28);
this.panelControl2.TabIndex = 19;
//
// ddb_print
//
this.ddb_print.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.ddb_print.Appearance.Options.UseFont = true;
this.ddb_print.DropDownArrowStyle = DevExpress.XtraEditors.DropDownArrowStyle.Hide;
this.ddb_print.DropDownControl = this.pm_print;
this.ddb_print.Location = new System.Drawing.Point(571, 0);
this.ddb_print.Name = "ddb_print";
this.ddb_print.Size = new System.Drawing.Size(80, 28);
this.ddb_print.TabIndex = 7;
this.ddb_print.Text = "常用打印";
this.ddb_print.Visible = false;
//
// pm_print
//
this.pm_print.Manager = this.barManager1;
@@ -163,6 +124,156 @@ namespace Lskj.Control
this.barDockControlRight.Location = new System.Drawing.Point(910, 0);
this.barDockControlRight.Size = new System.Drawing.Size(0, 557);
//
// pm_common
//
this.pm_common.Manager = this.barManager1;
this.pm_common.Name = "pm_common";
//
// pm_oper
//
this.pm_oper.Manager = this.barManager1;
this.pm_oper.Name = "pm_oper";
//
// panel1
//
this.panel1.Controls.Add(this.scc_container);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(910, 557);
this.panel1.TabIndex = 18;
//
// scc_container
//
this.scc_container.CollapsePanel = DevExpress.XtraEditors.SplitCollapsePanel.Panel2;
this.scc_container.Dock = System.Windows.Forms.DockStyle.Fill;
this.scc_container.Horizontal = false;
this.scc_container.Location = new System.Drawing.Point(0, 0);
this.scc_container.Name = "scc_container";
this.scc_container.Panel1.AutoScroll = true;
this.scc_container.Panel1.Controls.Add(this.panel_Main);
this.scc_container.Panel1.Text = "Panel1";
this.scc_container.Panel2.Controls.Add(this.tcButtom);
this.scc_container.Panel2.Text = "Panel2";
this.scc_container.Size = new System.Drawing.Size(910, 557);
this.scc_container.SplitterPosition = 546;
this.scc_container.TabIndex = 18;
//
// panel_Main
//
this.panel_Main.Controls.Add(this.xtraScrollableControl1);
this.panel_Main.Controls.Add(this.pl_buttom);
this.panel_Main.Controls.Add(this.pl_main_top);
this.panel_Main.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel_Main.Location = new System.Drawing.Point(0, 0);
this.panel_Main.Name = "panel_Main";
this.panel_Main.Size = new System.Drawing.Size(910, 546);
this.panel_Main.TabIndex = 17;
//
// xtraScrollableControl1
//
this.xtraScrollableControl1.AutoScroll = false;
this.xtraScrollableControl1.Controls.Add(this.pl_main);
this.xtraScrollableControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.xtraScrollableControl1.Location = new System.Drawing.Point(0, 37);
this.xtraScrollableControl1.Name = "xtraScrollableControl1";
this.xtraScrollableControl1.Size = new System.Drawing.Size(910, 467);
this.xtraScrollableControl1.TabIndex = 16;
//
// pl_main
//
this.pl_main.Controls.Add(this.panelControl1);
this.pl_main.Dock = System.Windows.Forms.DockStyle.Fill;
this.pl_main.Location = new System.Drawing.Point(0, 0);
this.pl_main.Name = "pl_main";
this.pl_main.Size = new System.Drawing.Size(910, 467);
this.pl_main.TabIndex = 0;
//
// panelControl1
//
this.panelControl1.Appearance.BackColor = System.Drawing.Color.Transparent;
this.panelControl1.Appearance.Options.UseBackColor = true;
this.panelControl1.Controls.Add(this.BtnMesSave);
this.panelControl1.Controls.Add(this.BtnMesClose);
this.panelControl1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panelControl1.Location = new System.Drawing.Point(0, 404);
this.panelControl1.Name = "panelControl1";
this.panelControl1.Padding = new System.Windows.Forms.Padding(5);
this.panelControl1.Size = new System.Drawing.Size(910, 63);
this.panelControl1.TabIndex = 1;
this.panelControl1.Visible = false;
//
// BtnMesSave
//
this.BtnMesSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.BtnMesSave.Appearance.Font = new System.Drawing.Font("微软雅黑", 12F);
this.BtnMesSave.Appearance.Options.UseFont = true;
this.BtnMesSave.Location = new System.Drawing.Point(697, 8);
this.BtnMesSave.Name = "BtnMesSave";
this.BtnMesSave.Size = new System.Drawing.Size(99, 49);
this.BtnMesSave.TabIndex = 18;
this.BtnMesSave.TabStop = false;
this.BtnMesSave.Text = "保 存";
//
// BtnMesClose
//
this.BtnMesClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.BtnMesClose.Appearance.Font = new System.Drawing.Font("微软雅黑", 12F);
this.BtnMesClose.Appearance.Options.UseFont = true;
this.BtnMesClose.Location = new System.Drawing.Point(802, 8);
this.BtnMesClose.Name = "BtnMesClose";
this.BtnMesClose.Size = new System.Drawing.Size(99, 49);
this.BtnMesClose.TabIndex = 17;
this.BtnMesClose.TabStop = false;
this.BtnMesClose.Text = "关 闭";
//
// pl_buttom
//
this.pl_buttom.Appearance.BackColor = System.Drawing.Color.Transparent;
this.pl_buttom.Appearance.Options.UseBackColor = true;
this.pl_buttom.Controls.Add(this.panelControl2);
this.pl_buttom.Controls.Add(this.simpleButton1);
this.pl_buttom.Dock = System.Windows.Forms.DockStyle.Bottom;
this.pl_buttom.Location = new System.Drawing.Point(0, 504);
this.pl_buttom.Name = "pl_buttom";
this.pl_buttom.Padding = new System.Windows.Forms.Padding(5);
this.pl_buttom.Size = new System.Drawing.Size(910, 42);
this.pl_buttom.TabIndex = 5;
//
// panelControl2
//
this.panelControl2.Appearance.BackColor = System.Drawing.Color.Transparent;
this.panelControl2.Appearance.Options.UseBackColor = true;
this.panelControl2.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
this.panelControl2.Controls.Add(this.ddb_print);
this.panelControl2.Controls.Add(this.btnClear);
this.panelControl2.Controls.Add(this.btnCopyNew);
this.panelControl2.Controls.Add(this.btnAttach);
this.panelControl2.Controls.Add(this.btnUpdate);
this.panelControl2.Controls.Add(this.ddb_common);
this.panelControl2.Controls.Add(this.btnApply);
this.panelControl2.Controls.Add(this.btnAdd);
this.panelControl2.Controls.Add(this.btnClose);
this.panelControl2.Dock = System.Windows.Forms.DockStyle.Right;
this.panelControl2.Location = new System.Drawing.Point(81, 7);
this.panelControl2.Name = "panelControl2";
this.panelControl2.Padding = new System.Windows.Forms.Padding(5);
this.panelControl2.Size = new System.Drawing.Size(822, 28);
this.panelControl2.TabIndex = 19;
//
// ddb_print
//
this.ddb_print.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.ddb_print.Appearance.Options.UseFont = true;
this.ddb_print.DropDownArrowStyle = DevExpress.XtraEditors.DropDownArrowStyle.Hide;
this.ddb_print.DropDownControl = this.pm_print;
this.ddb_print.Location = new System.Drawing.Point(571, 0);
this.ddb_print.Name = "ddb_print";
this.ddb_print.Size = new System.Drawing.Size(80, 28);
this.ddb_print.TabIndex = 7;
this.ddb_print.Text = "常用打印";
this.ddb_print.Visible = false;
//
// btnClear
//
this.btnClear.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
@@ -173,7 +284,6 @@ namespace Lskj.Control
this.btnClear.TabIndex = 1;
this.btnClear.TabStop = false;
this.btnClear.Text = "清除页面";
this.btnClear.Click += new System.EventHandler(this.OnBtnClearClick);
//
// btnCopyNew
//
@@ -185,7 +295,6 @@ namespace Lskj.Control
this.btnCopyNew.TabIndex = 2;
this.btnCopyNew.TabStop = false;
this.btnCopyNew.Text = "复制新增";
this.btnCopyNew.Click += new System.EventHandler(this.OnBtnCopyNewClick);
//
// btnAttach
//
@@ -197,7 +306,6 @@ namespace Lskj.Control
this.btnAttach.TabIndex = 6;
this.btnAttach.TabStop = false;
this.btnAttach.Text = "附件管理(&F)";
this.btnAttach.Click += new System.EventHandler(this.OnBtnAttachClick);
//
// btnUpdate
//
@@ -209,7 +317,6 @@ namespace Lskj.Control
this.btnUpdate.TabIndex = 4;
this.btnUpdate.TabStop = false;
this.btnUpdate.Text = "修改保存(&E)";
this.btnUpdate.Click += new System.EventHandler(this.OnUpdateClick);
//
// ddb_common
//
@@ -224,11 +331,6 @@ namespace Lskj.Control
this.ddb_common.Text = "常用工具";
this.ddb_common.Visible = false;
//
// pm_common
//
this.pm_common.Manager = this.barManager1;
this.pm_common.Name = "pm_common";
//
// btnApply
//
this.btnApply.Location = new System.Drawing.Point(407, 0);
@@ -236,7 +338,6 @@ namespace Lskj.Control
this.btnApply.Size = new System.Drawing.Size(80, 28);
this.btnApply.TabIndex = 5;
this.btnApply.Text = "提交审核(&R)";
this.btnApply.Click += new System.EventHandler(this.OnApplyClick);
//
// btnAdd
//
@@ -248,7 +349,6 @@ namespace Lskj.Control
this.btnAdd.TabIndex = 3;
this.btnAdd.TabStop = false;
this.btnAdd.Text = "添加保存(&A)";
this.btnAdd.Click += new System.EventHandler(this.OnAddClick);
//
// btnClose
//
@@ -260,7 +360,6 @@ namespace Lskj.Control
this.btnClose.TabIndex = 10;
this.btnClose.TabStop = false;
this.btnClose.Text = "退出(&C)";
this.btnClose.Click += new System.EventHandler(this.OnCloseClick);
//
// simpleButton1
//
@@ -272,12 +371,6 @@ namespace Lskj.Control
this.simpleButton1.TabIndex = 8;
this.simpleButton1.TabStop = false;
this.simpleButton1.Text = "帮助文档";
this.simpleButton1.Click += new System.EventHandler(this.simpleButton1_Click);
//
// pm_oper
//
this.pm_oper.Manager = this.barManager1;
this.pm_oper.Name = "pm_oper";
//
// pl_main_top
//
@@ -290,7 +383,7 @@ namespace Lskj.Control
this.pl_main_top.Location = new System.Drawing.Point(0, 0);
this.pl_main_top.Name = "pl_main_top";
this.pl_main_top.Size = new System.Drawing.Size(910, 37);
this.pl_main_top.TabIndex = 3;
this.pl_main_top.TabIndex = 4;
//
// lteOper
//
@@ -340,105 +433,49 @@ namespace Lskj.Control
this.lteSpeciesNo.Size = new System.Drawing.Size(164, 21);
this.lteSpeciesNo.TabIndex = 0;
//
// xtraScrollableControl1
// tcButtom
//
this.xtraScrollableControl1.AutoScroll = false;
this.xtraScrollableControl1.Controls.Add(this.pl_main);
this.xtraScrollableControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.xtraScrollableControl1.Location = new System.Drawing.Point(0, 37);
this.xtraScrollableControl1.Name = "xtraScrollableControl1";
this.xtraScrollableControl1.Size = new System.Drawing.Size(910, 478);
this.xtraScrollableControl1.TabIndex = 11;
//
// pl_main
//
this.pl_main.Controls.Add(this.panelControl1);
this.pl_main.Dock = System.Windows.Forms.DockStyle.Fill;
this.pl_main.Location = new System.Drawing.Point(0, 0);
this.pl_main.Name = "pl_main";
this.pl_main.Size = new System.Drawing.Size(910, 478);
this.pl_main.TabIndex = 0;
//
// panelControl1
//
this.panelControl1.Appearance.BackColor = System.Drawing.Color.Transparent;
this.panelControl1.Appearance.Options.UseBackColor = true;
this.panelControl1.Controls.Add(this.BtnMesSave);
this.panelControl1.Controls.Add(this.BtnMesClose);
this.panelControl1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panelControl1.Location = new System.Drawing.Point(0, 415);
this.panelControl1.Name = "panelControl1";
this.panelControl1.Padding = new System.Windows.Forms.Padding(5);
this.panelControl1.Size = new System.Drawing.Size(910, 63);
this.panelControl1.TabIndex = 1;
this.panelControl1.Visible = false;
//
// BtnMesSave
//
this.BtnMesSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.BtnMesSave.Appearance.Font = new System.Drawing.Font("微软雅黑", 12F);
this.BtnMesSave.Appearance.Options.UseFont = true;
this.BtnMesSave.Location = new System.Drawing.Point(697, 8);
this.BtnMesSave.Name = "BtnMesSave";
this.BtnMesSave.Size = new System.Drawing.Size(99, 49);
this.BtnMesSave.TabIndex = 18;
this.BtnMesSave.TabStop = false;
this.BtnMesSave.Text = "保 存";
this.BtnMesSave.Click += new System.EventHandler(this.OnMesSaveClick);
//
// BtnMesClose
//
this.BtnMesClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.BtnMesClose.Appearance.Font = new System.Drawing.Font("微软雅黑", 12F);
this.BtnMesClose.Appearance.Options.UseFont = true;
this.BtnMesClose.Location = new System.Drawing.Point(802, 8);
this.BtnMesClose.Name = "BtnMesClose";
this.BtnMesClose.Size = new System.Drawing.Size(99, 49);
this.BtnMesClose.TabIndex = 17;
this.BtnMesClose.TabStop = false;
this.BtnMesClose.Text = "关 闭";
this.BtnMesClose.Click += new System.EventHandler(this.OnBtnMesCloseClick);
this.tcButtom.Dock = System.Windows.Forms.DockStyle.Fill;
this.tcButtom.Location = new System.Drawing.Point(0, 0);
this.tcButtom.Name = "tcButtom";
this.tcButtom.Size = new System.Drawing.Size(910, 6);
this.tcButtom.TabIndex = 0;
//
// ModulePanelEx
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.Transparent;
this.Controls.Add(this.xtraScrollableControl1);
this.Controls.Add(this.pl_main_top);
this.Controls.Add(this.pl_buttom);
this.Controls.Add(this.panel1);
this.Controls.Add(this.barDockControlLeft);
this.Controls.Add(this.barDockControlRight);
this.Controls.Add(this.barDockControlBottom);
this.Controls.Add(this.barDockControlTop);
this.Name = "ModulePanelEx";
this.Size = new System.Drawing.Size(910, 557);
((System.ComponentModel.ISupportInitialize)(this.pl_buttom)).EndInit();
this.pl_buttom.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.panelControl2)).EndInit();
this.panelControl2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pm_print)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.barManager1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pm_common)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pm_oper)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pl_main_top)).EndInit();
this.pl_main_top.ResumeLayout(false);
this.panel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.scc_container)).EndInit();
this.scc_container.ResumeLayout(false);
this.panel_Main.ResumeLayout(false);
this.xtraScrollableControl1.ResumeLayout(false);
this.pl_main.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.panelControl1)).EndInit();
this.panelControl1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pl_buttom)).EndInit();
this.pl_buttom.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.panelControl2)).EndInit();
this.panelControl2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pl_main_top)).EndInit();
this.pl_main_top.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private DevExpress.XtraEditors.PanelControl pl_buttom;
private DevExpress.XtraEditors.SimpleButton btnAdd;
private DevExpress.XtraEditors.SimpleButton btnUpdate;
private DevExpress.XtraEditors.SimpleButton btnApply;
private DevExpress.XtraEditors.SimpleButton btnClose;
private DevExpress.XtraEditors.DropDownButton ddb_print;
private DevExpress.XtraBars.PopupMenu pm_oper;
private DevExpress.XtraBars.BarManager barManager1;
private DevExpress.XtraBars.BarDockControl barDockControlTop;
@@ -446,21 +483,12 @@ namespace Lskj.Control
private DevExpress.XtraBars.BarDockControl barDockControlLeft;
private DevExpress.XtraBars.BarDockControl barDockControlRight;
private DevExpress.XtraBars.PopupMenu pm_print;
private DevExpress.XtraEditors.PanelControl pl_main_top;
private Control.LabelTextEdit lteOper;
private Control.LabelTextEdit lteSpeciesName;
private Control.LabelTextEdit lteSpeciesNo;
private DevExpress.XtraEditors.DropDownButton ddb_common;
private DevExpress.XtraBars.PopupMenu pm_common;
private System.Windows.Forms.Panel panel1;
public DevExpress.XtraEditors.SplitContainerControl scc_container;
private System.Windows.Forms.Panel panel_Main;
private DevExpress.XtraEditors.XtraScrollableControl xtraScrollableControl1;
private DevExpress.XtraEditors.XtraScrollableControl pl_main;
private DevExpress.XtraEditors.PanelControl panelControl1;
private DevExpress.XtraEditors.SimpleButton BtnMesSave;
private DevExpress.XtraEditors.SimpleButton BtnMesClose;
private DevExpress.XtraEditors.SimpleButton btnAttach;
private DevExpress.XtraEditors.SimpleButton btnClear;
private DevExpress.XtraEditors.SimpleButton btnCopyNew;
private DevExpress.XtraEditors.SimpleButton simpleButton1;
private DevExpress.XtraEditors.PanelControl panelControl2;
}
}
+313 -40
View File
@@ -90,6 +90,18 @@ namespace Lskj.Control
#region public property
/// <summary>
/// 底部操作控件面板
/// </summary>
public TabControlEx TcButtom { get { return tcButtom; } }
/// <summary>
/// 底部操作控件面板
/// </summary>
public SplitContainerControl SplitContainerControl { get { return scc_container; } }
/// <summary>
/// 下方显示的明细数据
/// </summary>
public DataRow[] DetailsData;
/// <summary>
/// 是否是新增保存
/// </summary>
public bool SavaState;
@@ -215,6 +227,17 @@ namespace Lskj.Control
{
SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw | ControlStyles.Selectable | ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.SupportsTransparentBackColor, true);
InitializeComponent();
this.scc_container.PanelVisibility = SplitPanelVisibility.Panel1;
this.simpleButton1.Click += simpleButton1_Click;
this.btnClear.Click += OnBtnClearClick;
this.btnCopyNew.Click += OnBtnCopyNewClick;
this.btnAdd.Click += OnAddClick;
this.btnUpdate.Click += OnUpdateClick;
this.btnApply.Click += OnApplyClick;
this.btnAttach.Click += OnBtnAttachClick;
this.btnClose.Click += OnCloseClick;
this.BtnMesSave.Click += OnMesSaveClick;
this.BtnMesClose.Click += OnBtnMesCloseClick;
}
#region private method
@@ -739,6 +762,14 @@ namespace Lskj.Control
}
// 重排按钮位置
this.SetControlLocation();
//设置下方页签
if (DetailsData != null && DetailsData.Length > 0)
{
this.CreateTabDetail();
this.tcButtom.TabControlObj.SelectedPageChanged += this.OnSelectedPageChanged;
//this.tcButtom.TabControlObj.SelectedPageChanging += this.OnSelectedPageChanging;
this.scc_container.PanelVisibility = SplitPanelVisibility.Both;
}
}
}
catch (Exception ex)
@@ -750,6 +781,282 @@ namespace Lskj.Control
}
/// <summary>
/// <para>说明:切换标签刷新主键值</para>
/// <para>创建人:龚宇超</para>
/// <para>创建日期:2018-04-09 </para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="TabPageChangedEventArgs"/> instance containing the event data.</param>
private void OnSelectedPageChanged(object sender, TabPageChangedEventArgs e)
{
try
{
XtraTabPage tabPage = null;
if (e == null)
{
tabPage = this.tcButtom.TabControlObj.SelectedTabPage;
}
else
{
tabPage=e.Page;
}
OperatePanelControlObj.Visible = true;
if (tabPage.Tag is ModuleGridEx) OperatePanelControlObj.Visible = false;
if (!(tabPage.Tag is GridDetailModel)) return;
OperatePanelControlObj.Visible = false;
if (tabPage.Controls.Count == 0)
{
GridDetailModel detailModel = tabPage.Tag as GridDetailModel;
ModuleModel moduleModel = null;
DynamicAddModel addModel = new DynamicAddModel(new string[] {
detailModel.DetailName,
ERPInfo.Instance.UserId,
ERPInfo.Instance.UserName,
"1",detailModel.UnionModule,"","",""
});
if (string.IsNullOrEmpty(detailModel.UnionModule))
{
PanelControl plBottom = new PanelControl();
plBottom.Dock = DockStyle.Bottom;
plBottom.Visible = false;
PanelControl plMain = new PanelControl();
plMain.Dock = DockStyle.Fill;
GridControlEx gridEx = detailModel.AutoMultiHeader == 1 ? new BandedGridControlEx() : new GridControlEx();
gridEx.Dock = DockStyle.Fill;
gridEx.Tag = detailModel;
gridEx.Parent = plMain;
gridEx.Model = this.Model;
gridEx.SetReadOnlyColumns(detailModel.GridColumns, detailModel.GridCustomColumnKey);
gridEx.SetGridRightMenus(BaseModuleImpl.GetBaseGridRightMenus(detailModel.FormKey), this.Model);
gridEx.SetGridRowColors(BaseModuleImpl.GetBaseGridRowColors(detailModel.FormKey));
if (detailModel.IsCheck == 1)//加载复选框
{
GridDragGrid.GridAddCheckBox(gridEx.GridView);
}
// 加载配置查询条件
if (Model != null && Model.IsDetailSearch)
{
plBottom.Visible = true;
MyControl searchObj = new MyControl(detailModel.DetailSql, gridEx);
plBottom.Height = searchObj.InitSearchControl(BaseModuleImpl.GetCustomQueryFields(detailModel.FormKey), plBottom);
}
tabPage.Tag = gridEx;
tabPage.Controls.AddRange(new PanelControl[] { plBottom, plMain });
if (detailModel.AutoRefresh)
{
if (!string.IsNullOrWhiteSpace(this.ParentKey))
{
string codeSql = "select";
codeSql += string.Format(" '{0}' as {1}", this.PrimaryValue, this.PrimaryKey);
gridEx.SetGridViewDataSource(SqlHelper.ExecuteDataTable(ReplaceHelper.ReplaceRowParam(BaseImpl.GetDataRowResult(codeSql), ReplaceHelper.ReplaceWhereCond(detailModel.DetailSql))));
}
// 自动刷新
}
}
else
{
moduleModel = new ModuleModel(MainImpl.GetSystemdllTab(detailModel.UnionModule));
ModuleGridEx moduleGrid = new ModuleGridEx();
moduleGrid.IsDetail = true;
moduleGrid.Dock = DockStyle.Fill;
moduleGrid.Tag = detailModel;
moduleGrid.ParentKeyField = string.IsNullOrEmpty(detailModel.UnionParentField) ? SysModel.ParmaryKey : detailModel.UnionParentField;
//直接在控件数据源中取值,控件可能是禁显状态(没用控件获取不到值)
if (!string.IsNullOrWhiteSpace(moduleGrid.ParentKeyField) && this.ControlObj.CurrentData.Table.Columns.Contains(moduleGrid.ParentKeyField))
{
moduleGrid.ParentKeyValue = moduleGrid.UnionValue = this.ControlObj.CurrentData[moduleGrid.ParentKeyField] + "";
}
//moduleGrid.ParentKeyValue = this.ModuleAddControl.ControlObj.GetControlValue(moduleGrid.ParentKeyField);
moduleGrid.DetailKeyField = detailModel.UnionValue;
moduleGrid.UnionKey = detailModel.UnionValue;
//moduleGrid.UnionValue = this.ModuleAddControl.ControlObj.GetControlValue(moduleGrid.ParentKeyField); //Model.ObjectId;
//moduleGrid.SearchControlSql = Model.ControlSql;
moduleGrid.InitializeControl(moduleModel, addModel);
moduleGrid.SearchObj.OnSearchBeforeCallBack += new SearchEventHandler(OnSearchBefore);
moduleGrid.SearchObj.OnSearchAfterCallBack += new EventHandler(OnSearchAfter);
Lskj.Control.Model.AutoSizeChange.ControllInitializeSize(moduleGrid);
tabPage.Controls.Add(moduleGrid);
tabPage.Tag = moduleGrid;
if (detailModel.AutoRefresh)
{
moduleGrid.SearchObj.OnDataSourceBindCallBack += new EventHandler(OnMainSearchDataSourceBindCallBack);
}
}
}
}
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex);
MessageUtil.Show(Message, ex.Message);
}
}
/// <summary>
/// <para>说明:查询条件绑定完成查询数据</para>
/// <para>创建人:龚宇超</para>
/// <para>创建日期: </para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
/// <param name="sender">The sender.</param>
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
protected void OnMainSearchDataSourceBindCallBack(object sender, EventArgs e)
{
try
{
MyControl searchobj = sender as MyControl;
searchobj.SearchGrid();
OnSearchAfter(null, null);
}
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex);
MessageUtil.Show(Message, ex.Message);
}
}
/// <summary>
/// <para>说明:查询条件执行前</para>
/// <para>创建人:龚宇超</para>
/// <para>创建日期:2017-11-10 </para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
/// <param name="sender">The sender.</param>
/// <param name="e">The e.</param>
protected void OnSearchBefore(object sender, SearchArgs e)
{
try
{
XtraTabPage tabPage = this.tcButtom.TabControlObj.SelectedTabPage;
if (plMainControlObj.Tag is XtraTabControl)
{
XtraTabControl xtr = plMainControlObj.Tag as XtraTabControl;
tabPage = xtr.SelectedTabPage;
}
if (tabPage != null)
{
ModuleGridEx moduleGrid = tabPage.Tag as ModuleGridEx;
GridDetailModel detailModel = moduleGrid.Tag as GridDetailModel;
moduleGrid.SearchObj.SearchGrid(detailModel.DetailSql + string.Format(" and {0}='{1}'", moduleGrid.DetailKeyField, moduleGrid.UnionValue));
}
e.Continue = false;
}
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex);
MessageUtil.Show(Message, ex.Message);
}
}
/// <summary>
/// <para>说明:查询条件执行后</para>
/// <para>创建人:龚宇超</para>
/// <para>创建日期:2017-11-10 </para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </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 OnSearchAfter(object sender, EventArgs e)
{
try
{
XtraTabPage tabPage = this.tcButtom.TabControlObj.SelectedTabPage;
if (plMainControlObj.Tag is XtraTabControl)
{
XtraTabControl xtr = plMainControlObj.Tag as XtraTabControl;
tabPage = xtr.SelectedTabPage;
}
if (tabPage != null)
{
if (tabPage.Tag is ModuleGridEx)
{
ModuleGridEx moduleGrid = tabPage.Tag as ModuleGridEx;
GridDetailModel detailModel = moduleGrid.Tag as GridDetailModel;
tabPage.Text = detailModel.DetailName + "(" + moduleGrid.SearchObj.GridRowCount + "条)";
}
else if (tabPage.Tag is GridControlEx)
{
GridControlEx moduleGrid = tabPage.Tag as GridControlEx;
GridDetailModel detailModel = moduleGrid.Tag as GridDetailModel;
tabPage.Text = detailModel.DetailName + "(" + moduleGrid.DataRowCount() + "条)";
}
}
}
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex);
MessageUtil.Show(Message, ex.Message);
}
}
/// <summary>
/// <para>说明:初始化多标签</para>
/// <para>创建人:龚宇超</para>
/// <para>创建日期:2017-11-10 </para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
private void CreateTabDetail()
{
bool isInside = false;
foreach (DataRow item in this.DetailsData)
{
XtraTabPage tabPage = new XtraTabPage();
GridDetailModel detailModel = new GridDetailModel(item, null, GridCustomColumnStruct.BaseDetailGridView);
if (!string.IsNullOrEmpty(detailModel.UnionModule))
{
ModuleModel moduleModel = new ModuleModel(MainImpl.GetSystemdllTab(detailModel.UnionModule));
if (string.IsNullOrWhiteSpace(moduleModel.FormKey))
{
MessageUtil.Show(detailModel.DetailName + "模块配置错误");
return;
}
detailModel.DetailSql = moduleModel.MenuSql;
}
detailModel.GridColumns = ReportImpl.GetReportDetailColumns(Model.ModuleCode, item["id"] + "");
tabPage.Text = detailModel.DetailName;
tabPage.Tag = detailModel;
this.tcButtom.TabControlObj.TabPages.Add(tabPage);
}
}
/// <summary>
/// 获取数据源缓存
/// </summary>
@@ -843,6 +1150,11 @@ namespace Lskj.Control
try
{
this.SetUpdateData();
if (this.scc_container.PanelVisibility == SplitPanelVisibility.Both)
{
this.tcButtom.TabControlObj.SelectedTabPageIndex = 0;
this.OnSelectedPageChanged(null,null);
}
}
catch (Exception ex)
{
@@ -2107,43 +2419,4 @@ namespace Lskj.Control
if (this.OnCopyRecordCallBack != null)
{
this.OnCopyRecordCallBack(sender, e);
}
}
}
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex);
MessageUtil.Show(Message, ex.Message);
}
}
#endregion
private void simpleButton1_Click(object sender, EventArgs e)
{
try
{
WebBrowserUtil.StartWebBrowser(this.Model.ModuleCode, this.SysModel.MenuText);
}
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex);
MessageUtil.Show(Message, ex.Message);
}
}
protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
cp.ExStyle |= 0x02000000;
return cp;
}
}
}
}