SVN-Revision: r360
This commit is contained in:
wyf
2025-03-20 08:16:32 +00:00
parent a7ada272ce
commit ce90860163
9 changed files with 3488 additions and 0 deletions
+111
View File
@@ -0,0 +1,111 @@
/******************************
* 说明:PubSpec 模块
* 创建人:龚宇超
* 创建日期:2018-01-02
* 修改人:
* 修改日期:
* 修改备注:
* 版本:1.0.0.0
******************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Lskj.Util;
using Lskj.Business;
using System.Windows.Forms;
using Lskj.Model;
using DevExpress.XtraGrid.Views.Grid;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json;
using System.Data;
namespace Lskj.PubBomImport
{
/// <summary>
/// PubSpec 模块
/// </summary>
public class DllBaseClass : IForm
{
public DllBaseClass()
{
}
public DllBaseClass(string[] obj)
{
try
{
FrmMain main = new FrmMain();
this.SubForm = main;
main.Model = new DynamicBomImport(obj);
}
catch (Exception ex)
{
LogUtil.WriteError("Lskj.PubSpecialImport.dll--参数错误-->" + obj.ToString(), ex);
}
}
public Form SubForm { get; set; }
}
/// <summary>
/// PubSpecialImport入库参数
/// </summary>
public class DynamicBomImport : DynamicModel
{
public string MenuName = "";
public string FirstRowIndex = "";
public string SpecialValueIndex = "";
public string SheetName = "";
/// <summary>
/// 读取筛选条件
/// </summary>
public string ReadTableCond = "";
/// <summary>
/// 忽略合并明细列标题行
/// </summary>
public bool CustomerServiceApp = false;
/// <summary>
/// 显示模式,如果为1则隐藏配置界面
/// </summary>
public string ShowType = "";
/// <summary>
/// 单据 BillMasterSql
/// </summary>
public string BillMasterSql = "";
/// <summary>
/// 单据 BillDetailSql
/// </summary>
public string BillDetailSql = "";
public DynamicBomImport(string[] args)
: base(args)
{
// 右键菜单打开的模块没有moduleId,部分特殊模块没有moduleId比如添加界面.
MenuName = args[0];
if (!string.IsNullOrEmpty(args[5]))
{
base.ModuleId = Convert.ToInt32(args[5]);
}
if (args.Length > 6 && !string.IsNullOrWhiteSpace(args[6]))
{
base.ModuleCode = args[6];
}
if (args.Length > 7 && !string.IsNullOrWhiteSpace(args[7]))
{
FirstRowIndex = args[7] + "";
}
if (args.Length > 8 && !string.IsNullOrWhiteSpace(args[8]))
{
SpecialValueIndex = args[8] + "";
}
if (args.Length > 9 && !string.IsNullOrWhiteSpace(args[9]))
{
SheetName = args[9] + "";
}
if (args.Length > 10 && !string.IsNullOrWhiteSpace(args[10]))
{
ReadTableCond = args[10] + "";
}
if (args.Length > 11 && !string.IsNullOrWhiteSpace(args[11]))
{
CustomerServiceApp = (args[11] + "").Equals("1");
}
if (args.Length > 12 && !string.IsNullOrWhiteSpace
+721
View File
@@ -0,0 +1,721 @@
namespace Lskj.PubBomImport
{
partial class FrmBillInfo
{
/// <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.pl_main = new DevExpress.XtraEditors.PanelControl();
this.pl_main_center = new DevExpress.XtraEditors.PanelControl();
this.pl_main_center_detail = new DevExpress.XtraEditors.PanelControl();
this.gcMain = new Lskj.Control.GridControlEx();
this.pl_main_center_master = new DevExpress.XtraEditors.XtraScrollableControl();
this.pl_treeview_detault_search = new DevExpress.XtraEditors.PanelControl();
this.panelControl4 = new DevExpress.XtraEditors.PanelControl();
this.textEdit1 = new DevExpress.XtraEditors.TextEdit();
this.lceCombobox = new Lskj.Control.LabelComboxEdit();
this.panelControl3 = new DevExpress.XtraEditors.PanelControl();
this.btnTreeSearch = new DevExpress.XtraEditors.SimpleButton();
this.pl_main_bottom = new DevExpress.XtraEditors.PanelControl();
this.dbpFP = new DevExpress.XtraEditors.DropDownButton();
this.btnRefresh = new DevExpress.XtraEditors.SimpleButton();
this.btnHiding = new DevExpress.XtraEditors.SimpleButton();
this.btnHelp = new DevExpress.XtraEditors.SimpleButton();
this.pl_templete = new DevExpress.XtraEditors.PanelControl();
this.cb_templete = new DevExpress.XtraEditors.ComboBoxEdit();
this.lbl_templete = new DevExpress.XtraEditors.LabelControl();
this.pl_input = new DevExpress.XtraEditors.PanelControl();
this.cb_input = new DevExpress.XtraEditors.ComboBoxEdit();
this.txt_input = new DevExpress.XtraEditors.TextEdit();
this.labelControl2 = new DevExpress.XtraEditors.LabelControl();
this.btn_input = new DevExpress.XtraEditors.SimpleButton();
this.dpbImport = new DevExpress.XtraEditors.DropDownButton();
this.btnBillAdd = new DevExpress.XtraEditors.SimpleButton();
this.btnBillApply = new DevExpress.XtraEditors.SimpleButton();
this.dpCopyBill = new DevExpress.XtraEditors.DropDownButton();
this.btnPrint = new DevExpress.XtraEditors.DropDownButton();
this.dpbTools = new DevExpress.XtraEditors.DropDownButton();
this.btnDelete = new DevExpress.XtraEditors.SimpleButton();
this.btnBillSave = new DevExpress.XtraEditors.SimpleButton();
this.pl_main_top = new DevExpress.XtraEditors.PanelControl();
this.pl_main_top_center = new DevExpress.XtraEditors.PanelControl();
this.lbTitle = new System.Windows.Forms.Label();
this.pl_main_top_right = new DevExpress.XtraEditors.PanelControl();
this.lblOrderNo = new DevExpress.XtraEditors.LabelControl();
this.labelControl1 = new DevExpress.XtraEditors.LabelControl();
this.pl_main_top_left = new DevExpress.XtraEditors.PanelControl();
this.pl_red = new DevExpress.XtraEditors.PanelControl();
this.rdRed = new System.Windows.Forms.RadioButton();
this.pl_blue = new DevExpress.XtraEditors.PanelControl();
this.rdBlue = new System.Windows.Forms.RadioButton();
((System.ComponentModel.ISupportInitialize)(this.pl_main)).BeginInit();
this.pl_main.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pl_main_center)).BeginInit();
this.pl_main_center.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pl_main_center_detail)).BeginInit();
this.pl_main_center_detail.SuspendLayout();
this.pl_main_center_master.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pl_treeview_detault_search)).BeginInit();
this.pl_treeview_detault_search.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.panelControl4)).BeginInit();
this.panelControl4.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.textEdit1.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.panelControl3)).BeginInit();
this.panelControl3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pl_main_bottom)).BeginInit();
this.pl_main_bottom.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pl_templete)).BeginInit();
this.pl_templete.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.cb_templete.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pl_input)).BeginInit();
this.pl_input.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.cb_input.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txt_input.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pl_main_top)).BeginInit();
this.pl_main_top.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pl_main_top_center)).BeginInit();
this.pl_main_top_center.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pl_main_top_right)).BeginInit();
this.pl_main_top_right.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pl_main_top_left)).BeginInit();
this.pl_main_top_left.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pl_red)).BeginInit();
this.pl_red.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pl_blue)).BeginInit();
this.pl_blue.SuspendLayout();
this.SuspendLayout();
//
// pl_main
//
this.pl_main.Appearance.BackColor = System.Drawing.Color.Transparent;
this.pl_main.Appearance.Options.UseBackColor = true;
this.pl_main.Controls.Add(this.pl_main_center);
this.pl_main.Controls.Add(this.pl_main_bottom);
this.pl_main.Controls.Add(this.pl_main_top);
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(666, 518);
this.pl_main.TabIndex = 2;
//
// pl_main_center
//
this.pl_main_center.Appearance.BackColor = System.Drawing.Color.Transparent;
this.pl_main_center.Appearance.Options.UseBackColor = true;
this.pl_main_center.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
this.pl_main_center.Controls.Add(this.pl_main_center_detail);
this.pl_main_center.Controls.Add(this.pl_main_center_master);
this.pl_main_center.Dock = System.Windows.Forms.DockStyle.Fill;
this.pl_main_center.Location = new System.Drawing.Point(2, 40);
this.pl_main_center.Name = "pl_main_center";
this.pl_main_center.Size = new System.Drawing.Size(662, 439);
this.pl_main_center.TabIndex = 2;
//
// pl_main_center_detail
//
this.pl_main_center_detail.Appearance.BackColor = System.Drawing.Color.Transparent;
this.pl_main_center_detail.Appearance.Options.UseBackColor = true;
this.pl_main_center_detail.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
this.pl_main_center_detail.Controls.Add(this.gcMain);
this.pl_main_center_detail.Dock = System.Windows.Forms.DockStyle.Fill;
this.pl_main_center_detail.Location = new System.Drawing.Point(0, 164);
this.pl_main_center_detail.Name = "pl_main_center_detail";
this.pl_main_center_detail.Size = new System.Drawing.Size(662, 275);
this.pl_main_center_detail.TabIndex = 5;
//
// 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, 0);
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(662, 275);
this.gcMain.TabIndex = 0;
//
// pl_main_center_master
//
this.pl_main_center_master.AutoScroll = false;
this.pl_main_center_master.Controls.Add(this.pl_treeview_detault_search);
this.pl_main_center_master.Dock = System.Windows.Forms.DockStyle.Top;
this.pl_main_center_master.Location = new System.Drawing.Point(0, 0);
this.pl_main_center_master.Name = "pl_main_center_master";
this.pl_main_center_master.Size = new System.Drawing.Size(662, 164);
this.pl_main_center_master.TabIndex = 6;
//
// pl_treeview_detault_search
//
this.pl_treeview_detault_search.Appearance.BackColor = System.Drawing.Color.Transparent;
this.pl_treeview_detault_search.Appearance.Options.UseBackColor = true;
this.pl_treeview_detault_search.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
this.pl_treeview_detault_search.Controls.Add(this.panelControl4);
this.pl_treeview_detault_search.Controls.Add(this.panelControl3);
this.pl_treeview_detault_search.Location = new System.Drawing.Point(39, 104);
this.pl_treeview_detault_search.Margin = new System.Windows.Forms.Padding(5, 3, 5, 3);
this.pl_treeview_detault_search.Name = "pl_treeview_detault_search";
this.pl_treeview_detault_search.Size = new System.Drawing.Size(270, 28);
this.pl_treeview_detault_search.TabIndex = 24;
this.pl_treeview_detault_search.Visible = false;
//
// panelControl4
//
this.panelControl4.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
this.panelControl4.Controls.Add(this.textEdit1);
this.panelControl4.Controls.Add(this.lceCombobox);
this.panelControl4.Dock = System.Windows.Forms.DockStyle.Fill;
this.panelControl4.Location = new System.Drawing.Point(0, 0);
this.panelControl4.Name = "panelControl4";
this.panelControl4.Padding = new System.Windows.Forms.Padding(2, 4, 2, 0);
this.panelControl4.Size = new System.Drawing.Size(206, 28);
this.panelControl4.TabIndex = 25;
//
// textEdit1
//
this.textEdit1.Dock = System.Windows.Forms.DockStyle.Fill;
this.textEdit1.Location = new System.Drawing.Point(113, 4);
this.textEdit1.Name = "textEdit1";
this.textEdit1.Properties.Appearance.Font = new System.Drawing.Font("宋体", 10F);
this.textEdit1.Properties.Appearance.Options.UseFont = true;
this.textEdit1.Size = new System.Drawing.Size(91, 20);
this.textEdit1.TabIndex = 5;
//
// lceCombobox
//
this.lceCombobox.BackColor = System.Drawing.SystemColors.Control;
this.lceCombobox.Dock = System.Windows.Forms.DockStyle.Left;
this.lceCombobox.EditText = "";
this.lceCombobox.Font = new System.Drawing.Font("宋体", 9F);
this.lceCombobox.FontSize = 0F;
this.lceCombobox.LabelText = "查询";
this.lceCombobox.Location = new System.Drawing.Point(2, 4);
this.lceCombobox.Margin = new System.Windows.Forms.Padding(4);
this.lceCombobox.Model = null;
this.lceCombobox.Name = "lceCombobox";
this.lceCombobox.NullText = "";
this.lceCombobox.ReadOnly = false;
this.lceCombobox.Required = false;
this.lceCombobox.Size = new System.Drawing.Size(111, 24);
this.lceCombobox.TabIndex = 4;
//
// panelControl3
//
this.panelControl3.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
this.panelControl3.Controls.Add(this.btnTreeSearch);
this.panelControl3.Dock = System.Windows.Forms.DockStyle.Right;
this.panelControl3.Location = new System.Drawing.Point(206, 0);
this.panelControl3.Name = "panelControl3";
this.panelControl3.Padding = new System.Windows.Forms.Padding(3);
this.panelControl3.Size = new System.Drawing.Size(64, 28);
this.panelControl3.TabIndex = 25;
//
// btnTreeSearch
//
this.btnTreeSearch.AllowFocus = false;
this.btnTreeSearch.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnTreeSearch.Appearance.Options.UseFont = true;
this.btnTreeSearch.Dock = System.Windows.Forms.DockStyle.Right;
this.btnTreeSearch.Location = new System.Drawing.Point(1, 3);
this.btnTreeSearch.Name = "btnTreeSearch";
this.btnTreeSearch.Size = new System.Drawing.Size(60, 22);
this.btnTreeSearch.TabIndex = 21;
this.btnTreeSearch.Text = "查询";
//
// pl_main_bottom
//
this.pl_main_bottom.Appearance.BackColor = System.Drawing.Color.Transparent;
this.pl_main_bottom.Appearance.Options.UseBackColor = true;
this.pl_main_bottom.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
this.pl_main_bottom.Controls.Add(this.dbpFP);
this.pl_main_bottom.Controls.Add(this.btnRefresh);
this.pl_main_bottom.Controls.Add(this.btnHiding);
this.pl_main_bottom.Controls.Add(this.btnHelp);
this.pl_main_bottom.Controls.Add(this.pl_templete);
this.pl_main_bottom.Controls.Add(this.pl_input);
this.pl_main_bottom.Controls.Add(this.dpbImport);
this.pl_main_bottom.Controls.Add(this.btnBillAdd);
this.pl_main_bottom.Controls.Add(this.btnBillApply);
this.pl_main_bottom.Controls.Add(this.dpCopyBill);
this.pl_main_bottom.Controls.Add(this.btnPrint);
this.pl_main_bottom.Controls.Add(this.dpbTools);
this.pl_main_bottom.Controls.Add(this.btnDelete);
this.pl_main_bottom.Controls.Add(this.btnBillSave);
this.pl_main_bottom.Dock = System.Windows.Forms.DockStyle.Bottom;
this.pl_main_bottom.Location = new System.Drawing.Point(2, 479);
this.pl_main_bottom.Name = "pl_main_bottom";
this.pl_main_bottom.Size = new System.Drawing.Size(662, 37);
this.pl_main_bottom.TabIndex = 1;
//
// dbpFP
//
this.dbpFP.AllowFocus = false;
this.dbpFP.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.dbpFP.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.dbpFP.Appearance.Options.UseFont = true;
this.dbpFP.Location = new System.Drawing.Point(-199, 7);
this.dbpFP.Name = "dbpFP";
this.dbpFP.Size = new System.Drawing.Size(58, 26);
this.dbpFP.TabIndex = 34;
this.dbpFP.Text = "分配";
//
// btnRefresh
//
this.btnRefresh.AllowFocus = false;
this.btnRefresh.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnRefresh.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnRefresh.Appearance.Options.UseFont = true;
this.btnRefresh.Location = new System.Drawing.Point(-135, 7);
this.btnRefresh.Name = "btnRefresh";
this.btnRefresh.Size = new System.Drawing.Size(74, 26);
this.btnRefresh.TabIndex = 33;
this.btnRefresh.Text = "刷新列数据";
//
// btnHiding
//
this.btnHiding.AllowFocus = false;
this.btnHiding.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnHiding.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnHiding.Appearance.Options.UseFont = true;
this.btnHiding.Location = new System.Drawing.Point(-59, 7);
this.btnHiding.Name = "btnHiding";
this.btnHiding.Size = new System.Drawing.Size(67, 26);
this.btnHiding.TabIndex = 32;
this.btnHiding.Text = "隐藏主表";
this.btnHiding.Visible = false;
//
// btnHelp
//
this.btnHelp.AllowFocus = false;
this.btnHelp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnHelp.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnHelp.Appearance.Options.UseFont = true;
this.btnHelp.Location = new System.Drawing.Point(10, 7);
this.btnHelp.Name = "btnHelp";
this.btnHelp.Size = new System.Drawing.Size(67, 26);
this.btnHelp.TabIndex = 30;
this.btnHelp.Text = "帮助文档";
//
// pl_templete
//
this.pl_templete.Controls.Add(this.cb_templete);
this.pl_templete.Controls.Add(this.lbl_templete);
this.pl_templete.Location = new System.Drawing.Point(3, 3);
this.pl_templete.LookAndFeel.SkinName = "VS2010";
this.pl_templete.LookAndFeel.Style = DevExpress.LookAndFeel.LookAndFeelStyle.Style3D;
this.pl_templete.Name = "pl_templete";
this.pl_templete.Size = new System.Drawing.Size(195, 29);
this.pl_templete.TabIndex = 29;
this.pl_templete.Visible = false;
//
// cb_templete
//
this.cb_templete.Location = new System.Drawing.Point(58, 4);
this.cb_templete.Name = "cb_templete";
this.cb_templete.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.cb_templete.Properties.DropDownRows = 8;
this.cb_templete.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
this.cb_templete.Size = new System.Drawing.Size(133, 20);
this.cb_templete.TabIndex = 19;
//
// lbl_templete
//
this.lbl_templete.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lbl_templete.Location = new System.Drawing.Point(5, 8);
this.lbl_templete.Name = "lbl_templete";
this.lbl_templete.Size = new System.Drawing.Size(48, 12);
this.lbl_templete.TabIndex = 16;
this.lbl_templete.Text = "选择模版";
//
// pl_input
//
this.pl_input.Controls.Add(this.cb_input);
this.pl_input.Controls.Add(this.txt_input);
this.pl_input.Controls.Add(this.labelControl2);
this.pl_input.Controls.Add(this.btn_input);
this.pl_input.Location = new System.Drawing.Point(3, 3);
this.pl_input.LookAndFeel.SkinName = "VS2010";
this.pl_input.LookAndFeel.Style = DevExpress.LookAndFeel.LookAndFeelStyle.Style3D;
this.pl_input.Name = "pl_input";
this.pl_input.Size = new System.Drawing.Size(280, 29);
this.pl_input.TabIndex = 27;
this.pl_input.Visible = false;
//
// cb_input
//
this.cb_input.Location = new System.Drawing.Point(58, 4);
this.cb_input.Name = "cb_input";
this.cb_input.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.cb_input.Properties.DropDownRows = 8;
this.cb_input.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
this.cb_input.Size = new System.Drawing.Size(79, 20);
this.cb_input.TabIndex = 19;
//
// txt_input
//
this.txt_input.Location = new System.Drawing.Point(149, 4);
this.txt_input.Name = "txt_input";
this.txt_input.Properties.Appearance.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txt_input.Properties.Appearance.Options.UseFont = true;
this.txt_input.Size = new System.Drawing.Size(98, 20);
this.txt_input.TabIndex = 18;
//
// labelControl2
//
this.labelControl2.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.labelControl2.Location = new System.Drawing.Point(5, 8);
this.labelControl2.Name = "labelControl2";
this.labelControl2.Size = new System.Drawing.Size(48, 12);
this.labelControl2.TabIndex = 16;
this.labelControl2.Text = "快速录入";
//
// btn_input
//
this.btn_input.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_input.Appearance.Options.UseFont = true;
this.btn_input.Location = new System.Drawing.Point(249, 4);
this.btn_input.Name = "btn_input";
this.btn_input.Size = new System.Drawing.Size(27, 21);
this.btn_input.TabIndex = 13;
this.btn_input.Text = ">>";
//
// dpbImport
//
this.dpbImport.AllowFocus = false;
this.dpbImport.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.dpbImport.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.dpbImport.Appearance.Options.UseFont = true;
this.dpbImport.DropDownArrowStyle = DevExpress.XtraEditors.DropDownArrowStyle.Show;
this.dpbImport.Location = new System.Drawing.Point(155, 7);
this.dpbImport.Name = "dpbImport";
this.dpbImport.Size = new System.Drawing.Size(74, 26);
this.dpbImport.TabIndex = 26;
this.dpbImport.Text = "导入导出";
//
// btnBillAdd
//
this.btnBillAdd.AllowFocus = false;
this.btnBillAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnBillAdd.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnBillAdd.Appearance.Options.UseFont = true;
this.btnBillAdd.Location = new System.Drawing.Point(307, 7);
this.btnBillAdd.Name = "btnBillAdd";
this.btnBillAdd.Size = new System.Drawing.Size(67, 26);
this.btnBillAdd.TabIndex = 19;
this.btnBillAdd.Text = "新建单据";
//
// btnBillApply
//
this.btnBillApply.AllowFocus = false;
this.btnBillApply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnBillApply.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnBillApply.Appearance.Options.UseFont = true;
this.btnBillApply.Location = new System.Drawing.Point(514, 7);
this.btnBillApply.Name = "btnBillApply";
this.btnBillApply.Size = new System.Drawing.Size(67, 26);
this.btnBillApply.TabIndex = 25;
this.btnBillApply.Text = "保存提交";
//
// dpCopyBill
//
this.dpCopyBill.AllowFocus = false;
this.dpCopyBill.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.dpCopyBill.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.dpCopyBill.Appearance.Options.UseFont = true;
this.dpCopyBill.DropDownArrowStyle = DevExpress.XtraEditors.DropDownArrowStyle.Show;
this.dpCopyBill.Location = new System.Drawing.Point(231, 7);
this.dpCopyBill.Name = "dpCopyBill";
this.dpCopyBill.Size = new System.Drawing.Size(74, 26);
this.dpCopyBill.TabIndex = 24;
this.dpCopyBill.Text = "复制单据";
//
// btnPrint
//
this.btnPrint.AllowFocus = false;
this.btnPrint.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnPrint.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnPrint.Appearance.Options.UseFont = true;
this.btnPrint.DropDownArrowStyle = DevExpress.XtraEditors.DropDownArrowStyle.Show;
this.btnPrint.Location = new System.Drawing.Point(583, 7);
this.btnPrint.Name = "btnPrint";
this.btnPrint.Size = new System.Drawing.Size(74, 26);
this.btnPrint.TabIndex = 23;
this.btnPrint.Text = "打印单据";
//
// dpbTools
//
this.dpbTools.AllowFocus = false;
this.dpbTools.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.dpbTools.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.dpbTools.Appearance.Options.UseFont = true;
this.dpbTools.DropDownArrowStyle = DevExpress.XtraEditors.DropDownArrowStyle.Show;
this.dpbTools.Location = new System.Drawing.Point(79, 7);
this.dpbTools.Name = "dpbTools";
this.dpbTools.Size = new System.Drawing.Size(74, 26);
this.dpbTools.TabIndex = 22;
this.dpbTools.Text = "常用工具";
//
// btnDelete
//
this.btnDelete.AllowFocus = false;
this.btnDelete.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnDelete.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnDelete.Appearance.Options.UseFont = true;
this.btnDelete.Location = new System.Drawing.Point(376, 7);
this.btnDelete.Name = "btnDelete";
this.btnDelete.Size = new System.Drawing.Size(67, 26);
this.btnDelete.TabIndex = 20;
this.btnDelete.Text = "删除记录";
//
// btnBillSave
//
this.btnBillSave.AllowFocus = false;
this.btnBillSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnBillSave.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnBillSave.Appearance.Options.UseFont = true;
this.btnBillSave.Location = new System.Drawing.Point(445, 7);
this.btnBillSave.Name = "btnBillSave";
this.btnBillSave.Size = new System.Drawing.Size(67, 26);
this.btnBillSave.TabIndex = 21;
this.btnBillSave.Text = "保存单据";
//
// pl_main_top
//
this.pl_main_top.Appearance.BackColor = System.Drawing.SystemColors.Control;
this.pl_main_top.Appearance.Options.UseBackColor = true;
this.pl_main_top.Controls.Add(this.pl_main_top_center);
this.pl_main_top.Controls.Add(this.pl_main_top_right);
this.pl_main_top.Controls.Add(this.pl_main_top_left);
this.pl_main_top.Dock = System.Windows.Forms.DockStyle.Top;
this.pl_main_top.Location = new System.Drawing.Point(2, 2);
this.pl_main_top.Name = "pl_main_top";
this.pl_main_top.Size = new System.Drawing.Size(662, 38);
this.pl_main_top.TabIndex = 0;
//
// pl_main_top_center
//
this.pl_main_top_center.Appearance.BackColor = System.Drawing.Color.Transparent;
this.pl_main_top_center.Appearance.Options.UseBackColor = true;
this.pl_main_top_center.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
this.pl_main_top_center.Controls.Add(this.lbTitle);
this.pl_main_top_center.Dock = System.Windows.Forms.DockStyle.Fill;
this.pl_main_top_center.Location = new System.Drawing.Point(162, 2);
this.pl_main_top_center.Name = "pl_main_top_center";
this.pl_main_top_center.Size = new System.Drawing.Size(315, 34);
this.pl_main_top_center.TabIndex = 3;
//
// lbTitle
//
this.lbTitle.BackColor = System.Drawing.Color.Transparent;
this.lbTitle.Dock = System.Windows.Forms.DockStyle.Fill;
this.lbTitle.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lbTitle.ForeColor = System.Drawing.Color.Blue;
this.lbTitle.Location = new System.Drawing.Point(0, 0);
this.lbTitle.Name = "lbTitle";
this.lbTitle.Size = new System.Drawing.Size(315, 34);
this.lbTitle.TabIndex = 1;
this.lbTitle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// pl_main_top_right
//
this.pl_main_top_right.Appearance.BackColor = System.Drawing.Color.Transparent;
this.pl_main_top_right.Appearance.Options.UseBackColor = true;
this.pl_main_top_right.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
this.pl_main_top_right.Controls.Add(this.lblOrderNo);
this.pl_main_top_right.Controls.Add(this.labelControl1);
this.pl_main_top_right.Dock = System.Windows.Forms.DockStyle.Right;
this.pl_main_top_right.Location = new System.Drawing.Point(477, 2);
this.pl_main_top_right.Name = "pl_main_top_right";
this.pl_main_top_right.Size = new System.Drawing.Size(183, 34);
this.pl_main_top_right.TabIndex = 2;
//
// lblOrderNo
//
this.lblOrderNo.Appearance.BackColor = System.Drawing.Color.Transparent;
this.lblOrderNo.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Underline);
this.lblOrderNo.Appearance.ForeColor = System.Drawing.Color.Blue;
this.lblOrderNo.Location = new System.Drawing.Point(67, 19);
this.lblOrderNo.Name = "lblOrderNo";
this.lblOrderNo.Size = new System.Drawing.Size(90, 12);
this.lblOrderNo.TabIndex = 1;
this.lblOrderNo.Text = "XTC170112010001";
//
// labelControl1
//
this.labelControl1.Appearance.BackColor = System.Drawing.Color.Transparent;
this.labelControl1.Appearance.Font = new System.Drawing.Font("宋体", 9F);
this.labelControl1.Appearance.ForeColor = System.Drawing.Color.Blue;
this.labelControl1.Location = new System.Drawing.Point(7, 19);
this.labelControl1.Name = "labelControl1";
this.labelControl1.Size = new System.Drawing.Size(54, 12);
this.labelControl1.TabIndex = 0;
this.labelControl1.Text = "单据编号:";
//
// pl_main_top_left
//
this.pl_main_top_left.Appearance.BackColor = System.Drawing.Color.Transparent;
this.pl_main_top_left.Appearance.Options.UseBackColor = true;
this.pl_main_top_left.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
this.pl_main_top_left.Controls.Add(this.pl_red);
this.pl_main_top_left.Controls.Add(this.pl_blue);
this.pl_main_top_left.Dock = System.Windows.Forms.DockStyle.Left;
this.pl_main_top_left.Location = new System.Drawing.Point(2, 2);
this.pl_main_top_left.Name = "pl_main_top_left";
this.pl_main_top_left.Size = new System.Drawing.Size(160, 34);
this.pl_main_top_left.TabIndex = 1;
//
// pl_red
//
this.pl_red.Appearance.BackColor = System.Drawing.Color.Transparent;
this.pl_red.Appearance.Options.UseBackColor = true;
this.pl_red.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
this.pl_red.Controls.Add(this.rdRed);
this.pl_red.Dock = System.Windows.Forms.DockStyle.Left;
this.pl_red.Location = new System.Drawing.Point(80, 0);
this.pl_red.Name = "pl_red";
this.pl_red.Size = new System.Drawing.Size(80, 34);
this.pl_red.TabIndex = 3;
//
// rdRed
//
this.rdRed.AutoSize = true;
this.rdRed.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.rdRed.ForeColor = System.Drawing.Color.Red;
this.rdRed.Location = new System.Drawing.Point(6, 12);
this.rdRed.Name = "rdRed";
this.rdRed.Size = new System.Drawing.Size(71, 16);
this.rdRed.TabIndex = 3;
this.rdRed.Text = "红字单据";
this.rdRed.UseVisualStyleBackColor = true;
//
// pl_blue
//
this.pl_blue.Appearance.BackColor = System.Drawing.Color.Transparent;
this.pl_blue.Appearance.Options.UseBackColor = true;
this.pl_blue.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
this.pl_blue.Controls.Add(this.rdBlue);
this.pl_blue.Dock = System.Windows.Forms.DockStyle.Left;
this.pl_blue.Location = new System.Drawing.Point(0, 0);
this.pl_blue.Name = "pl_blue";
this.pl_blue.Size = new System.Drawing.Size(80, 34);
this.pl_blue.TabIndex = 2;
//
// rdBlue
//
this.rdBlue.AutoSize = true;
this.rdBlue.Checked = true;
this.rdBlue.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.rdBlue.ForeColor = System.Drawing.Color.Blue;
this.rdBlue.Location = new System.Drawing.Point(7, 12);
this.rdBlue.Name = "rdBlue";
this.rdBlue.Size = new System.Drawing.Size(71, 16);
this.rdBlue.TabIndex = 2;
this.rdBlue.TabStop = true;
this.rdBlue.Text = "蓝字单据";
this.rdBlue.UseVisualStyleBackColor = true;
//
// FrmBillInfo
//
this.ClientSize = new System.Drawing.Size(666, 518);
this.Controls.Add(this.pl_main);
this.Name = "FrmBillInfo";
((System.ComponentModel.ISupportInitialize)(this.pl_main)).EndInit();
this.pl_main.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pl_main_center)).EndInit();
this.pl_main_center.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pl_main_center_detail)).EndInit();
this.pl_main_center_detail.ResumeLayout(false);
this.pl_main_center_master.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pl_treeview_detault_search)).EndInit();
this.pl_treeview_detault_search.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.panelControl4)).EndInit();
this.panelControl4.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.textEdit1.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.panelControl3)).EndInit();
this.panelControl3.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pl_main_bottom)).EndInit();
this.pl_main_bottom.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pl_templete)).EndInit();
this.pl_templete.ResumeLayout(false);
this.pl_templete.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.cb_templete.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pl_input)).EndInit();
this.pl_input.ResumeLayout(false);
this.pl_input.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.cb_input.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txt_input.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pl_main_top)).EndInit();
this.pl_main_top.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pl_main_top_center)).EndInit();
this.pl_main_top_center.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pl_main_top_right)).EndInit();
this.pl_main_top_right.ResumeLayout(false);
this.pl_main_top_right.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pl_main_top_left)).EndInit();
this.pl_main_top_left.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pl_red)).EndInit();
this.pl_red.ResumeLayout(false);
this.pl_red.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pl_blue)).EndInit();
this.pl_blue.ResumeLayout(false);
this.pl_blue.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private DevExpress.XtraEditors.PanelControl pl_main;
private DevExpress.XtraEditors.PanelControl pl_main_center;
private DevExpress.XtraEditors.PanelControl pl_main_center_detail;
private Control.GridControlEx gcMain;
private DevExpress.XtraEditors.XtraScrollableControl pl_main_center_master;
private DevExpress.XtraEditors.PanelControl pl_treeview_detault_search;
private DevExpress.XtraEditors.PanelControl panelControl4;
private DevExpress.XtraEditors.TextEdit textEdit1;
private Control.LabelComboxEdit lceCombobox;
private DevExpress.XtraEditors.PanelControl panelControl3;
private DevExpress.XtraEditors.SimpleButton btnTreeSearch;
public DevExpress.XtraEditors.PanelControl pl_main_bottom;
private DevExpress.XtraEditors.DropDownButton dbpFP;
private DevExpress.XtraEditors.SimpleButton btnRefresh;
private DevExpress.XtraEditors.SimpleButton btnHiding;
private DevExpress.XtraEditors.SimpleButton btnHelp;
private DevExpress.XtraEditors.PanelControl pl_templete;
private DevExpress.XtraEditors.ComboBoxEdit cb_templete;
private DevExpress.XtraEditors.LabelControl lbl_templete;
private DevExpress.XtraEditors.PanelControl pl_input;
private DevExpress.XtraEditors.ComboBoxEdit cb_input;
private DevExpress.XtraEditors.TextEdit txt_input;
private DevExpress.XtraEditors.LabelControl labelControl2;
private DevExpress.XtraEditors.SimpleButton btn_input;
private DevExpress.XtraEditors.DropDownButton dpbImport;
private DevExpress.XtraEditors.SimpleButton btnBillAdd;
private DevExpress.XtraEditors.SimpleButton btnBillApply;
private D
+331
View File
@@ -0,0 +1,331 @@
using DevExpress.XtraGrid.Columns;
using DevExpress.XtraGrid.Views.Grid;
using DevExpress.XtraTreeList.Columns;
using Lskj.Business;
using Lskj.Business.Impl;
using Lskj.Control;
using Lskj.Control.Model;
using Lskj.Data;
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.PubBomImport
{
public partial class FrmBillInfo : Form
{
public DynamicBomImport Model;
public DynamicBillModel SysModel;
public BillModel billModel;
public MyControl ControlObj;
/// <summary>
/// 单据明细列
/// </summary>
private DataTable _detailColumns;
private string guidField = "xxxxx_guid";
public GridView GcMainView
{
get { return gcMain.GridView; }
}
public FrmBillInfo()
{
InitializeComponent();
}
public void OnLoad(DynamicBomImport mainModel)
{
Model = mainModel;
GetControlData(mainModel);
InitControlView();
SetControlData();
}
public void GetControlData(DynamicBomImport Model)
{
string[] args = new[] { Model.FormText, Model.UserId, Model.UserName, Model.Privilege, Model.ModuleCode, "", Model.ModuleCode };
SysModel = new DynamicBillModel(args);
SysModel.BillMasterSql = Model.BillMasterSql;
SysModel.BillDetailSql = "";
DataRow modelRow = BillImpl.GetBillInfo(SysModel.ModuleCode);//获取单个模块信息
billModel = new BillModel(modelRow);//初始化类的新实例。
if (billModel != null)
{
billModel.TypeName = string.IsNullOrEmpty(SysModel.BillMasterSql) ? SysModel.FormText : billModel.TypeName;// 模块名称
string masterPreFix = BaseImpl.GetColumnPrefix(billModel.MasterTable);// 主表列前缀
billModel.MasterPreFix = masterPreFix;
string detailPreFix = BaseImpl.GetColumnPrefix(billModel.DetailTable);// 明细表列前缀
billModel.DetailPreFix = detailPreFix;
billModel.DetailOrderField = billModel.DetailPreFix + "lsidx_id";// 单据来源id
if (SystemInfo.Instance.IsNotBillDetailOrder)//禁用排序
{
billModel.DetailOrderField = string.Empty;
}
}
DataRow menuRow = BaseImpl.GetMenuConfigTab(SysModel.ModuleId);//获取菜单其他配置
if (menuRow != null)
{
billModel.BillSourceIds = menuRow.Table.Columns.Contains("BillSourceIds") ? (menuRow["BillSourceIds"] + "").Trim(',') : string.Empty;
billModel.BillFlag = menuRow.Table.Columns.Contains("BillFlag") && !string.IsNullOrEmpty(menuRow["BillFlag"] + "") ? Convert.ToInt32(menuRow["BillFlag"] + "") : -1;
}
DataTable controls = BaseModuleImpl.GetControlLocation(billModel.FormKey, SysModel.ModuleCode);
DataTable groups = BaseModuleImpl.GetAddGroupData(billModel.FormKey);//获取主信息分组数据
ControlObj = new MyControl() { Model = SysModel };//主表控件
ControlObj.OtherParams = SysModel.OtherParams();
ControlObj.InitControl(controls, this.pl_main_center_master, groups);
if (SysModel.GridEnumObj == GridEnum.BandedGridView || billModel.AutoMultiHeader == 1)
{
this.pl_main_center_detail.Controls.Clear();
this.gcMain = new BandedGridControlEx();
this.gcMain.Model = SysModel;
this.gcMain.Dock = DockStyle.Fill;
this.pl_main_center_detail.Controls.Add(this.gcMain);
}
_detailColumns = BillImpl.GetDetailColumns(SysModel.ModuleCode);//初始化单据明细列
if (SysModel.GridEnumObj == GridEnum.BandedGridView || billModel.AutoMultiHeader == 1)
{
//多表头sql要增加一个判断,否则多表头会出错
_detailColumns = BillImpl.GetDetailColumns(SysModel.ModuleCode, true);//初始化单据明细列
}
this.gcMain.DisableFieldSources = billModel.DisableFieldSources;
this.gcMain.Model = SysModel;
this.gcMain.ParentControl = ControlObj;//把主表控件赋给 单据主表控件、基础档案查询条件控件等等
this.gcMain.SetEditColumns(_detailColumns, GridCustomColumnStruct.BillDetailGridView + billModel.FormKey);//设置可编辑列
}
public void InitControlView()
{
}
public void SetControlData()
{
}
public void InitializeHeader(DataRow parentRow)
{
// 新增
if (!string.IsNullOrEmpty(SysModel.BillMasterSql))
{
string billMasterSql = SysModel.BillMasterSql;
billMasterSql = ReplaceHelper.ReplaceRowParam(parentRow, billMasterSql);
// 处理单据表头数据
DataRow row = BillImpl.GetDataRowResult(billMasterSql);
if (row != null)
{
ControlObj.SetAllControlValue(row, true);
}
}
}
public bool BillSave(int comfirm = 0, bool canTipMsg = true)
{
bool saveResult = false;
if (ControlObj.VerifyNull())
{
// 保存之前先进行表格更新
if (billModel.DetailTreeTable)
{
(this.gcMain as TreeGridControlEx).TreeListObj.PostEditor();
}
else
{
this.gcMain.GridView.PostEditor();
this.gcMain.GridView.UpdateCurrentRow();
}
try
{
if (this.gcMain.VerifyNull())
{
if (this.gcMain.RepeatedVerificationNames.Count > 0 && this.gcMain.VerifyDuplicateColumns())
{
//MessageUtil.Show("表格中数据内容重复,保存失败!");
return saveResult;
}
string billNo = this.lblOrderNo.Text.Trim();
string detailGuid = Guid.NewGuid().ToString();
string masterSql = GetAddRecord(ref billNo);
string detailSql = GetDetailRecord(detailGuid, billNo).ToString();
// 检查单据头数据合法性
if (string.IsNullOrEmpty(masterSql)) return false;
// 验证明细合法性
if (string.IsNullOrEmpty(detailSql) && !billModel.SaveNullDetail)
{
MessageUtil.Show(ResourceKeys.BillDetailIsNotNull);
return false;
}
string tipMsg = string.Empty;
int result = BillImpl.BillSave(masterSql, detailSql, billModel.DetailTable, ref billNo, detailGuid, billModel.BillSeq, billModel.SaveState ? 2 : 1, comfirm, out tipMsg, 0, billModel.NewVer);
if (result == 1)
{
saveResult = true;
}
}
}
catch (Exception ex)
{
MessageUtil.Show(ex.Message);
}
}
return saveResult;
}
private string GetAddRecord(ref string parmaryValue)
{
if (billModel.NewVer == 0)
{
// 检查当前的单据号是否已被占用.
string newBillNo = BillImpl.GetBillNo(billModel.BillSeq);
if (!parmaryValue.Equals(newBillNo))
{
if (MessageUtil.Show(ResourceKeys.BillRecordRepeat, MessageBoxButtons.YesNo) == DialogResult.No)
{
return string.Empty;
}
else
{
this.lblOrderNo.Text = newBillNo;
parmaryValue = newBillNo;
}
}
}
StringBuilder fieldBuilder = new StringBuilder();
StringBuilder valueBuilder = new StringBuilder();
DataTable DetailedProperties = BaseImpl.GetDataTableResult(string.Format("select COLUMN_NAME,DATA_TYPE,CHARACTER_MAXIMUM_LENGTH from information_schema.columns where table_name = '{0}'", billModel.MasterTable));
string errorMessage = string.Empty;//数据不符合数据库规范的信息
foreach (ControlModel model in this.ControlObj.ControlModels)
{
if (!model.IsSave ||
model.FieldName.Equals(billModel.PrimaryKey, StringComparison.OrdinalIgnoreCase) ||
model.FieldName.Equals(billModel.RtagidKey, StringComparison.OrdinalIgnoreCase) ||
model.FieldType == ControlType.LabPic ||
model.FieldType == ControlType.LabPicEx)
continue;
string fieldValue = this.ControlObj.GetControlValue(model);
if (SystemInfo.Instance.TrimWhiteSpace)
fieldValue = fieldValue.Trim();
if (fieldValue == "****") continue;
errorMessage = errorMessage + DatabaseFormatJudgment.SaveOrModifyBalidation(DetailedProperties, model, fieldValue);
if (string.IsNullOrEmpty(fieldValue) && model.Isintordecimal) fieldValue = "0";//数值保存时为空的话默认保存为0;
fieldBuilder.Append(model.FieldName + ",");
valueBuilder.Append(string.IsNullOrEmpty(fieldValue) ? this.ControlObj.GetNullValue(model) : string.Format("N'{0}',", fieldValue));
}
// 增加主键
fieldBuilder.Append(billModel.PrimaryKey);
valueBuilder.Append("N'" + parmaryValue + "'");
// 增加红蓝字单标记
fieldBuilder.Append("," + billModel.RtagidKey);
valueBuilder.Append(",N'" + (rdRed.Checked ? 1 : 0) + "'");
return string.Format("insert into {0}({1}) values ({2})", billModel.MasterTable, fieldBuilder.ToString().TrimEnd(','), valueBuilder.ToString().TrimEnd(','));
}
private StringBuilder GetDetailRecord(string guid, string billNo)
{
// 构造明细
StringBuilder detailBuilder = new StringBuilder();
DataTable detailTable = this.gcMain.GridControl.DataSourceTable().TrimDeleteRows();
if (billModel.DetailTreeTable)
{
detailTable = ((this.gcMain as TreeGridControlEx).TreeListObj.DataSource as DataTable).TrimDeleteRows();
}
DataTable DetailedProperties = BaseImpl.GetDataTableResult(string.Format("select COLUMN_NAME,DATA_TYPE,CHARACTER_MAXIMUM_LENGTH from information_schema.columns where table_name = '{0}'", billModel.DetailTable + "_temp"));//单据明细性表
if (detailTable.Rows.Count > 0)
{
int lineNumber = 1;
DataTable BillColumns = BaseImpl.GetDataTableResult(string.Format("select * from {0} where 1<>1", billModel.DetailTable));
DataTable BillTempColumns = BaseImpl.GetDataTableResult(string.Format("select * from {0} where 1<>1", billModel.DetailTable + "_temp"));
foreach (DataRow dataRow in detailTable.Rows)
{
string errorMessage = string.Empty;//数据不符合数据库规范的信息
StringBuilder fields = new StringBuilder();
StringBuilder values = new StringBuilder();
string detailSql = @"insert into " + billModel.DetailTable + "_temp" + "({0}) values({1})";
fields.Append("sysstr,");
values.Append("'" + guid + "',");
foreach (DataColumn item in BillColumns.Columns)
{
if (item.ColumnName.Equals(guidField) || item.ColumnName.Equals(ERPInfo.Instance.isAddRows)) continue;
if (!BillTempColumns.Columns.Contains(item.ColumnName))
{
string type = "varchar(100)";
if (item.DataType == typeof(DateTime))
{
type = "datetime";
}
BaseImpl.ExecSqlValue(string.Format("alter table {0} add {1} {2}", billModel.DetailTable + "_temp", item.ColumnName, type));
}
if (billModel.DetailTreeTable)
{
TreeListColumn[] TreeListColumns = (this.gcMain as TreeGridControlEx).TreeListObj.Columns.Cast<TreeListColumn>().Where(x => x.FieldName.Equals(item.Caption, StringComparison.OrdinalIgnoreCase)).ToArray();
if (TreeListColumns.Count() == 0 && item.Caption.Equals(billModel.PrimaryDetailKey))
{
string primaryValues = dataRow[billModel.PrimaryDetailKey] + "";
if (!string.IsNullOrWhiteSpace(primaryValues))
{
fields.Append(item.ColumnName + ",");
values.Append("N'" + primaryValues.Replace("'", "''") + "',");
}
}
if (TreeListColumns.Count() == 0) continue;
}
else
{
GridColumn[] gridColumns = gcMain.GridView.Columns.Cast<GridColumn>().Where(x => x.FieldName.Equals(item.Caption, StringComparison.OrdinalIgnoreCase)).ToArray();
if (gridColumns.Count() == 0 && item.Caption.Equals(billModel.PrimaryDetailKey))
{
string primaryValues = dataRow[billModel.PrimaryDetailKey] + "";
if (!string.IsNullOrWhiteSpace(primaryValues))
{
fields.Append(item.ColumnName + ",");
values.Append("N'" + primaryValues.Replace("'", "''") + "',");
}
}
if (gridColumns.Count() == 0) continue;
}
fields.Append(item.ColumnName + ",");
string fieldValue = dataRow.Table.Columns.Contains(item.ColumnName) ? dataRow[item.ColumnName] + "" : string.Empty;
//if (SystemInfo.Instance.TrimWhiteSpace)
// fieldValue = fieldValue.Trim();
if (item.ColumnName.Equals(billModel.PrimaryDetailKey, StringComparison.OrdinalIgnoreCase))
fieldValue = billNo;
if (!string.IsNullOrWhiteSpace(fieldValue))
{
values.Append(item.DataType == typeof(DateTime) ? "'" + Convert.ToDateTime(fieldValue).ToString("yyyy-MM-dd HH:mm:ss") + "'," : fieldValue.Contains("'") ? "N'" + fieldValue.Replace("'", "''") + "'," : "N'" + fieldValue + "',");
}
else
{
if (item.DataType == typeof(Decimal) ||
item.DataType == typeof(Double) ||
item.DataType == typeof(Int16) ||
item.DataType == typeof(Int32) ||
item.DataType == typeof(Int64))
values.Append("0,");
else if (item.DataType == typeof(DateTime))
{
values.Append("NULL,");
}
else
{
values.Append("'',");
}
}
errorMessage = errorMessage + DatabaseFormatJudgment.SaveOrModifyBalidation(_detailColumns, DetailedProperties, dataRow, item, fieldValue);
}
detailBuilder.AppendFormat(detailSql, fields.ToString().Trim(','), values.ToString().Trim(','));
if (!string.IsNullOrWhiteSpace(errorMessage)) errorMessage = "第" + lineNumber + "行:" + errorMessage;
lineNumber++;
}
}
return detailBuilder;
}
private void SetBillStatus(DataRow rowItem)
{
// 单据为新增状态
this.dbpFP.Enabled = this.btnDelete.Enabled = this.btnBillSave.Enabled = this.btnBillApply.Enabled = true;
this.lbTitle.Text = billModel.TypeName + "(新增)";
this.lblOrderNo.Text = BillImpl.GetBillNo(billModel.BillSeq);
this.cb_input.Enabled = this.btn_input.Enabled = this.txt_input.Enabled = true;
this.cb_templete.Enabled = true;
this.billModel.SaveState = false;
this.ControlObj.SetReadOnlyAllControl(false);
this.rdBlue.Enabled = this.rdRed.Enabled = true;
// 通过右键菜单打开单据,假如明细有数据则在初始化时使用传入数据.
@@ -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>
+290
View File
@@ -0,0 +1,290 @@
namespace Lskj.PubBomImport
{
partial class FrmMain
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.btnImport = new DevExpress.XtraEditors.SimpleButton();
this.btnRead = new DevExpress.XtraEditors.SimpleButton();
this.pl_bottom = new DevExpress.XtraEditors.PanelControl();
this.btnCancel = new DevExpress.XtraEditors.SimpleButton();
this.btnOk = new DevExpress.XtraEditors.SimpleButton();
this.pl_cond = new DevExpress.XtraEditors.PanelControl();
this.condTxtEdit = new DevExpress.XtraEditors.TextEdit();
this.lb_cond = new System.Windows.Forms.Label();
this.pl_purview = new DevExpress.XtraEditors.PanelControl();
this.purview_Mulit = new Lskj.Control.LabelMultiAutoTextEdit();
this.lb_purview = new System.Windows.Forms.Label();
this.tips = new DevExpress.XtraEditors.PanelControl();
this.tipsEdit = new DevExpress.XtraEditors.TextEdit();
this.splitMainContainer = new DevExpress.XtraEditors.SplitContainerControl();
this.gcMain = new Lskj.Control.GridControlEx();
this.gc_Right = new Lskj.Control.GridControlEx();
((System.ComponentModel.ISupportInitialize)(this.pl_bottom)).BeginInit();
this.pl_bottom.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pl_cond)).BeginInit();
this.pl_cond.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.condTxtEdit.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pl_purview)).BeginInit();
this.pl_purview.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.tips)).BeginInit();
this.tips.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.tipsEdit.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.splitMainContainer)).BeginInit();
this.splitMainContainer.SuspendLayout();
this.SuspendLayout();
//
// btnImport
//
this.btnImport.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnImport.Location = new System.Drawing.Point(764, 10);
this.btnImport.Margin = new System.Windows.Forms.Padding(4);
this.btnImport.Name = "btnImport";
this.btnImport.Size = new System.Drawing.Size(97, 31);
this.btnImport.TabIndex = 11;
this.btnImport.Text = "导入数据";
//
// btnRead
//
this.btnRead.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnRead.Location = new System.Drawing.Point(656, 10);
this.btnRead.Margin = new System.Windows.Forms.Padding(4);
this.btnRead.Name = "btnRead";
this.btnRead.Size = new System.Drawing.Size(97, 31);
this.btnRead.TabIndex = 10;
this.btnRead.Text = "读取Excel";
//
// pl_bottom
//
this.pl_bottom.Appearance.BackColor = System.Drawing.Color.Transparent;
this.pl_bottom.Appearance.Options.UseBackColor = true;
this.pl_bottom.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
this.pl_bottom.Controls.Add(this.btnImport);
this.pl_bottom.Controls.Add(this.btnCancel);
this.pl_bottom.Controls.Add(this.btnRead);
this.pl_bottom.Controls.Add(this.btnOk);
this.pl_bottom.Dock = System.Windows.Forms.DockStyle.Bottom;
this.pl_bottom.Location = new System.Drawing.Point(0, 549);
this.pl_bottom.Margin = new System.Windows.Forms.Padding(4);
this.pl_bottom.Name = "pl_bottom";
this.pl_bottom.Size = new System.Drawing.Size(872, 50);
this.pl_bottom.TabIndex = 2;
//
// btnCancel
//
this.btnCancel.Location = new System.Drawing.Point(120, 10);
this.btnCancel.Margin = new System.Windows.Forms.Padding(4);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(97, 31);
this.btnCancel.TabIndex = 11;
this.btnCancel.Text = "清除绑定";
//
// btnOk
//
this.btnOk.Location = new System.Drawing.Point(12, 10);
this.btnOk.Margin = new System.Windows.Forms.Padding(4);
this.btnOk.Name = "btnOk";
this.btnOk.Size = new System.Drawing.Size(97, 31);
this.btnOk.TabIndex = 10;
this.btnOk.Text = "保存绑定";
//
// pl_cond
//
this.pl_cond.Appearance.BackColor = System.Drawing.Color.White;
this.pl_cond.Appearance.Options.UseBackColor = true;
this.pl_cond.Controls.Add(this.condTxtEdit);
this.pl_cond.Controls.Add(this.lb_cond);
this.pl_cond.Dock = System.Windows.Forms.DockStyle.Top;
this.pl_cond.Location = new System.Drawing.Point(0, 0);
this.pl_cond.Margin = new System.Windows.Forms.Padding(4);
this.pl_cond.Name = "pl_cond";
this.pl_cond.Size = new System.Drawing.Size(872, 42);
this.pl_cond.TabIndex = 12;
//
// condTxtEdit
//
this.condTxtEdit.Dock = System.Windows.Forms.DockStyle.Fill;
this.condTxtEdit.Location = new System.Drawing.Point(87, 2);
this.condTxtEdit.Name = "condTxtEdit";
this.condTxtEdit.Properties.Appearance.BackColor = System.Drawing.Color.White;
this.condTxtEdit.Properties.Appearance.Options.UseBackColor = true;
this.condTxtEdit.Properties.AutoHeight = false;
this.condTxtEdit.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
this.condTxtEdit.Size = new System.Drawing.Size(783, 38);
this.condTxtEdit.TabIndex = 5;
//
// lb_cond
//
this.lb_cond.BackColor = System.Drawing.Color.White;
this.lb_cond.Dock = System.Windows.Forms.DockStyle.Left;
this.lb_cond.Location = new System.Drawing.Point(2, 2);
this.lb_cond.Name = "lb_cond";
this.lb_cond.Size = new System.Drawing.Size(85, 38);
this.lb_cond.TabIndex = 3;
this.lb_cond.Text = "筛选条件:";
this.lb_cond.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// pl_purview
//
this.pl_purview.Appearance.BackColor = System.Drawing.Color.White;
this.pl_purview.Appearance.Options.UseBackColor = true;
this.pl_purview.Controls.Add(this.purview_Mulit);
this.pl_purview.Controls.Add(this.lb_purview);
this.pl_purview.Cursor = System.Windows.Forms.Cursors.Default;
this.pl_purview.Dock = System.Windows.Forms.DockStyle.Top;
this.pl_purview.Location = new System.Drawing.Point(0, 42);
this.pl_purview.Margin = new System.Windows.Forms.Padding(4);
this.pl_purview.Name = "pl_purview";
this.pl_purview.Size = new System.Drawing.Size(872, 21);
this.pl_purview.TabIndex = 13;
//
// purview_Mulit
//
this.purview_Mulit.BackColor = System.Drawing.Color.White;
this.purview_Mulit.Dock = System.Windows.Forms.DockStyle.Fill;
this.purview_Mulit.EditText = "";
this.purview_Mulit.FontSize = 0F;
this.purview_Mulit.LabelText = "名称";
this.purview_Mulit.Location = new System.Drawing.Point(135, 2);
this.purview_Mulit.Margin = new System.Windows.Forms.Padding(4);
this.purview_Mulit.Model = null;
this.purview_Mulit.Name = "purview_Mulit";
this.purview_Mulit.NullText = "";
this.purview_Mulit.ReadOnly = false;
this.purview_Mulit.Required = false;
this.purview_Mulit.Size = new System.Drawing.Size(735, 17);
this.purview_Mulit.TabIndex = 4;
this.purview_Mulit.TextBoxProhibition = false;
//
// lb_purview
//
this.lb_purview.BackColor = System.Drawing.Color.White;
this.lb_purview.Dock = System.Windows.Forms.DockStyle.Left;
this.lb_purview.Location = new System.Drawing.Point(2, 2);
this.lb_purview.Name = "lb_purview";
this.lb_purview.Size = new System.Drawing.Size(133, 17);
this.lb_purview.TabIndex = 3;
this.lb_purview.Text = "条件可编辑人员:";
this.lb_purview.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// tips
//
this.tips.Appearance.BackColor = System.Drawing.Color.White;
this.tips.Appearance.Options.UseBackColor = true;
this.tips.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Office2003;
this.tips.Controls.Add(this.tipsEdit);
this.tips.Dock = System.Windows.Forms.DockStyle.Top;
this.tips.Location = new System.Drawing.Point(0, 63);
this.tips.Margin = new System.Windows.Forms.Padding(4);
this.tips.Name = "tips";
this.tips.Size = new System.Drawing.Size(872, 42);
this.tips.TabIndex = 14;
//
// tipsEdit
//
this.tipsEdit.Dock = System.Windows.Forms.DockStyle.Fill;
this.tipsEdit.EditValue = "请导入Excel模板";
this.tipsEdit.Location = new System.Drawing.Point(2, 2);
this.tipsEdit.Name = "tipsEdit";
this.tipsEdit.Properties.Appearance.BackColor = System.Drawing.Color.White;
this.tipsEdit.Properties.Appearance.ForeColor = System.Drawing.Color.Red;
this.tipsEdit.Properties.Appearance.Options.UseBackColor = true;
this.tipsEdit.Properties.Appearance.Options.UseForeColor = true;
this.tipsEdit.Properties.AutoHeight = false;
this.tipsEdit.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
this.tipsEdit.Properties.ReadOnly = true;
this.tipsEdit.Size = new System.Drawing.Size(868, 38);
this.tipsEdit.TabIndex = 6;
//
// splitMainContainer
//
this.splitMainContainer.Appearance.BackColor = System.Drawing.Color.Transparent;
this.splitMainContainer.Appearance.Options.UseBackColor = true;
this.splitMainContainer.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Default;
this.splitMainContainer.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitMainContainer.Location = new System.Drawing.Point(0, 105);
this.splitMainContainer.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.splitMainContainer.Name = "splitMainContainer";
this.splitMainContainer.Panel1.Controls.Add(this.gcMain);
this.splitMainContainer.Panel1.Text = "Panel1";
this.splitMainContainer.Panel2.Controls.Add(this.gc_Right);
this.splitMainContainer.Panel2.Text = "Panel2";
this.splitMainContainer.Size = new System.Drawing.Size(872, 444);
this.splitMainContainer.SplitterPosition = 500;
this.splitMainContainer.TabIndex = 17;
this.splitMainContainer.Text = "splitContainerControl1";
//
// gcMain
//
this.gcMain.AdapterObj = null;
this.gcMain.Dock = System.Windows.Forms.DockStyle.Fill;
this.gcMain.Location = new System.Drawing.Point(0, 0);
this.gcMain.Margin = new System.Windows.Forms.Padding(4);
this.gcMain.Name = "gcMain";
this.gcMain.SiftEnumObj = Lskj.Control.GridControlEx.HeaderSiftEnum.Sum;
this.gcMain.Size = new System.Drawing.Size(500, 444);
this.gcMain.TabIndex = 16;
//
// gc_Right
//
this.gc_Right.AdapterObj = null;
this.gc_Right.Dock = System.Windows.Forms.DockStyle.Fill;
this.gc_Right.Location = new System.Drawing.Point(0, 0);
this.gc_Right.Margin = new System.Windows.Forms.Padding(4);
this.gc_Right.Name = "gc_Right";
this.gc_Right.SiftEnumObj = Lskj.Control.GridControlEx.HeaderSiftEnum.Sum;
this.gc_Right.Size = new System.Drawing.Size(367, 444);
this.gc_Right.TabIndex = 18;
//
// FrmMain
//
this.Appearance.BackColor = System.Drawing.SystemColors.Control;
this.Appearance.Options.UseBackColor = true;
this.Appearance.Options.UseFont = true;
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(872, 599);
this.Controls.Add(this.splitMainContainer);
this.Controls.Add(this.tips);
this.Controls.Add(this.pl_purview);
this.Controls.Add(this.pl_cond);
this.Controls.Add(this.pl_bottom);
this.Name = "FrmMain";
this.Text = "表格导入";
((System.ComponentModel.ISupportInitialize)(this.pl_bottom)).EndInit();
this.pl_bottom.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pl_cond)).EndInit();
this.pl_cond.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.condTxtEdit.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pl_purview)).EndInit();
this.pl_purview.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.tips)).EndInit();
this.tips.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.tipsEdit.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.splitMainContainer)).EndInit();
this.splitMainContainer.ResumeLayout(false);
this.ResumeLayout(f
File diff suppressed because it is too large Load Diff
+120
View File
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
@@ -0,0 +1,118 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{8C507C31-8C19-46C9-82F8-85DDCAE69190}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>Lskj.PubBomImport</RootNamespace>
<AssemblyName>Lskj.PubBomImport</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\Debug\Lib\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="DevExpress.Data.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.Utils.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.XtraEditors.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.XtraGrid.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraTreeList.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="Newtonsoft.Json, Version=13.0.1.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>D:\工作\lserp_cs_6.0\引用DLL\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="NPOI">
<HintPath>..\..\..\引用DLL\NPOI.dll</HintPath>
</Reference>
<Reference Include="NPOI.OOXML">
<HintPath>..\..\..\引用DLL\NPOI.OOXML.dll</HintPath>
</Reference>
<Reference Include="NPOI.OpenXml4Net">
<HintPath>D:\工作\lserp_cs_6.0\引用DLL\NPOI.OpenXml4Net.dll</HintPath>
</Reference>
<Reference Include="NPOI.OpenXmlFormats">
<HintPath>D:\工作\lserp_cs_6.0\引用DLL\NPOI.OpenXmlFormats.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="DllBaseClass.cs" />
<Compile Include="FrmBillInfo.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmBillInfo.Designer.cs">
<DependentUpon>FrmBillInfo.cs</DependentUpon>
</Compile>
<Compile Include="FrmMain.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmMain.Designer.cs">
<DependentUpon>FrmMain.cs</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Service Include="{94E38DFF-614B-4cbd-B67C-F211BB35CE8B}" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="FrmBillInfo.resx">
<DependentUpon>FrmBillInfo.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmMain.resx">
<DependentUpon>FrmMain.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\licenses.licx" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Lskj.Business\Lskj.Business.csproj">
<Project>{7EAFCCC2-A18F-49E9-85C6-A984966CFD01}</Project>
<Name>Lskj.Business</Name>
</ProjectReference>
<ProjectReference Include="..\Lskj.Control\Lskj.Control.csproj">
<Project>{447CDC40-659F-4CCA-9ED6-8E818B4CF8BF}</Project>
<Name>Lskj.Control</Name>
</ProjectReference>
<ProjectReference Include="..\Lskj.Core\Lskj.Core.csproj">
<Project>{2A1BE6AC-1077-491B-A754-C5822FE8121E}</Project>
<Name>Lskj.Core</Name>
</ProjectReference>
<ProjectReference Include="..\Lskj.Data\Lskj.Data.csproj">
<Project>{308B9B18-9BE2-495C-9C64-EED81D567813}</Project>
<Name>Lskj.Data</Name>
</ProjectReference>
<ProjectReference Include="..\Lskj.Model\Lskj.Model.csproj">
<Project>{52BC40E0-C0C6-4F78-996B-CAE028D209CA}</Project>
<Name>Lskj.Model</Name>
</ProjectReference>
<ProjectReference Include="..\Lskj.Util\Lskj.Util.csproj">
<Project>{A51BF642-6543-4DE3-8948-83F558B72BD4}</Project>
<Name>Lskj.Util</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
@@ -0,0 +1,9 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("Lskj.PubBomImport")]
[assembly: AssemblyDe