SVN r781
SVN-Revision: r781
This commit is contained in:
+7
-6
@@ -28,6 +28,7 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.ssc_main = new DevExpress.XtraEditors.SplitContainerControl();
|
||||
this.ssc_main_top = new DevExpress.XtraEditors.SplitContainerControl();
|
||||
this.pl_main = new DevExpress.XtraEditors.PanelControl();
|
||||
@@ -40,7 +41,7 @@
|
||||
this.pl_treeview_detault_search = new DevExpress.XtraEditors.PanelControl();
|
||||
this.panelControl4 = new DevExpress.XtraEditors.PanelControl();
|
||||
this.textEdit1 = new DevExpress.XtraEditors.TextEdit();
|
||||
this.barManager1 = new DevExpress.XtraBars.BarManager();
|
||||
this.barManager1 = new DevExpress.XtraBars.BarManager(this.components);
|
||||
this.barDockControl1 = new DevExpress.XtraBars.BarDockControl();
|
||||
this.barDockControl2 = new DevExpress.XtraBars.BarDockControl();
|
||||
this.barDockControl3 = new DevExpress.XtraBars.BarDockControl();
|
||||
@@ -73,11 +74,11 @@
|
||||
this.rdRed = new System.Windows.Forms.RadioButton();
|
||||
this.pl_blue = new DevExpress.XtraEditors.PanelControl();
|
||||
this.rdBlue = new System.Windows.Forms.RadioButton();
|
||||
this.pMprint = new DevExpress.XtraBars.PopupMenu();
|
||||
this.pmFP = new DevExpress.XtraBars.PopupMenu();
|
||||
this.pmBillExp = new DevExpress.XtraBars.PopupMenu();
|
||||
this.pmBill = new DevExpress.XtraBars.PopupMenu();
|
||||
this.pMenu = new DevExpress.XtraBars.PopupMenu();
|
||||
this.pMprint = new DevExpress.XtraBars.PopupMenu(this.components);
|
||||
this.pmFP = new DevExpress.XtraBars.PopupMenu(this.components);
|
||||
this.pmBillExp = new DevExpress.XtraBars.PopupMenu(this.components);
|
||||
this.pmBill = new DevExpress.XtraBars.PopupMenu(this.components);
|
||||
this.pMenu = new DevExpress.XtraBars.PopupMenu(this.components);
|
||||
this.backgroundWorker1 = new System.ComponentModel.BackgroundWorker();
|
||||
this.backgroundWorker2 = new System.ComponentModel.BackgroundWorker();
|
||||
((System.ComponentModel.ISupportInitialize)(this.ssc_main)).BeginInit();
|
||||
|
||||
+6584
-6516
File diff suppressed because it is too large
Load Diff
+55
@@ -0,0 +1,55 @@
|
||||
|
||||
namespace Lskj.PubBillSpecial
|
||||
{
|
||||
partial class FrmAdd
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.txtEdit = new DevExpress.XtraEditors.TextEdit();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
((System.ComponentModel.ISupportInitialize)(this.txtEdit.Properties)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// txtEdit
|
||||
//
|
||||
this.txtEdit.EditValue = "1";
|
||||
this.txtEdit.Location = new System.Drawing.Point(12, 39);
|
||||
this.txtEdit.Name = "txtEdit";
|
||||
this.txtEdit.Properties.Appearance.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
this.txtEdit.Properties.Appearance.Options.UseFont = true;
|
||||
this.txtEdit.Size = new System.Drawing.Size(198, 28);
|
||||
this.txtEdit.TabIndex = 25;
|
||||
this.txtEdit.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtEdit_KeyDown);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(10, 14);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(77, 12);
|
||||
this.label1.TabIndex = 22;
|
||||
this.label1.Text = "请输入
|
||||
@@ -0,0 +1,77 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using Lskj.Control;
|
||||
using Lskj.Business;
|
||||
using Lskj.Business.Impl;
|
||||
|
||||
namespace Lskj.PubBillSpecial
|
||||
{
|
||||
public partial class FrmAdd : BaseForm
|
||||
{
|
||||
public int Quantity;
|
||||
public Label LabelObj { get { return label1; } }
|
||||
|
||||
public FrmAdd()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>说明:确定事件</para>
|
||||
/// <para>创建人:龚宇超</para>
|
||||
/// <para>创建日期:2019-06-21 </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>
|
||||
void OnBtnOKClick(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
string text=this.txtEdit.Text;
|
||||
if (string.IsNullOrWhiteSpace(text)) text = "0";
|
||||
if (!this.IsDigitsOnly(text))
|
||||
{
|
||||
MessageUtil.Show("请输入数字");
|
||||
}
|
||||
|
||||
this.Quantity = int.Parse(text);
|
||||
this.Close();
|
||||
this.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogUtil.WriteError("确定事件出错!", ex);
|
||||
string Message = ErrorMessage.PromptErrorMessage(ex);
|
||||
MessageUtil.Show(Message, ex.Message);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:取消事件</para>
|
||||
/// <para>创建人:龚宇超</para>
|
||||
/// <para>创建日期:2019-06-21 </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>
|
||||
void OnBtnCancelClick(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
|
||||
bool Is
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
+177
@@ -0,0 +1,177 @@
|
||||
|
||||
namespace Lskj.PubBillSpecial
|
||||
{
|
||||
partial class FrmSource
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.scc_container = new DevExpress.XtraEditors.SplitContainerControl();
|
||||
this.gcMain = new Lskj.Control.GridControlEx();
|
||||
this.plm_bottom = new DevExpress.XtraEditors.PanelControl();
|
||||
this.simpleButton1 = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.plm_top = new DevExpress.XtraEditors.PanelControl();
|
||||
this.plm_top_btnFixSearch = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.labelControl3 = new DevExpress.XtraEditors.LabelControl();
|
||||
this.plm_top_cbField = new System.Windows.Forms.ComboBox();
|
||||
this.plm_top_txtFixKey = new System.Windows.Forms.TextBox();
|
||||
this.tcButtom = new Lskj.Control.TabControlEx();
|
||||
((System.ComponentModel.ISupportInitialize)(this.scc_container)).BeginInit();
|
||||
this.scc_container.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.plm_bottom)).BeginInit();
|
||||
this.plm_bottom.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.plm_top)).BeginInit();
|
||||
this.plm_top.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.gcMain);
|
||||
this.scc_container.Panel1.Controls.Add(this.plm_bottom);
|
||||
this.scc_container.Panel1.Controls.Add(this.plm_top);
|
||||
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(1103, 592);
|
||||
this.scc_container.SplitterPosition = 363;
|
||||
this.scc_container.TabIndex = 1;
|
||||
//
|
||||
// gcMain
|
||||
//
|
||||
this.gcMain.AdapterObj = null;
|
||||
this.gcMain.BackColor = System.Drawing.Color.Transparent;
|
||||
this.gcMain.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.gcMain.Location = new System.Drawing.Point(0, 40);
|
||||
this.gcMain.Margin = new System.Windows.Forms.Padding(5);
|
||||
this.gcMain.Name = "gcMain";
|
||||
this.gcMain.SiftEnumObj = Lskj.Control.GridControlEx.HeaderSiftEnum.Sum;
|
||||
this.gcMain.Size = new System.Drawing.Size(1103, 283);
|
||||
this.gcMain.TabIndex = 18;
|
||||
//
|
||||
// plm_bottom
|
||||
//
|
||||
this.plm_bottom.Controls.Add(this.simpleButton1);
|
||||
this.plm_bottom.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.plm_bottom.Location = new System.Drawing.Point(0, 323);
|
||||
this.plm_bottom.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.plm_bottom.Name = "plm_bottom";
|
||||
this.plm_bottom.Size = new System.Drawing.Size(1103, 40);
|
||||
this.plm_bottom.TabIndex = 17;
|
||||
//
|
||||
// simpleButton1
|
||||
//
|
||||
this.simpleButton1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.simpleButton1.Appearance.Font = new System.Drawing.Font("宋体", 9F);
|
||||
this.simpleButton1.Appearance.Options.UseFont = true;
|
||||
this.simpleButton1.Location = new System.Drawing.Point(999, 6);
|
||||
this.simpleButton1.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.simpleButton1.Name = "simpleButton1";
|
||||
this.simpleButton1.Size = new System.Drawing.Size(90, 30);
|
||||
this.simpleButton1.TabIndex = 41;
|
||||
this.simpleButton1.Text = "继续制单";
|
||||
this.simpleButton1.Click += new System.EventHandler(this.simpleButton1_Click);
|
||||
//
|
||||
// plm_top
|
||||
//
|
||||
this.plm_top.Controls.Add(this.plm_top_btnFixSearch);
|
||||
this.plm_top.Controls.Add(this.labelControl3);
|
||||
this.plm_top.Controls.Add(this.plm_top_cbField);
|
||||
this.plm_top.Controls.Add(this.plm_top_txtFixKey);
|
||||
this.plm_top.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.plm_top.Location = new System.Drawing.Point(0, 0);
|
||||
this.plm_top.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.plm_top.Name = "plm_top";
|
||||
this.plm_top.Size = new System.Drawing.Size(1103, 40);
|
||||
this.plm_top.TabIndex = 15;
|
||||
//
|
||||
// plm_top_btnFixSearch
|
||||
//
|
||||
this.plm_top_btnFixSearch.Appearance.Font = new System.Drawing.Font("宋体", 9F);
|
||||
this.plm_top_btnFixSearch.Appearance.Options.UseFont = true;
|
||||
this.plm_top_btnFixSearch.Location = new System.Drawing.Point(356, 6);
|
||||
this.plm_top_btnFixSearch.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.plm_top_btnFixSearch.Name = "plm_top_btnFixSearch";
|
||||
this.plm_top_btnFixSearch.Size = new System.Drawing.Size(72, 26);
|
||||
this.plm_top_btnFixSearch.TabIndex = 40;
|
||||
this.plm_top_btnFixSearch.Text = "查询(&Q)";
|
||||
//
|
||||
// labelControl3
|
||||
//
|
||||
this.labelControl3.Appearance.Font = new System.Drawing.Font("宋体", 9F);
|
||||
this.labelControl3.Location = new System.Drawing.Point(3, 11);
|
||||
this.labelControl3.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.labelControl3.Name = "labelControl3";
|
||||
this.labelControl3.Size = new System.Drawing.Size(24, 12);
|
||||
this.labelControl3.TabIndex = 39;
|
||||
this.labelControl3.Text = "查询";
|
||||
//
|
||||
// plm_top_cbField
|
||||
//
|
||||
this.plm_top_cbField.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.plm_top_cbField.FormattingEnabled = true;
|
||||
this.plm_top_cbField.Location = new System.Drawing.Point(40, 5);
|
||||
this.plm_top_cbField.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.plm_top_cbField.Name = "plm_top_cbField";
|
||||
this.plm_top_cbField.Size = new System.Drawing.Size(121, 22);
|
||||
this.plm_top_cbField.TabIndex = 37;
|
||||
this.plm_top_cbField.Tag = "";
|
||||
//
|
||||
// plm_top_txtFixKey
|
||||
//
|
||||
this.plm_top_txtFixKey.Location = new System.Drawing.Point(171, 5);
|
||||
this.plm_top_txtFixKey.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.plm_top_txtFixKey.Name = "plm_top_txtFixKey";
|
||||
this.plm_top_txtFixKey.Size = new System.Drawing.Size(176, 22);
|
||||
this.plm_top_txtFixKey.TabIndex = 38;
|
||||
//
|
||||
// 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(1103, 224);
|
||||
this.tcButtom.TabIndex = 0;
|
||||
//
|
||||
// FrmSource
|
||||
//
|
||||
this.Appearance.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.Appearance.Options.UseBackColor = true;
|
||||
this.Appearance.Options.UseFont = true;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1103, 592);
|
||||
this.Controls.Add(this.scc_container);
|
||||
this.Name = "FrmSource";
|
||||
this.Text = "FrmSource";
|
||||
((System.ComponentModel.ISupportInitialize)(this.scc_container)).EndInit();
|
||||
this.scc_container.ResumeLayout(false);
|
||||
|
||||
@@ -0,0 +1,701 @@
|
||||
using DevExpress.Utils;
|
||||
using DevExpress.XtraEditors;
|
||||
using DevExpress.XtraGrid.Views.Grid;
|
||||
using DevExpress.XtraTab;
|
||||
using Lskj.Business;
|
||||
using Lskj.Business.Impl;
|
||||
using Lskj.Control;
|
||||
using Lskj.Control.Model;
|
||||
using Lskj.Model;
|
||||
using Lskj.Util;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Lskj.PubBillSpecial
|
||||
{
|
||||
public partial class FrmSource : BaseForm
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 系统模块实体对象
|
||||
/// </summary>
|
||||
/// <value>The system model.</value>
|
||||
public ModuleModel SysModel { get; private set; }
|
||||
/// <summary>
|
||||
/// 底部表格数据
|
||||
/// </summary>
|
||||
public List<GridDetailModel> Details;
|
||||
/// <summary>
|
||||
///主表条件控件
|
||||
/// </summary>
|
||||
public MyControl SearchMainObj;
|
||||
/// <summary>
|
||||
/// 底部多标签控件
|
||||
/// </summary>
|
||||
public XtraTabControl TabObj { get { return this.tcButtom.TabControlObj; } }
|
||||
/// <summary>
|
||||
/// 调用动态链接库默认传递参数对象
|
||||
/// </summary>
|
||||
public DynamicModel Model { get; private set; }
|
||||
/// <summary>
|
||||
/// 上一次选中行
|
||||
/// </summary>
|
||||
public int LastFocusedRowHandle;
|
||||
/// <summary>
|
||||
/// 主键字段
|
||||
/// </summary>
|
||||
public string PrimaryKey;
|
||||
/// <summary>
|
||||
/// 主键值
|
||||
/// </summary>
|
||||
public string PrimaryValue;
|
||||
|
||||
public FrmSource()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
}
|
||||
|
||||
public FrmSource(string moduleCode, DynamicModel dyncModel, bool MaxWindow)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.WindowState = MaxWindow ? FormWindowState.Maximized : FormWindowState.Normal;
|
||||
this.Model = dyncModel;
|
||||
//根据传入的模块号获取模块信息
|
||||
DataRow modelRow = MainImpl.GetSystemdllTab(moduleCode);//获取模块信息
|
||||
if (modelRow == null)
|
||||
{
|
||||
MessageUtil.Show("模块编号[" + moduleCode + "],配置错误!\r\n该模块信息未找到!");
|
||||
return;
|
||||
}
|
||||
this.SysModel = new ModuleModel(modelRow);
|
||||
this.InitializeControl();
|
||||
this.InitializePages();
|
||||
|
||||
this.scc_container.SplitterMoved += Scc_container_SplitterMoved;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 初始化主表
|
||||
/// </summary>
|
||||
public void InitializeControl()
|
||||
{
|
||||
DataTable mainGridColumns = BaseModuleImpl.GetBaseGridColumns(this.SysModel.ModeCode);
|
||||
this.gcMain.SetReadOnlyColumns(mainGridColumns, GridCustomColumnStruct.BaseMainGridView + this.SysModel.FormKey);//主表列配置
|
||||
DataTable RightMenus = BaseModuleImpl.GetBaseGridRightMenus(this.SysModel.ModeCode);//右键
|
||||
int j = 0, x = simpleButton1.Left;
|
||||
foreach (DataRow item in RightMenus.Rows)
|
||||
{
|
||||
SimpleButton itemCommon = new SimpleButton();
|
||||
//itemCommon.Enabled = false;
|
||||
//itemCommon.AutoSize = true;
|
||||
if (item["orderid"].Equals("9999")) continue;
|
||||
|
||||
itemCommon.Text = item["menuname"] + "";
|
||||
itemCommon.Tag = item;
|
||||
itemCommon.Size = new System.Drawing.Size(90, 30);
|
||||
itemCommon.Font = new Font("宋体", 10);
|
||||
itemCommon.Click += new EventHandler(itemCommon_Click);
|
||||
itemCommon.Location = new Point(simpleButton1.Left-100, simpleButton1.Top);
|
||||
itemCommon.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||
plm_bottom.Controls.Add(itemCommon);
|
||||
x += 100;
|
||||
if (RightMenus.Columns.Contains("menuCond"))
|
||||
{
|
||||
itemCommon.Enabled = ValidateCond(item["menuCond"] + "", null);
|
||||
}
|
||||
j++;
|
||||
}
|
||||
|
||||
|
||||
this.SearchMainObj = new MyControl(this.SysModel.MenuSql, gcMain, null, null, null);//构建主表条件,mycontrol
|
||||
this.SearchMainObj.OnDataSourceBindCallBack += new EventHandler(OnDataSourceBindCallBack);
|
||||
DataTable queryTable = BaseModuleImpl.GetCustomQueryFields(this.SysModel.CondKey);//加载自定义配置字段
|
||||
if (queryTable != null && queryTable.Rows.Count > 0)
|
||||
{
|
||||
plm_top.Controls.Clear();
|
||||
this.SearchMainObj.InitSearchControl(queryTable, this.plm_top, null, null, this.SysModel.ConditionRefresh);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.plm_top.Visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDataSourceBindCallBack(object sender, EventArgs e)
|
||||
{
|
||||
this.SearchMainObj.SearchGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 按钮点击
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void itemCommon_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
DataRow rowItem = this.gcMain.GetViewFocusedDataRow();
|
||||
if (rowItem != null)
|
||||
{
|
||||
SimpleButton btn = sender as SimpleButton;
|
||||
DataRow TagItem = btn.Tag as DataRow;
|
||||
GridRightMenuModel model = new GridRightMenuModel(TagItem);
|
||||
CommonMenu menu = new CommonMenu(this.Model, this.SearchMainObj, this.gcMain);
|
||||
menu.Apply(TagItem);
|
||||
if (model != null && model.Refresh)
|
||||
{
|
||||
this.SearchMainObj.SearchLastGrid();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
string Message = ErrorMessage.PromptErrorMessage(ex);
|
||||
MessageUtil.Show(Message, ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 判断按钮条件
|
||||
/// </summary>
|
||||
/// <param name="rowItem"></param>
|
||||
public void SetButtonStatus(DataRow rowItem = null)
|
||||
{
|
||||
foreach (System.Windows.Forms.Control control in plm_bottom.Controls)
|
||||
{
|
||||
if (control is SimpleButton)
|
||||
{
|
||||
SimpleButton button = control as SimpleButton;
|
||||
DataRow dr = button.Tag as DataRow;
|
||||
if (dr != null && dr.Table.Columns.Contains("menuCond"))
|
||||
{
|
||||
string menuCond = dr["menuCond"] + "";
|
||||
button.Enabled = ValidateCond(menuCond, rowItem);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// <para>说明:初始化底部多标签数据</para>
|
||||
/// <para>创建人:龚宇超</para>
|
||||
/// <para>创建日期:2017-11-21 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
protected void InitializePages()
|
||||
{
|
||||
//获取对应的明细
|
||||
this.Details = GetDetails();
|
||||
if (this.Details == null || this.Details.Count == 0)
|
||||
{
|
||||
this.scc_container.PanelVisibility = SplitPanelVisibility.Panel1;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.InitlizeSpiltLocation();
|
||||
this.gcMain.GridView.FocusedRowObjectChanged += new DevExpress.XtraGrid.Views.Base.FocusedRowObjectChangedEventHandler(OnGridViewFocusedRowObjectChanged);
|
||||
this.gcMain.GridView.MouseDown += new MouseEventHandler(GridView_MouseDown);
|
||||
this.SearchMainObj.OnSearchAfterCallBack += SearchObj_ClearDetails;
|
||||
this.SearchMainObj.OnLastQueryTriggered += SearchObj_ClearDetails;
|
||||
|
||||
//this.InitilizeGridViewEvent();
|
||||
////下方明细中ModuleGridEx执行右键后是否刷新明细
|
||||
//if (this.SysModel.RefreshDetails)
|
||||
//{
|
||||
// tcButtom.OnDetailRightCallback += OnGridViewRightCallBack;
|
||||
//}
|
||||
this.tcButtom.Model = this.Model;
|
||||
this.tcButtom.DrgaParentPrimaryKey = this.SysModel.ParmaryKey;
|
||||
//this.tcButtom.IsDragDetail = this.IsDragDetail;
|
||||
this.tcButtom.ParentControlEx = this.SearchMainObj;
|
||||
this.tcButtom.ParentGridEx = this.gcMain;
|
||||
this.tcButtom.InitTabPages(this.Details);
|
||||
//this.tcButtom.OnRightCallback += new EventHandler(OnGridViewRightCallBack);
|
||||
|
||||
|
||||
//明细只有一个选项卡时是否隐藏
|
||||
if (SystemInfo.Instance.HidingIndividualDetails)
|
||||
{
|
||||
this.TabObj.ShowTabHeader = this.TabObj.TabPages.Count == 1 ? DefaultBoolean.False : DefaultBoolean.Default;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// <para>说明:拿到底部表格数据</para>
|
||||
/// <para>创建人:龚宇超</para>
|
||||
/// <para>创建日期:2017-11-21 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <returns>List<GridDetailModel>.</returns>
|
||||
private List<GridDetailModel> GetDetails()
|
||||
{
|
||||
List<GridDetailModel> details = new List<GridDetailModel>();//表格明细对象的集合
|
||||
DataTable table = BaseModuleImpl.GetBaseDetailPages(this.SysModel.ModeCode);// 根据传入的模块编号获得基础档案底部标签的数据
|
||||
foreach (DataRow item in table.Rows)
|
||||
{
|
||||
DataTable gridColumns = ReportImpl.GetReportDetailColumns(this.SysModel.ModeCode, item["id"] + "");//获取报表明细列
|
||||
details.Add(new GridDetailModel(item, gridColumns, GridCustomColumnStruct.BaseDetailGridView));
|
||||
}
|
||||
return details;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>说明:设置分割条位置</para>
|
||||
/// <para>创建人:龚宇超</para>
|
||||
/// <para>创建日期:2018-02-01 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
protected void InitlizeSpiltLocation()
|
||||
{
|
||||
try
|
||||
{
|
||||
string htight = IniHelper.Read(string.Format("PubBillSpecial_height_{0}", this.SysModel.ModeCode));
|
||||
if (!string.IsNullOrEmpty(htight))
|
||||
{
|
||||
this.scc_container.SplitterPosition = Convert.ToInt32(htight);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.Instance.WriteError(ex);
|
||||
string Message = ErrorMessage.PromptErrorMessage(ex);
|
||||
MessageUtil.Show(Message, ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分隔符移动
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void Scc_container_SplitterMoved(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (this.SysModel != null)
|
||||
{
|
||||
IniHelper.Write(string.Format("PubBillSpecial_height_{0}", this.SysModel.ModeCode), this.scc_container.SplitterPosition + "");
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
string Message = ErrorMessage.PromptErrorMessage(ex);
|
||||
MessageUtil.Show(Message, ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 加载明细数据
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void GridView_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
|
||||
GridView view = sender as GridView;
|
||||
// 计算点击位置的信息
|
||||
DevExpress.XtraGrid.Views.Grid.ViewInfo.GridHitInfo hitInfo = view.CalcHitInfo(e.X, e.Y);
|
||||
// 检查点击是否在行内
|
||||
if (hitInfo.InRowCell)
|
||||
{
|
||||
// 获取点击的行句柄
|
||||
int rowHandle = hitInfo.RowHandle;
|
||||
|
||||
if (LastFocusedRowHandle == rowHandle)
|
||||
{
|
||||
//和上一次点击行一致就刷新数据原
|
||||
this.SetDetailGridDataSource();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 主表数据查询后发生
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void SearchObj_ClearDetails(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
//主表内容为空时清空所有明细数据
|
||||
if (this.gcMain.gridControl.DataSourceTable().Rows.Count == 0)
|
||||
{
|
||||
OnGridViewFocusedRowObjectChanged(null, null);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.Instance.WriteError(ex);
|
||||
string Message = ErrorMessage.PromptErrorMessage(ex);
|
||||
MessageUtil.Show("加载明细数据失败!" + Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
WaitForm.HideForm();
|
||||
}
|
||||
}
|
||||
|
||||
/// <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="DevExpress.XtraGrid.Views.Base.FocusedRowObjectChangedEventArgs"/> instance containing the event data.</param>
|
||||
protected void OnGridViewFocusedRowObjectChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowObjectChangedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
WaitForm.ShowForm();
|
||||
|
||||
if (e != null) this.LastFocusedRowHandle = e.RowHandle;
|
||||
this.SetDetailGridDataSource();
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.Instance.WriteError(ex);
|
||||
string Message = ErrorMessage.PromptErrorMessage(ex);
|
||||
MessageUtil.Show("加载明细数据失败!" + Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
WaitForm.HideForm();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>说明:获取底部多标签数据</para>
|
||||
/// <para>创建人:龚宇超</para>
|
||||
/// <para>创建日期:2017-12-19 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
public void SetDetailGridDataSource(XtraTabPage tabPage = null)
|
||||
{
|
||||
DataRow rowItem = this.gcMain.GetViewFocusedDataRow();
|
||||
this.SetButtonStatus(rowItem);
|
||||
if (tabPage != null)
|
||||
{
|
||||
this.SetTabPageDataSource(tabPage);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
foreach (XtraTabPage page in this.TabObj.TabPages)
|
||||
{
|
||||
|
||||
if (rowItem != null && page != null)
|
||||
{
|
||||
this.SetTabPageDataSource(page);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetTabPageDataSource(page, true);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// <para>说明:设置表格数据</para>
|
||||
/// <para>创建人:龚宇超</para>
|
||||
/// <para>创建日期:2018-01-29 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <param name="tabPage">The tab page.</param>
|
||||
/// <param name="gridControl">The grid control.</param>
|
||||
protected void SetTabPageDataSource(XtraTabPage tabPage, bool isNull = false)
|
||||
{
|
||||
GridDetailModel model = this.tcButtom.GetGridDetailModel(tabPage);
|
||||
if (isNull)
|
||||
{
|
||||
DataRow leftrow = null;
|
||||
if (model.IsUnionleft && leftrow != null)//为空状态下若明细关联左侧则去替换数据源
|
||||
{
|
||||
string sqlValue = model.IsReadOnly || model.IsChart ? model.DetailSql : model.SystemModel.MenuSql;
|
||||
|
||||
if (ReplaceHelper.IsSelect(sqlValue) && !string.IsNullOrEmpty(model.UnionValue))
|
||||
{
|
||||
string Conditions = string.Empty;
|
||||
//是左侧选中行,并且没有替换字段,则使用主表选中行
|
||||
sqlValue = ReplaceHelper.ReplaceWhereCond(sqlValue) + string.Format(" and {0}='{1}'", model.UnionValue, Conditions);
|
||||
|
||||
}
|
||||
if (!string.IsNullOrEmpty(model.UnionCond))
|
||||
{
|
||||
string UnionCond = ReplaceHelper.ReplaceRowParam(leftrow, model.UnionCond);
|
||||
sqlValue += UnionCond;
|
||||
}
|
||||
sqlValue = ReplaceHelper.ReplaceRowParam(leftrow, sqlValue);
|
||||
this.tcButtom.SetGridDataSource(tabPage, MainImpl.GetDataTableResult(sqlValue));
|
||||
return;
|
||||
}
|
||||
this.tcButtom.SetGridDataSource(tabPage, new DataTable());
|
||||
return;
|
||||
}
|
||||
|
||||
DataRow rowItem = this.gcMain.GetViewFocusedDataRow();
|
||||
if (!string.IsNullOrEmpty(SysModel.PageVisbleCond))
|
||||
{
|
||||
string condSql = ReplaceHelper.ReplaceRowParam(rowItem, ReplaceHelper.ReplaceUserInfo(SysModel.PageVisbleCond));
|
||||
// 形如 "1,2,3" 的返回值
|
||||
string numberList = MainImpl.GetResult(condSql) + "";
|
||||
|
||||
// ---------- 判断当前 orderid 是否在列表中 ----------
|
||||
string orderIdStr = model.Orderid.ToString(); // 统一转成字符串
|
||||
string[] idArr = numberList.Split(new[] { ',' },
|
||||
StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
if (!string.IsNullOrEmpty(numberList) && !idArr.Contains(orderIdStr))
|
||||
{
|
||||
tabPage.PageVisible = false;
|
||||
return; // 不包含当前 orderid,直接退出
|
||||
}
|
||||
else
|
||||
{
|
||||
tabPage.PageVisible = true;
|
||||
}
|
||||
}
|
||||
|
||||
Object moduleObject = tabPage.Controls.Cast<Object>().FirstOrDefault();
|
||||
ModuleGridEx moduleGridEx = null;
|
||||
if (moduleObject is ModuleGridEx)
|
||||
{
|
||||
moduleGridEx = moduleObject as ModuleGridEx;
|
||||
}
|
||||
if (rowItem != null && model != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(model.UnionModule) && (string.IsNullOrEmpty(model.UnionValue) && string.IsNullOrEmpty(model.UnionCond))) return;
|
||||
if (tabPage.Tag is FrmWebBrowser)
|
||||
{
|
||||
// 加载网页
|
||||
FrmWebBrowser webView = tabPage.Tag as FrmWebBrowser;
|
||||
string url = ReplaceHelper.ReplaceRowParam(rowItem, ReplaceHelper.ReplaceUserInfo(model.DetailSql));
|
||||
url = url.StartsWith("http") ? url : SystemInfo.Instance.OAUrl + url;
|
||||
//webView.FrmLoad(url);
|
||||
webView.LoadUrl(url);
|
||||
webView.Dock = DockStyle.Fill;
|
||||
webView.Tag = model;
|
||||
}
|
||||
else if (tabPage.Tag is FrmWebBrowser2)
|
||||
{
|
||||
// 加载网页
|
||||
FrmWebBrowser2 webView = tabPage.Tag as FrmWebBrowser2;
|
||||
string url = ReplaceHelper.ReplaceRowParam(rowItem, ReplaceHelper.ReplaceUserInfo(model.DetailSql));
|
||||
url = url.StartsWith("http") ? url : SystemInfo.Instance.OAUrl + url;
|
||||
webView.LoadUrl(url);
|
||||
webView.Dock = DockStyle.Fill;
|
||||
webView.Tag = model;
|
||||
}
|
||||
else if (tabPage.Tag is FrmMiniBlink)
|
||||
{
|
||||
// 加载网页
|
||||
FrmMiniBlink webView = tabPage.Tag as FrmMiniBlink;
|
||||
string url = ReplaceHelper.ReplaceRowParam(rowItem, ReplaceHelper.ReplaceUserInfo(model.DetailSql));
|
||||
url = url.StartsWith("http") ? url : SystemInfo.Instance.OAUrl + url;
|
||||
webView.LoadUrl(url);
|
||||
webView.Dock = DockStyle.Fill;
|
||||
webView.Tag = model;
|
||||
}
|
||||
else if (tabPage.Tag is TabMultipledetails)
|
||||
{
|
||||
TabMultipledetails tabMultipledetails = tabPage.Tag as TabMultipledetails;
|
||||
tabMultipledetails.SetConditionValues(rowItem);
|
||||
GridControlEx grdExMain = (tabMultipledetails.SplitMain.Panel1.Tag as GridControlEx);
|
||||
GridDetailModel MainModel = grdExMain.Tag as GridDetailModel;
|
||||
string searchMainSql = this.GetSearchSql(MainModel, rowItem);
|
||||
DataTable firstTable = MainImpl.GetDataTableResult(searchMainSql);
|
||||
grdExMain.LastSearchSql = searchMainSql;
|
||||
grdExMain.SetGridViewDataSource(firstTable);
|
||||
if (tabMultipledetails.SplitMain.Panel2.Tag is GridControlEx)
|
||||
{
|
||||
GridControlEx grdExAdditional = (tabMultipledetails.SplitMain.Panel2.Tag as GridControlEx);
|
||||
GridDetailModel AdditionalModel = grdExAdditional.Tag as GridDetailModel;
|
||||
string searchAddSql = this.GetSearchSql(AdditionalModel, rowItem);
|
||||
if (!MainModel.IsUnioDetail)
|
||||
{
|
||||
grdExAdditional.LastSearchSql = searchAddSql;
|
||||
grdExAdditional.SetGridViewDataSource(MainImpl.GetDataTableResult(searchAddSql));
|
||||
}
|
||||
//右侧是左侧的明细,左侧没有数据时。右侧赋空值(因为无法触发左侧行改变事件)
|
||||
if (MainModel.IsUnioDetail && firstTable.Rows.Count == 0)
|
||||
{
|
||||
grdExAdditional.LastSearchSql = "";
|
||||
grdExAdditional.SetGridViewDataSource(new DataTable());
|
||||
}
|
||||
}
|
||||
else if (tabMultipledetails.SplitMain.Panel2.Tag is ChartControlEx)
|
||||
{
|
||||
ChartControlEx grdExAdditional = (tabMultipledetails.SplitMain.Panel2.Tag as ChartControlEx);
|
||||
GridDetailModel AdditionalModel = grdExAdditional.Tag as GridDetailModel;
|
||||
string searchAddSql = this.GetSearchSql(AdditionalModel, rowItem);
|
||||
DataTable table = MainImpl.GetDataTableResult(searchAddSql);
|
||||
grdExAdditional.CreateChart(table);
|
||||
}
|
||||
|
||||
tabPage.Text = MainModel.DetailName + "(" + firstTable.Rows.Count + "条)";
|
||||
tabPage.Appearance.Header.ForeColor = firstTable.Rows.Count > 0 ? Color.Red : Color.FromArgb(0, 0, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (model.IsDrag)
|
||||
{
|
||||
return;
|
||||
}
|
||||
string searchSql = this.GetSearchSql(model, rowItem);
|
||||
//if (moduleGridEx != null&& moduleGridEx.SearchObj!=null)
|
||||
//{
|
||||
// searchSql= moduleGridEx.SearchObj.SetSearchSqlValue(searchSql);
|
||||
//}
|
||||
if (tabPage.Tag is GridControlEx)
|
||||
{
|
||||
(tabPage.Tag as GridControlEx).LastSearchSql = searchSql;
|
||||
}
|
||||
GridView view = this.gcMain.GridView;
|
||||
//DataTable dataTable = MainImpl.GetDataTableResult(searchSql);//明细数据源
|
||||
if (model.DynamicDetails && rowItem.Table.Columns.Contains("DisplayColumns")) //
|
||||
{
|
||||
this.tcButtom.SetGridDisplayColumns(tabPage, rowItem["DisplayColumns"] + "");
|
||||
}
|
||||
this.tcButtom.SetGridDataSource(tabPage, MainImpl.GetDataTableResult(searchSql), view);
|
||||
if (tabPage.Tag is GridControlEx && (tabPage.Tag as GridControlEx).ParentControl != null)
|
||||
(tabPage.Tag as GridControlEx).ParentControl.SetAllControlValue(rowItem);
|
||||
//配置明细直接根据条件加载
|
||||
if (model.SystemModel != null && 1 == model.SystemModel.isFirstLoad)
|
||||
{
|
||||
(tabPage.Tag as GridControlEx).ParentControl.SearchGrid();
|
||||
tabPage.Text = model.DetailName + "(" + (tabPage.Tag as GridControlEx).ParentControl.GridRowCount + "条)";
|
||||
}
|
||||
|
||||
}
|
||||
if (moduleGridEx != null)
|
||||
{
|
||||
moduleGridEx.ParentButtonState(rowItem);
|
||||
moduleGridEx.SelectTheSpecifiedRow();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// <para>说明:获取查询条件</para>
|
||||
/// <para>创建人:龚宇超</para>
|
||||
/// <para>创建日期:2017-11-22 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <param name="model">The model.</param>
|
||||
/// <param name="rowItem">The row item.</param>
|
||||
/// <returns>System.String.</returns>
|
||||
protected string GetSearchSql(GridDetailModel model, DataRow rowItem, bool isLeft = false)
|
||||
{
|
||||
string fieldName = model.UnionParentField;
|
||||
string sqlValue = model.IsReadOnly || model.IsChart ? model.DetailSql : model.SystemModel.MenuSql;
|
||||
|
||||
sqlValue = ReplaceHelper.ReplaceRowParam(rowItem, sqlValue);
|
||||
|
||||
DataRow row = this.gcMain.GetViewFocusedDataRow();
|
||||
if (row != null && isLeft)
|
||||
{
|
||||
//先替换左侧选中行,在替换主表
|
||||
sqlValue = ReplaceHelper.ReplaceRowParam(row, sqlValue);
|
||||
}
|
||||
|
||||
if (ReplaceHelper.IsSelect(sqlValue) && !string.IsNullOrEmpty(model.UnionValue))
|
||||
{
|
||||
string Conditions = string.Empty;
|
||||
//是左侧选中行,并且没有替换字段,则使用主表选中行
|
||||
Conditions = isLeft ? rowItem.Table.Columns.Contains(fieldName) ? rowItem[fieldName] + "" : row[fieldName] + "" : rowItem[fieldName] + "";
|
||||
|
||||
sqlValue = ReplaceHelper.ReplaceWhereCond(sqlValue) + string.Format(" and {0}='{1}'", model.UnionValue, Conditions);
|
||||
|
||||
}
|
||||
if (!string.IsNullOrEmpty(model.UnionCond))
|
||||
{
|
||||
string UnionCond = ReplaceHelper.ReplaceRowParam(rowItem, model.UnionCond);
|
||||
sqlValue += UnionCond;
|
||||
}
|
||||
return sqlValue;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// <para>说明:检查可用条件</para>
|
||||
/// <para>创建人:龚宇超</para>
|
||||
/// <para>创建日期:2017-11-09 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <param name="cond">The cond.</param>
|
||||
/// <param name="dataRow">The data row.</param>
|
||||
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
|
||||
private bool ValidateCond(string cond, DataRow dataRow)
|
||||
{
|
||||
bool result = false;
|
||||
string condition = cond;
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(cond)) return true;//如果值是空格或者空行,默认正确
|
||||
cond = ReplaceHelper.ReplaceRowParam(dataRow, cond);
|
||||
if (cond.StartsWith("@") || cond.StartsWith("!"))
|
||||
{
|
||||
result = "1".Equals(BaseImpl.GetDefaultValue(cond));
|
||||
}
|
||||
else if (dataRow == null)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -68,6 +68,10 @@
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lserp_cs_6.0\引用DLL\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Spire.Doc, Version=8.3.15.0, Culture=neutral, PublicKeyToken=663f351905198cb3, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\引用DLL\Spire.Doc.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Drawing" />
|
||||
@@ -86,11 +90,11 @@
|
||||
<Compile Include="BillModule.Designer.cs">
|
||||
<DependentUpon>BillModule.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="FrmAddRole.cs">
|
||||
<Compile Include="FrmAdd.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="FrmAddRole.Designer.cs">
|
||||
<DependentUpon>FrmAddRole.cs</DependentUpon>
|
||||
<Compile Include="FrmAdd.Designer.cs">
|
||||
<DependentUpon>FrmAdd.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="FrmBomSelect.cs">
|
||||
<SubType>Form</SubType>
|
||||
@@ -98,6 +102,12 @@
|
||||
<Compile Include="FrmBomSelect.Designer.cs">
|
||||
<DependentUpon>FrmBomSelect.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="FrmSource.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="FrmSource.Designer.cs">
|
||||
<DependentUpon>FrmSource.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Model\BillModuleModel.cs" />
|
||||
<Compile Include="Model\BillSourceUnionModel.cs" />
|
||||
<Compile Include="DllBaseClass.cs" />
|
||||
@@ -116,8 +126,8 @@
|
||||
<DependentUpon>BillModule.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="FrmAddRole.resx">
|
||||
<DependentUpon>FrmAddRole.cs</DependentUpon>
|
||||
<EmbeddedResource Include="FrmAdd.resx">
|
||||
<DependentUpon>FrmAdd.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="FrmBomSelect.resx">
|
||||
<DependentUpon>FrmBomSelect.cs</DependentUpon>
|
||||
@@ -125,6 +135,9 @@
|
||||
<EmbeddedResource Include="FrmMain.resx">
|
||||
<DependentUpon>FrmMain.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="FrmSource.resx">
|
||||
<DependentUpon>FrmSource.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\licenses.licx" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -160,6 +173,10 @@
|
||||
<Project>{A51BF642-6543-4DE3-8948-83F558B72BD4}</Project>
|
||||
<Name>Lskj.Util</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Lskj.Workflow\Lskj.Workflow.csproj">
|
||||
<Project>{64C6B8B5-019D-47D4-8C32-C987217E1AF8}</Project>
|
||||
<Name>Lskj.Workflow</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
|
||||
Reference in New Issue
Block a user