基线 SVN r240

SVN-Revision: r240
This commit is contained in:
cyf
2025-02-06 06:46:06 +00:00
commit ab56a9bcf7
5317 changed files with 902274 additions and 0 deletions
@@ -0,0 +1,42 @@
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 Lskj.Business.Impl;
namespace Lskj.PubVoucherPush
{
/// <summary>
/// c#库被调用统一接口类
/// </summary>
public sealed class DllBaseClass : IForm
{
public DllBaseClass()
{
}
public DllBaseClass(string[] obj)
{
try
{
FrmMain main = new FrmMain();
DynamicVoucher sysModel = new DynamicVoucher(obj);
SubForm = main;
main.SysModel = sysModel;
}
catch (Exception ex)
{
LogUtil.WriteError("Lskj.PubVoucherPush.dll--参数错误-->" + obj.ToString(), ex);
}
}
/// <summary>
/// 窗口
/// </summary>
public Form SubForm { get; set; }
}
}
+336
View File
@@ -0,0 +1,336 @@
namespace Lskj.PubVoucherPush
{
partial class FrmMain
{
/// <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_top = new DevExpress.XtraEditors.PanelControl();
this.GroupRightData = new System.Windows.Forms.GroupBox();
this.pzz = new Lskj.Control.LabelComboxEdit();
this.fjs = new Lskj.Control.LabelTextEdit();
this.sfxjhd = new Lskj.Control.LabelCheckEdit();
this.tbhxls = new Lskj.Control.LabelCheckEdit();
this.dffmhb = new Lskj.Control.LabelCheckEdit();
this.jffmhb = new Lskj.Control.LabelCheckEdit();
this.dfkmhb = new Lskj.Control.LabelCheckEdit();
this.jfkmhb = new Lskj.Control.LabelCheckEdit();
this.btnCondSearch = new DevExpress.XtraEditors.SimpleButton();
this.pl_mian = new DevExpress.XtraEditors.PanelControl();
this.splitMain = new DevExpress.XtraEditors.SplitContainerControl();
this.gridLeft = new Lskj.Control.GridControlEx();
this.xtc_container = new DevExpress.XtraTab.XtraTabControl();
this.zdrq = new Lskj.Control.LabelDateEdit();
((System.ComponentModel.ISupportInitialize)(this.pl_top)).BeginInit();
this.pl_top.SuspendLayout();
this.GroupRightData.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pl_mian)).BeginInit();
this.pl_mian.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitMain)).BeginInit();
this.splitMain.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.xtc_container)).BeginInit();
this.SuspendLayout();
//
// pl_top
//
this.pl_top.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
this.pl_top.Controls.Add(this.GroupRightData);
this.pl_top.Dock = System.Windows.Forms.DockStyle.Top;
this.pl_top.Location = new System.Drawing.Point(0, 0);
this.pl_top.Margin = new System.Windows.Forms.Padding(4);
this.pl_top.Name = "pl_top";
this.pl_top.Size = new System.Drawing.Size(1467, 80);
this.pl_top.TabIndex = 20;
//
// GroupRightData
//
this.GroupRightData.Controls.Add(this.pzz);
this.GroupRightData.Controls.Add(this.zdrq);
this.GroupRightData.Controls.Add(this.fjs);
this.GroupRightData.Controls.Add(this.btnCondSearch);
this.GroupRightData.Controls.Add(this.sfxjhd);
this.GroupRightData.Controls.Add(this.tbhxls);
this.GroupRightData.Controls.Add(this.dffmhb);
this.GroupRightData.Controls.Add(this.jffmhb);
this.GroupRightData.Controls.Add(this.dfkmhb);
this.GroupRightData.Controls.Add(this.jfkmhb);
this.GroupRightData.Dock = System.Windows.Forms.DockStyle.Fill;
this.GroupRightData.Location = new System.Drawing.Point(0, 0);
this.GroupRightData.Margin = new System.Windows.Forms.Padding(4);
this.GroupRightData.Name = "GroupRightData";
this.GroupRightData.Padding = new System.Windows.Forms.Padding(4);
this.GroupRightData.Size = new System.Drawing.Size(1467, 80);
this.GroupRightData.TabIndex = 55;
this.GroupRightData.TabStop = false;
//
// pzz
//
this.pzz.BackColor = System.Drawing.Color.Transparent;
this.pzz.EditText = "";
this.pzz.FontSize = 0F;
this.pzz.LabelText = "凭证字:";
this.pzz.Location = new System.Drawing.Point(749, 14);
this.pzz.Margin = new System.Windows.Forms.Padding(5);
this.pzz.Model = null;
this.pzz.Name = "pzz";
this.pzz.NullText = "";
this.pzz.ReadOnly = false;
this.pzz.Required = false;
this.pzz.Size = new System.Drawing.Size(195, 26);
this.pzz.TabIndex = 70;
//
// fjs
//
this.fjs.BackColor = System.Drawing.Color.Transparent;
this.fjs.EditText = "";
this.fjs.FontSize = 0F;
this.fjs.LabelText = "附件数:";
this.fjs.Location = new System.Drawing.Point(749, 46);
this.fjs.Margin = new System.Windows.Forms.Padding(5);
this.fjs.Model = null;
this.fjs.Name = "fjs";
this.fjs.NullText = "";
this.fjs.ReadOnly = false;
this.fjs.Required = false;
this.fjs.Size = new System.Drawing.Size(197, 26);
this.fjs.TabIndex = 67;
//
// sfxjhd
//
this.sfxjhd.BackColor = System.Drawing.Color.Transparent;
this.sfxjhd.EditText = "0";
this.sfxjhd.FontSize = 0F;
this.sfxjhd.LabelText = "是否先借后贷";
this.sfxjhd.Location = new System.Drawing.Point(615, 50);
this.sfxjhd.Margin = new System.Windows.Forms.Padding(5);
this.sfxjhd.Model = null;
this.sfxjhd.Name = "sfxjhd";
this.sfxjhd.NullText = null;
this.sfxjhd.ReadOnly = false;
this.sfxjhd.Required = false;
this.sfxjhd.Size = new System.Drawing.Size(135, 26);
this.sfxjhd.TabIndex = 66;
//
// tbhxls
//
this.tbhxls.BackColor = System.Drawing.Color.Transparent;
this.tbhxls.EditText = "0";
this.tbhxls.FontSize = 0F;
this.tbhxls.LabelText = "同步回写朗速";
this.tbhxls.Location = new System.Drawing.Point(615, 14);
this.tbhxls.Margin = new System.Windows.Forms.Padding(5);
this.tbhxls.Model = null;
this.tbhxls.Name = "tbhxls";
this.tbhxls.NullText = null;
this.tbhxls.ReadOnly = false;
this.tbhxls.Required = false;
this.tbhxls.Size = new System.Drawing.Size(135, 26);
this.tbhxls.TabIndex = 65;
//
// dffmhb
//
this.dffmhb.BackColor = System.Drawing.Color.Transparent;
this.dffmhb.EditText = "0";
this.dffmhb.FontSize = 0F;
this.dffmhb.LabelText = "贷方分录合并";
this.dffmhb.Location = new System.Drawing.Point(486, 50);
this.dffmhb.Margin = new System.Windows.Forms.Padding(5);
this.dffmhb.Model = null;
this.dffmhb.Name = "dffmhb";
this.dffmhb.NullText = null;
this.dffmhb.ReadOnly = false;
this.dffmhb.Required = false;
this.dffmhb.Size = new System.Drawing.Size(135, 26);
this.dffmhb.TabIndex = 64;
//
// jffmhb
//
this.jffmhb.BackColor = System.Drawing.Color.Transparent;
this.jffmhb.EditText = "0";
this.jffmhb.FontSize = 0F;
this.jffmhb.LabelText = "借方分录合并";
this.jffmhb.Location = new System.Drawing.Point(486, 15);
this.jffmhb.Margin = new System.Windows.Forms.Padding(5);
this.jffmhb.Model = null;
this.jffmhb.Name = "jffmhb";
this.jffmhb.NullText = null;
this.jffmhb.ReadOnly = false;
this.jffmhb.Required = false;
this.jffmhb.Size = new System.Drawing.Size(135, 26);
this.jffmhb.TabIndex = 63;
//
// dfkmhb
//
this.dfkmhb.BackColor = System.Drawing.Color.Transparent;
this.dfkmhb.EditText = "0";
this.dfkmhb.FontSize = 0F;
this.dfkmhb.LabelText = "贷方科目合并";
this.dfkmhb.Location = new System.Drawing.Point(359, 50);
this.dfkmhb.Margin = new System.Windows.Forms.Padding(5);
this.dfkmhb.Model = null;
this.dfkmhb.Name = "dfkmhb";
this.dfkmhb.NullText = null;
this.dfkmhb.ReadOnly = false;
this.dfkmhb.Required = false;
this.dfkmhb.Size = new System.Drawing.Size(135, 26);
this.dfkmhb.TabIndex = 62;
//
// jfkmhb
//
this.jfkmhb.BackColor = System.Drawing.Color.Transparent;
this.jfkmhb.EditText = "0";
this.jfkmhb.FontSize = 0F;
this.jfkmhb.LabelText = "借方科目合并";
this.jfkmhb.Location = new System.Drawing.Point(359, 14);
this.jfkmhb.Margin = new System.Windows.Forms.Padding(5);
this.jfkmhb.Model = null;
this.jfkmhb.Name = "jfkmhb";
this.jfkmhb.NullText = null;
this.jfkmhb.ReadOnly = false;
this.jfkmhb.Required = false;
this.jfkmhb.Size = new System.Drawing.Size(135, 26);
this.jfkmhb.TabIndex = 61;
//
// btnCondSearch
//
this.btnCondSearch.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnCondSearch.Appearance.Options.UseFont = true;
this.btnCondSearch.Location = new System.Drawing.Point(247, 25);
this.btnCondSearch.Margin = new System.Windows.Forms.Padding(4);
this.btnCondSearch.Name = "btnCondSearch";
this.btnCondSearch.Size = new System.Drawing.Size(89, 27);
this.btnCondSearch.TabIndex = 72;
this.btnCondSearch.Text = "搜索(&Q)";
//
// pl_mian
//
this.pl_mian.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
this.pl_mian.Controls.Add(this.splitMain);
this.pl_mian.Dock = System.Windows.Forms.DockStyle.Fill;
this.pl_mian.Location = new System.Drawing.Point(0, 80);
this.pl_mian.Margin = new System.Windows.Forms.Padding(4);
this.pl_mian.Name = "pl_mian";
this.pl_mian.Size = new System.Drawing.Size(1467, 795);
this.pl_mian.TabIndex = 21;
//
// splitMain
//
this.splitMain.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitMain.Location = new System.Drawing.Point(0, 0);
this.splitMain.Margin = new System.Windows.Forms.Padding(4);
this.splitMain.Name = "splitMain";
this.splitMain.Panel1.Controls.Add(this.gridLeft);
this.splitMain.Panel1.Text = "Panel1";
this.splitMain.Panel2.Controls.Add(this.xtc_container);
this.splitMain.Panel2.Text = "Panel2";
this.splitMain.Size = new System.Drawing.Size(1467, 795);
this.splitMain.SplitterPosition = 256;
this.splitMain.TabIndex = 17;
this.splitMain.Text = "splitContainerControl1";
//
// gridLeft
//
this.gridLeft.AdapterObj = null;
this.gridLeft.Dock = System.Windows.Forms.DockStyle.Fill;
this.gridLeft.Location = new System.Drawing.Point(0, 0);
this.gridLeft.Margin = new System.Windows.Forms.Padding(5);
this.gridLeft.Name = "gridLeft";
this.gridLeft.SiftEnumObj = Lskj.Control.GridControlEx.HeaderSiftEnum.Sum;
this.gridLeft.Size = new System.Drawing.Size(256, 795);
this.gridLeft.TabIndex = 1;
//
// xtc_container
//
this.xtc_container.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
this.xtc_container.BorderStylePage = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
this.xtc_container.Dock = System.Windows.Forms.DockStyle.Fill;
this.xtc_container.Location = new System.Drawing.Point(0, 0);
this.xtc_container.Margin = new System.Windows.Forms.Padding(4);
this.xtc_container.Name = "xtc_container";
this.xtc_container.Size = new System.Drawing.Size(1205, 795);
this.xtc_container.TabIndex = 9;
//
// zdrq
//
this.zdrq.BackColor = System.Drawing.Color.Transparent;
this.zdrq.EditText = "";
this.zdrq.FontSize = 0F;
this.zdrq.LabelText = "制单日期:";
this.zdrq.Location = new System.Drawing.Point(9, 26);
this.zdrq.Margin = new System.Windows.Forms.Padding(5);
this.zdrq.Model = null;
this.zdrq.Name = "zdrq";
this.zdrq.NullText = "";
this.zdrq.ReadOnly = false;
this.zdrq.Required = false;
this.zdrq.Size = new System.Drawing.Size(229, 26);
this.zdrq.TabIndex = 69;
//
// 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(1467, 875);
this.Controls.Add(this.pl_mian);
this.Controls.Add(this.pl_top);
this.Margin = new System.Windows.Forms.Padding(5);
this.Name = "FrmMain";
this.Text = "凭证推送";
((System.ComponentModel.ISupportInitialize)(this.pl_top)).EndInit();
this.pl_top.ResumeLayout(false);
this.GroupRightData.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pl_mian)).EndInit();
this.pl_mian.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitMain)).EndInit();
this.splitMain.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.xtc_container)).EndInit();
this.ResumeLayout(false);
}
#endregion
private DevExpress.XtraEditors.PanelControl pl_top;
private DevExpress.XtraEditors.PanelControl pl_mian;
private System.Windows.Forms.GroupBox GroupRightData;
private Control.LabelTextEdit fjs;
private Control.LabelCheckEdit sfxjhd;
private Control.LabelCheckEdit tbhxls;
private Control.LabelCheckEdit dffmhb;
private Control.LabelCheckEdit jffmhb;
private Control.LabelCheckEdit dfkmhb;
private Control.LabelCheckEdit jfkmhb;
private DevExpress.XtraEditors.SplitContainerControl splitMain;
private Control.GridControlEx gridLeft;
private DevExpress.XtraEditors.SimpleButton btnCondSearch;
private Control.LabelComboxEdit pzz;
public DevExpress.XtraTab.XtraTabControl xtc_container;
private Control.LabelDateEdit zdrq;
}
}
+735
View File
@@ -0,0 +1,735 @@
using DevExpress.Utils;
using DevExpress.XtraEditors;
using DevExpress.XtraTab;
using Lskj.Business;
using Lskj.Business.Impl;
using Lskj.Control;
using Lskj.Control.Model;
using Lskj.Core;
using Lskj.Data;
using Lskj.Model;
using Lskj.Util;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Lskj.PubVoucherPush
{
public partial class FrmMain : BaseForm
{
/// <summary>
/// 模块类
/// </summary>
public DynamicVoucher SysModel;
/// <summary>
/// 主程序的基础模型
/// </summary>
public ModuleModel MoudleMainObj;
/// <summary>
/// 右键参数
/// </summary>
public MyControl rightControl;
/// <summary>
/// 右侧表格行中的模块号,和对应的左侧页签号
/// </summary>
public Dictionary<string, int> TabInformation = new Dictionary<string, int>();
/// <summary>
/// 主键
/// </summary>
public string ParmaryKey;
/// <summary>
/// 开始日期
/// </summary>
public DateTime StartDate
{
get
{
return new DateTime(zdrq.TextEdit.DateTime.Year, zdrq.TextEdit.DateTime.Month, 1);
}
}
/// <summary>
/// 结束日期
/// </summary>
public DateTime EndDate
{
get
{
return new DateTime(zdrq.TextEdit.DateTime.Year, zdrq.TextEdit.DateTime.Month, 1).AddMonths(1).AddDays(-1);
}
}
public FrmMain()
{
InitializeComponent();
}
/// <summary>
/// <para>说明:窗口初始化</para>
/// <para>创建人:龚宇超</para>
/// <para>创建日期:2017-11-21 </para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
protected override void OnLoad(EventArgs e)
{
WaitForm.ShowForm();
try
{
if (SysModel != null)
{
//隐藏标签
this.xtc_container.ShowTabHeader = DefaultBoolean.False;
this.InitializationConditions();
this.InitializeLeftTable();
this.InitSpliterPosition();
this.splitMain.SplitterPositionChanged += SplitMain_SplitterPositionChanged;
this.btnCondSearch.Click += BtnCondSearch_Click;
this.OnGridLeftRowClick(null, null);
}
}
catch (Exception ex)
{
//MessageUtil.Show(ex.Message + "\r\n" + ex.StackTrace);
string Message = ErrorMessage.PromptErrorMessage(ex);
MessageUtil.Show(Message, ex.Message);
}
finally
{
Lskj.Control.Model.AutoSizeChange.ControllInitializeSize(this);
}
WaitForm.HideForm();
}
/// <summary>
/// 初始化上方条件
/// </summary>
private void InitializationConditions()
{
DateTime now = DateTime.Now;
zdrq.EditText = new DateTime(now.Year, now.Month, 1) + "";
zdrq.TextEdit.Properties.DisplayFormat.FormatString = "yyyy年MM月";
zdrq.TextEdit.Properties.DisplayFormat.FormatType = FormatType.Custom;
zdrq.TextEdit.Properties.EditFormat.FormatString = "yyyy年MM月";
zdrq.TextEdit.Properties.EditFormat.FormatType = FormatType.Custom;
zdrq.TextEdit.Properties.Mask.EditMask = "yyyy年MM月";
zdrq.TextEdit.Properties.Mask.UseMaskAsDisplayFormat = true;
zdrq.TextEdit.Properties.VistaCalendarViewStyle = DevExpress.XtraEditors.VistaCalendarViewStyle.YearView;
//右键条件参数
pzz.TextField = "ctext";
pzz.ValueField = "csign";
pzz.ValueMember = "csign";
try
{
pzz.SetDataSource(SqlHelper.ExecuteDataTable("select * from UFDATA_001_2024.dbo.dsign"));
pzz.TextEdit.SelectedIndex = 0;
}
catch (Exception ex)
{
}
fjs.EditText = "0";
jfkmhb.EditText = "1";
dfkmhb.EditText = "1";
jffmhb.EditText = "1";
dffmhb.EditText = "1";
tbhxls.EditText = "1";
sfxjhd.EditText = "1";
this.rightControl = new MyControl();
rightControl.ParentPanel = pl_top;
}
/// <summary>
/// 初始化左侧表
/// </summary>
private void InitializeLeftTable()
{
//获得模块属性
this.MoudleMainObj = new ModuleModel(MainImpl.GetSystemdllTab(this.SysModel.ModuleCode));//获取主模块构建类
//获取主键
this.ParmaryKey = BaseImpl.GetBasePrimaryKey(this.SysModel.ModuleCode);
//获取设置左侧表列数据
DataTable LeftGridColumns = BaseModuleImpl.GetBaseGridColumns(this.SysModel.ModuleCode);
this.gridLeft.SetReadOnlyColumns(LeftGridColumns);
DataTable rightMenus = BaseModuleImpl.GetBaseGridRightMenus(this.SysModel.ModuleCode);
this.gridLeft.SetGridRightMenus(rightMenus, this.SysModel, OnGridViewRightCallBack, rightControl);
this.gridLeft.gridViewRightMenu.AllowRightCallback = true;
this.gridLeft.gridViewRightMenu.OnBeforeHandleParamsCallback += OnBeforeHandleParamsCallback;
//设置左侧数据源
string menuSql = this.MoudleMainObj.MenuSql.Replace("{year}", StartDate.Year.ToString()).Replace("{month}", StartDate.Month.ToString());
this.gridLeft.gridControl.DataSource = BaseImpl.GetDataTableResult(menuSql);
//左侧表格行改变,刷新右侧表格列
this.gridLeft.GridView.RowClick += OnGridLeftRowClick;
}
/// <summary>
/// <para>说明:初始化分割条位置</para>
/// <para>创建人:龚宇超</para>
/// <para>创建日期:2017-12-15</para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
private void InitSpliterPosition()
{
string spliterPosition = IniHelper.Read(string.Format("PubVoucherPush__splitMain{0}", this.SysModel.ModuleCode));
if (!string.IsNullOrEmpty(spliterPosition)) this.splitMain.SplitterPosition = Convert.ToInt32(spliterPosition);
}
/// <summary>
/// <para>说明:拿到底部表格数据</para>
/// <para>创建人:龚宇超</para>
/// <para>创建日期:2017-11-21 </para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
/// <returns>List&lt;GridDetailModel&gt;.</returns>
private List<GridDetailModel> GetDetails(string mainModuleCode)
{
List<GridDetailModel> details = new List<GridDetailModel>();//表格明细对象的集合
DataTable table = BaseModuleImpl.GetBaseDetailPages(mainModuleCode);// 根据传入的模块编号获得基础档案底部标签的数据
foreach (DataRow item in table.Rows)
{
DataTable gridColumns = ReportImpl.GetReportDetailColumns(mainModuleCode, item["id"] + "");//获取报表明细列
details.Add(new GridDetailModel(item, gridColumns, GridCustomColumnStruct.BaseDetailGridView));
}
return details;
}
/// <summary>
/// 左侧表点击事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnGridLeftRowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e)
{
try
{
DataRow rowItem = this.gridLeft.GetViewFocusedDataRow();
//刷新右侧上方表格列
if (rowItem != null && !string.IsNullOrEmpty(MoudleMainObj.MainModuleCodeField) && this.gridLeft.GridView.Columns.ColumnByFieldName(MoudleMainObj.MainModuleCodeField) != null)
{
string mainModuleCode = rowItem[MoudleMainObj.MainModuleCodeField] + "";
int value = 0;
if (TabInformation.TryGetValue(mainModuleCode, out value))
{
//页签中已经存在,直接切换页签
this.xtc_container.SelectedTabPageIndex = value;
}
else
{
//添加新页签
GridControlEx sendGridEx = new GridControlEx();
sendGridEx.Dock = DockStyle.Fill;
//创建新的XtraTabControl
XtraTabControl innerTabControl = new XtraTabControl();
innerTabControl.Dock = DockStyle.Fill;
//创建"待推送"页签
XtraTabPage tabPageFailed = new XtraTabPage();
tabPageFailed.Text = "待推送";
ModuleGridDetailEx failedGridControlEx = new ModuleGridDetailEx(); // 创建新的GridControlEx实例
failedGridControlEx.Dock = DockStyle.Fill;
ModuleModel SysModel = new ModuleModel(MainImpl.GetSystemdllTab(mainModuleCode));
DynamicModel dyncModel = new DynamicModuleModel(new string[] { "待推送", ERPInfo.Instance.UserId, ERPInfo.Instance.UserName, "2", mainModuleCode, "0" });
failedGridControlEx.GridDetailList = GetDetails(mainModuleCode);// 底部多标签表格数据
SysModel.CsHasDefultSearch = false;
//failedGridControlEx.ModuleGridObj.SearchObj = rightControl;
failedGridControlEx.InitializeControl(SysModel, dyncModel);
failedGridControlEx.ModuleGridObj.GridControlObj.gridViewRightMenu.OnBeforeHandleParamsCallback += OnBeforeHandleParamsCallback;
failedGridControlEx.ModuleGridObj.VisibleSearchPanel = false;
failedGridControlEx.ModuleGridObj.GridControlObj.ParentControl = rightControl;
failedGridControlEx.ModuleGridObj.GridControlObj.gridViewRightMenu.SetRightCallback(OnGridViewRightCallBack);
failedGridControlEx.ModuleGridObj.GridControlObj.gridViewRightMenu.AllowRightCallback = true;
tabPageFailed.Controls.Add(failedGridControlEx);
innerTabControl.TabPages.Add(tabPageFailed);
tabPageFailed.Tag = failedGridControlEx;
//创建"推送成功"页签
XtraTabPage tabPageSuccess = new XtraTabPage();
tabPageSuccess.Text = "推送成功";
DynamicModel dyncModelnew = new DynamicModuleModel(new string[] { "推送成功", ERPInfo.Instance.UserId, ERPInfo.Instance.UserName, "2", mainModuleCode, "0" });
sendGridEx.Model = dyncModelnew;
sendGridEx.SetReadOnlyColumns(BaseModuleImpl.GetBaseGridColumns(mainModuleCode));
ModuleModel sendModel = new ModuleModel(MainImpl.GetSystemdllTab(mainModuleCode));
sendGridEx.Tag = sendModel;
tabPageSuccess.Controls.Add(sendGridEx);
innerTabControl.TabPages.Add(tabPageSuccess);
tabPageSuccess.Tag = sendGridEx;
//设置上方右键菜单
sendGridEx.ParentControl = rightControl;
DataTable rightMenus = BaseModuleImpl.GetBaseGridRightMenus(mainModuleCode);
sendGridEx.SetGridRightMenus(rightMenus, this.SysModel, OnGridViewRightCallBack, rightControl);
sendGridEx.gridViewRightMenu.AllowRightCallback = true;
sendGridEx.gridViewRightMenu.OnBeforeHandleParamsCallback += OnBeforeHandleParamsCallback;
//将innerTabControl添加到新的页签中
XtraTabPage page = new XtraTabPage();
page.Tag = innerTabControl; // 将innerTabControl作为Tag
page.Dock = DockStyle.Fill;
page.Controls.Add(innerTabControl);
this.xtc_container.TabPages.Add(page);
this.TabInformation.Add(mainModuleCode, this.xtc_container.TabPages.Count - 1);
this.xtc_container.SelectedTabPageIndex = this.xtc_container.TabPages.Count - 1;
}
//刷新右侧
BtnCondSearch();
//this.BtnCondSearch_Click(null, null);
}
}
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 OnGridViewRightCallBack(object sender, EventArgs e)
{
//BtnCondSearch();
this.BtnCondSearch_Click(null, null);
}
/// <summary>
/// 分割条改变时
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void SplitMain_SplitterPositionChanged(object sender, EventArgs e)
{
IniHelper.Write(string.Format("PubVoucherPush__splitMain{0}", this.SysModel.ModuleCode), this.splitMain.SplitterPosition + "");
}
/// <summary>
/// 搜索按钮点击后刷新当前选中页签的数据源
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void BtnCondSearch_Click(object sender, EventArgs e)
{
int selectIndex = this.gridLeft.GridView.FocusedRowHandle;
string menuSql = this.MoudleMainObj.MenuSql.Replace("{year}", StartDate.Year.ToString()).Replace("{month}", StartDate.Month.ToString());
this.gridLeft.gridControl.DataSource = BaseImpl.GetDataTableResult(menuSql);
this.gridLeft.GridView.FocusedRowHandle = selectIndex;
BtnCondSearch();
}
/// <summary>
/// 右键参数替换前执行
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnBeforeHandleParamsCallback(object sender, HandleParamsArgs e)
{
string fieldValue = e.FieldValue;
string item = e.ParamItem;
DataRow detailRow = null;
DataRow focusedRow = e.FocusedRow;
DataRow leftFocusedRow = this.gridLeft.GridView.GetFocusedDataRow();
DataTable sourceTable = this.gridLeft.GridControl.DataSourceTable();
DataRow[] rowDatas = null;
string mainModuleCode = "";
string insertType = "";
string billdocumentField = "";
string operateDateField = "";
if (sourceTable.Rows.IndexOf(e.FocusedRow) >= 0)
{
leftFocusedRow = e.FocusedRow;
mainModuleCode = leftFocusedRow.Table.Columns.Contains("DllCoid") ? leftFocusedRow["DllCoid"] + "" : "";
insertType = leftFocusedRow.Table.Columns.Contains("insertType") ? leftFocusedRow["insertType"] + "" : "";
billdocumentField = leftFocusedRow.Table.Columns.Contains("billdocument_id") ? leftFocusedRow["billdocument_id"] + "" : "";
operateDateField = leftFocusedRow.Table.Columns.Contains("operateDate") ? leftFocusedRow["operateDate"] + "" : "";
if (!string.IsNullOrEmpty(mainModuleCode))
{
ModuleModel moduleModel = new ModuleModel(MainImpl.GetSystemdllTab(mainModuleCode));
string TopSql = moduleModel.MenuSql;
if (e.paramList[5].Equals("{Operateway}", StringComparison.OrdinalIgnoreCase))
{
TopSql = TopSql.Replace("{sdate}", StartDate.ToString("yyyy-MM-dd")).Replace("{edate}", EndDate.ToString("yyyy-MM-dd"));
TopSql = ReplaceHelper.ReplaceWhereCond(TopSql) + string.Format(" and (convert(date,convert(varchar(10),pzdate,120))>=convert(date,'{0}')) and (convert(date,convert(varchar(10),pzdate,120))<=convert(date,'{1}') and(ISNULL(issendvoucher,0) = '0' OR (ISNULL(issendvoucher,0) = '1' AND ISNULL(issendsuccess,0) = '0'))) ", StartDate.ToString("yyyy-MM-dd"), EndDate.ToString("yyyy-MM-dd"));
DataTable detailTable = BaseImpl.GetDataTableResult(TopSql);
rowDatas = detailTable.Select();
}
else if (e.paramList[5].Equals("{Operateways}", StringComparison.OrdinalIgnoreCase))
{
TopSql = TopSql.Replace("{sdate}", StartDate.ToString("yyyy-MM-dd")).Replace("{edate}", EndDate.ToString("yyyy-MM-dd"));
TopSql = ReplaceHelper.ReplaceWhereCond(TopSql) + string.Format(" and (convert(date,convert(varchar(10),pzdate,120))>=convert(date,'{0}')) and (convert(date,convert(varchar(10),pzdate,120))<=convert(date,'{1}') and ISNULL(issendvoucher,0) = '1' and ISNULL(issendsuccess,0) = '1') ", StartDate.ToString("yyyy-MM-dd"), EndDate.ToString("yyyy-MM-dd"));
DataTable detailTable = BaseImpl.GetDataTableResult(TopSql);
rowDatas = detailTable.Select();
}
}
}
if (rowDatas == null)
{
rowDatas = e.Rows;
}
if (rowDatas != null && rowDatas.Length > 0)
{
detailRow = rowDatas[0];
}
if (!string.IsNullOrWhiteSpace(item) && item.Equals("MergeExec_{billdocument_Id}", StringComparison.OrdinalIgnoreCase))
{
if (string.IsNullOrEmpty(insertType) || !insertType.Equals("0") || rowDatas == null || rowDatas.Length == 0 || string.IsNullOrEmpty(billdocumentField))
{
if (!string.IsNullOrEmpty(insertType) && !insertType.Equals("0"))
{
fieldValue = "";
}
else
{
fieldValue = item;
}
}
else
{
fieldValue = ReplaceHelper.ReplaceRowParam(rowDatas, "{" + billdocumentField + "}");
}
}
else if (!string.IsNullOrWhiteSpace(item) && item.Equals("MergeExec_{operateDate}", StringComparison.OrdinalIgnoreCase))
{
if (string.IsNullOrEmpty(insertType) || !insertType.Equals("0") || rowDatas == null || rowDatas.Length == 0 || string.IsNullOrEmpty(operateDateField))
{
if (!string.IsNullOrEmpty(insertType) && !insertType.Equals("0"))
{
fieldValue = "";
}
else
{
fieldValue = item;
}
}
else
{
fieldValue = ReplaceHelper.ReplaceRowParam(rowDatas, "{" + operateDateField + "}");
}
}
if (!string.IsNullOrWhiteSpace(item) && item.TrimStart().StartsWith("MergeExec_", StringComparison.OrdinalIgnoreCase))
{
fieldValue = ReplaceHelper.ReplaceRowParam(rowDatas, fieldValue.Replace("MergeExec_", "", true));
}
else if (item.TrimStart().StartsWith("{vouvher_submitCond}", StringComparison.OrdinalIgnoreCase) && rightControl != null)
{
string text = "";
if (item.TrimStart().StartsWith("{vouvher_submitCond}_", StringComparison.OrdinalIgnoreCase))
{
text = "{StartDate};{EndDate};{pzz};{fjs};{jfkmhb};{jffmhb};{tbhxls};{dfkmhb};{dffmhb};{sfxjhd};{zdrq};{billdocument_id};{issendsuccess};{tabName};1";
}
else if (item.TrimStart().StartsWith("{vouvher_submitCond}", StringComparison.OrdinalIgnoreCase))
{
if (string.IsNullOrEmpty(insertType) || insertType.Equals("0"))
{
text = "{StartDate};{EndDate};{pzz};{fjs};{jfkmhb};{jffmhb};{tbhxls};{dfkmhb};{dffmhb};{sfxjhd};{zdrq};{billdocument_id};{issendsuccess};{tabName};0";
}
else
{
text = "{StartDate};{EndDate};{pzz};{fjs};{jfkmhb};{jffmhb};{tbhxls};{dfkmhb};{dffmhb};{sfxjhd};{zdrq};{billdocument_id};{issendsuccess};{tabName};1";
}
}
System.Windows.Forms.Control controlObj = null;
System.Windows.Forms.Control controlGroupBox = rightControl.ParentPanel.Controls.Cast<System.Windows.Forms.Control>().FirstOrDefault(x => x.Name.Equals("GroupRightData", StringComparison.OrdinalIgnoreCase));
if (controlGroupBox != null)
{
if (controlGroupBox is GroupBox && controlObj == null)
{
controlObj = controlGroupBox.Controls.Cast<System.Windows.Forms.Control>().FirstOrDefault(x => x.Name.Equals("zdrq", StringComparison.OrdinalIgnoreCase));
}
}
if (controlObj != null && controlObj is LabelDateEdit)
{
LabelDateEdit zdrqControl = controlObj as LabelDateEdit;
DateTime startDateTime = new DateTime(zdrqControl.TextEdit.DateTime.Year, zdrqControl.TextEdit.DateTime.Month, 1);
DateTime endDateTime = new DateTime(zdrqControl.TextEdit.DateTime.Year, zdrqControl.TextEdit.DateTime.Month, 1).AddMonths(1).AddDays(-1);
fieldValue = text.Replace("{StartDate}", startDateTime.ToString("yyyy-MM-dd")).Replace("{EndDate}", endDateTime.ToString("yyyy-MM-dd"));
}
fieldValue = rightControl.ReplaceFixedControlValue(fieldValue);
}
if (leftFocusedRow != null)
{
fieldValue = ReplaceHelper.ReplaceRowParam(leftFocusedRow, fieldValue);
}
if (focusedRow != null)
{
fieldValue = ReplaceHelper.ReplaceRowParam(focusedRow, fieldValue);
}
if (detailRow != null)
{
fieldValue = ReplaceHelper.ReplaceRowParam(detailRow, fieldValue);
}
e.FieldValue = fieldValue;
}
/// <summary>
/// 搜索方法
/// </summary>
/// <param name="isClick"></param>
private void BtnCondSearch()
{
try
{
WaitForm.ShowForm(ResourceKeys.Handing);
DataRow rowItem = this.gridLeft.GetViewFocusedDataRow();
if (rowItem != null)
{
//上方
XtraTabPage tabPage = this.xtc_container.SelectedTabPage;
if (tabPage.Tag is XtraTabControl)
{
XtraTabControl innerTabControl = tabPage.Tag as XtraTabControl;
foreach (XtraTabPage SelectPage in innerTabControl.TabPages)
{
if (SelectPage.Tag is GridControlEx)
{
GridControlEx frmMainModule = SelectPage.Tag as GridControlEx;
string TopSql = (frmMainModule.Tag as ModuleModel).MenuSql;
TopSql = TopSql.Replace("{sdate}", StartDate.ToString("yyyy-MM-dd")).Replace("{edate}", StartDate.ToString("yyyy-MM-dd"));
TopSql = ReplaceHelper.ReplaceWhereCond(TopSql) + string.Format(" and (convert(date,convert(varchar(10),pzdate,120))>=convert(date,'{0}')) and (convert(date,convert(varchar(10),pzdate,120))<=convert(date,'{1}') and ISNULL(issendvoucher,0) = '1' and ISNULL(issendsuccess,0) = '1') ", StartDate.ToString("yyyy-MM-dd"), EndDate.ToString("yyyy-MM-dd"));
//TopSql = ReplaceHelper.ReplaceWhereCond(TopSql) + string.Format(" and (convert(date,convert(varchar(10),pzdate,120))>=convert(date,'{0}')) and (convert(date,convert(varchar(10),pzdate,120))<=convert(date,'{1}')) ", StartDate.EditText, EndDate.EditText);
frmMainModule.SetGridViewDataSource(SqlHelper.ExecuteDataTable(TopSql));
string CountText = "(" + frmMainModule.DataRowCount() + "条)";
SelectPage.Text = "推送成功" + CountText;
}
else if (SelectPage.Tag is ModuleGridDetailEx)
{
ModuleGridDetailEx moduleGridDetailEx = SelectPage.Tag as ModuleGridDetailEx;
string TopSql = moduleGridDetailEx.SysModel.MenuSql;
TopSql = TopSql.Replace("{sdate}", StartDate.ToString("yyyy-MM-dd")).Replace("{edate}", EndDate.ToString("yyyy-MM-dd"));
TopSql = ReplaceHelper.ReplaceWhereCond(TopSql) + string.Format(" and (convert(date,convert(varchar(10),pzdate,120))>=convert(date,'{0}')) and (convert(date,convert(varchar(10),pzdate,120))<=convert(date,'{1}') and(ISNULL(issendvoucher,0) = '0' OR (ISNULL(issendvoucher,0) = '1' AND ISNULL(issendsuccess,0) = '0'))) ", StartDate.ToString("yyyy-MM-dd"), EndDate.ToString("yyyy-MM-dd"));
//TopSql = ReplaceHelper.ReplaceWhereCond(TopSql) + string.Format(" and (convert(date,convert(varchar(10),pzdate,120))>=convert(date,'{0}')) and (convert(date,convert(varchar(10),pzdate,120))<=convert(date,'{1}')) ", StartDate.EditText, EndDate.EditText);
moduleGridDetailEx.ModuleGridObj.GridControlObj.SetGridViewDataSource(SqlHelper.ExecuteDataTable(TopSql));
string CountText = "(" + moduleGridDetailEx.ModuleGridObj.GridControlObj.DataRowCount() + "条)";
SelectPage.Text = "待推送" + CountText;
}
}
//下方
//frmMainModule.BottomGridControlEx.SetGridViewDataSource(SqlHelper.ExecuteDataTable(BottomSql));
}
}
}
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex);
MessageUtil.Show(Message, ex.Message);
}
finally
{
WaitForm.HideForm();
}
}
/// <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 = !string.IsNullOrEmpty(model.UnionParentField) && rowItem.Table.Columns.Contains(model.UnionParentField) ? model.UnionParentField : this.ParmaryKey;
string sqlValue = model.IsReadOnly || model.IsChart ? model.DetailSql : model.SystemModel.MenuSql;
sqlValue = ReplaceHelper.ReplaceRowParam(rowItem, sqlValue);
if (ReplaceHelper.IsSelect(sqlValue) && !string.IsNullOrEmpty(model.UnionValue))
{
string Conditions = string.Empty;
//是左侧选中行,并且没有替换字段,则使用主表选中行
Conditions = rowItem[fieldName] + "";
sqlValue = ReplaceHelper.ReplaceWhereCond(sqlValue) + string.Format(" and {0}='{1}'", model.UnionValue, Conditions);
sqlValue += string.Format(" and dDate >= '{0}' and dDate <= '{1}' ", StartDate.ToString("yyyy-MM-dd"), EndDate.ToString("yyyy-MM-dd"));
}
if (!string.IsNullOrEmpty(model.UnionCond))
{
string UnionCond = ReplaceHelper.ReplaceRowParam(rowItem, model.UnionCond);
sqlValue += UnionCond;
}
return sqlValue;
}
/// <summary>
/// 一键推送
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void btn_AllStep_Click(object sender, EventArgs e)
{
try
{
if (this.xtc_container.SelectedTabPage != null && this.xtc_container.SelectedTabPage.Controls.Count > 0 && this.xtc_container.SelectedTabPage.Controls[0] is GridControlEx)
{
GridControlEx frmMainModule = this.xtc_container.SelectedTabPage.Controls[0] as GridControlEx;
if (frmMainModule != null && frmMainModule.GridControl.ContextMenuStrip != null)
{
ToolStripMenuItem toolStripMenu = frmMainModule.GridControl.ContextMenuStrip.Items.Cast<ToolStripMenuItem>().Where(n => n.Text.Equals("推送凭证")).FirstOrDefault();
if (toolStripMenu != null && toolStripMenu.Tag != null && toolStripMenu.Tag is GridRightMenuModel)
{
GridRightMenuModel gridRightMenu = toolStripMenu.Tag as GridRightMenuModel;
if ((gridRightMenu.ActionType + "").Equals("1") && !string.IsNullOrEmpty(gridRightMenu.Action) && gridRightMenu.Action.Equals("Data_InsertU8WithBillNoAPI{@OperatorId,@Operateway,@operatedate,@billNo,@msg}"))
{
string operatorId = ERPInfo.Instance.UserId;
string operateWay = gridRightMenu.DllParam2;
string operateDateField = gridRightMenu.DllParam3.Replace("{", "").Replace("}", "");
string billNoField = gridRightMenu.DllParam4.Replace("{", "").Replace("}", "");
string operateDate = "";
string billNo = "";
DataTable sourceTab = frmMainModule.GridControl.DataSourceTable();
int[] selectIndexs = frmMainModule.GridView.GetSelectedRows();
foreach (int selectIndex in selectIndexs)
{
DataRow item = frmMainModule.GridView.GetDataRow(selectIndex);
if (item.Table.Columns.Contains(operateDateField) && item.Table.Columns.Contains(billNoField))
{
operateDate += string.Format("{0},", item[operateDateField] + "");
billNo += string.Format("{0},", item[billNoField] + "");
}
else
{
MessageUtil.Show("数据异常,单据号或操作日期不存在");
return;
}
}
if (!string.IsNullOrEmpty(billNo) && !string.IsNullOrEmpty(operateDate))
{
int insertValue = ExecuteInsertU8(operatorId, operateWay, operateDate.TrimEnd(','), billNo.TrimEnd(','), out string insertMsg);
if (insertValue != 1)
{
MessageUtil.Show("凭证推送失败" + "\r\n" + insertMsg);
}
else
{
DataRow dataRow = this.gridLeft.GridView.GetFocusedDataRow();
if (dataRow != null)
{
string userName = ERPInfo.Instance.UserName;
string startDate = StartDate.ToString("yyyyMMdd");
string endDate = EndDate.ToString("yyyyMMdd");
string pzz = this.pzz.EditValue;
int fjs = int.TryParse(this.fjs.TextEdit.EditValue + "", out int fjsNum) ? fjsNum : 0;
string jfkmhb = this.jfkmhb.TextEdit.Checked ? "1" : "0";
string jffmhb = this.jffmhb.TextEdit.Checked ? "1" : "0";
string tbhxls = this.tbhxls.TextEdit.Checked ? "1" : "0";
string dfkmhb = this.dfkmhb.TextEdit.Checked ? "1" : "0";
string dffmhb = this.dffmhb.TextEdit.Checked ? "1" : "0";
string sfxjhd = this.sfxjhd.TextEdit.Checked ? "1" : "0";
string zdrq = this.zdrq.TextEdit.DateTime.ToString("yyyyMMdd");
string strCollected = "'" + dataRow["cVouchType"] + "'";
string globalBatch = DateTime.Now.ToString("yyyyMMddHHmmss");
string submitCond = $"{startDate};{endDate};{pzz};{fjs};{jfkmhb};{jffmhb};{tbhxls};{dfkmhb};{dffmhb};{sfxjhd};{zdrq}";
int returnValue = ExecuteVoucherAllStep(userName, globalBatch, strCollected, submitCond, out string msg);
if (returnValue == -1)
{
MessageUtil.Show("凭证推送失败" + "\r\n" + msg);
}
else
{
MessageUtil.Show("凭证推送成功");
}
}
}
}
else
{
MessageUtil.Show("未找到符合推送要求的数据");
}
}
}
}
}
}
catch (Exception ex)
{
MessageUtil.Show(ex.Message);
}
finally
{
BtnCondSearch();
//this.BtnCondSearch_Click(null, null);
}
}
/// <summary>
/// 凭证新增
/// </summary>
/// <param name="operatorName"></param>
/// <param name="globalBatch"></param>
/// <param name="strCollected"></param>
/// <param name="submitCond"></param>
/// <param name="tipMsg"></param>
/// <returns></returns>
public static int ExecuteVoucherAllStep(string operatorName, string globalBatch, string strCollected, string submitCond, out string tipMsg)
{
SqlParameter pMsg = new SqlParameter("@msg", SqlDbType.VarChar, -1);
pMsg.Direction = ParameterDirection.Output;
SqlParameter returnValue = new SqlParameter("@return", SqlDbType.Int, 4);
returnValue.Direction = ParameterDirection.ReturnValue;
SqlParameter[] param = {
new SqlParameter("@operator", SqlDbType.NVarChar, 50),
new SqlParameter("@globalBatch", SqlDbType.NVarChar, 50),
new SqlParameter("@strCollected", SqlDbType.NVarChar, 200),
new SqlParameter("@submitCond", SqlDbType.NVarChar, -1),
pMsg,
returnValue
};
param[0].Value = operatorName;
param[1].Value = globalBatch;
param[2].Value = strCollected;
param[3].Value = submitCond;
SqlHelper.ExecuteDataSet(CommandType.StoredProcedure, "DataU8_VoucherAllStep", "result", param);
tipMsg = pMsg.Value.ToString();
return Convert.ToInt32(returnValue.Value);
}
/// <summary>
/// 凭证推送
/// </summary>
/// <param name="operatorId"></param>
/// <param name="globalBatch"></param>
/// <param name="strCollected"></param>
/// <param name="submitCond"></param>
/// <param name="tipMsg"></param>
/// <returns></returns>
public static int ExecuteInsertU8(string operatorId, string operateWay, string operateDate, string billNo, out string tipMsg)
{
SqlParameter pMsg = new SqlParameter("@msg", SqlDbType.VarChar, -1);
pMsg.Direction = ParameterDirection.Output;
SqlParameter returnValue = new SqlParameter("@return", SqlDbType.Int, 4);
returnValue.Direction = ParameterDirection.ReturnValue;
SqlParameter[] param = {
new SqlParameter("@OperatorId", SqlDbType.Int,4),
new SqlParameter("@Operateway", SqlDbType.Int, 4),
new SqlParameter("@operatedate", SqlDbType.VarChar, -1),
new SqlParameter("@billNo", SqlDbType.VarChar, -1),
pMsg,
returnValue
};
param[0].Value = operatorId;
param[1].Value = operateWay;
param[2].Value = operateDate;
param[3].Value = billNo;
SqlHelper.ExecuteDataSet(CommandType.StoredProcedure, "Data_InsertU8WithBillNoAPI", "result", param);
tipMsg = pMsg.Value.ToString();
return Convert.ToInt32(returnValue.Value);
}
}
}
+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,120 @@
<?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>{BF223628-E59A-4C2E-871B-EAA9D312C09B}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Lskj.PubVoucherPush</RootNamespace>
<AssemblyName>Lskj.PubVoucherPush</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</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>
</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, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\Dev15.2\Components\Bin\Framework\DevExpress.Data.v15.2.dll</HintPath>
</Reference>
<Reference Include="DevExpress.Printing.v15.2.Core, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\Dev15.2\Components\Bin\Framework\DevExpress.Printing.v15.2.Core.dll</HintPath>
</Reference>
<Reference Include="DevExpress.Utils.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\Dev15.2\Components\Bin\Framework\DevExpress.Utils.v15.2.dll</HintPath>
</Reference>
<Reference Include="DevExpress.XtraEditors.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\Dev15.2\Components\Bin\Framework\DevExpress.XtraEditors.v15.2.dll</HintPath>
</Reference>
<Reference Include="DevExpress.XtraGrid.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\Dev15.2\Components\Bin\Framework\DevExpress.XtraGrid.v15.2.dll</HintPath>
</Reference>
<Reference Include="DevExpress.XtraLayout.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\Dev15.2\Components\Bin\Framework\DevExpress.XtraLayout.v15.2.dll</HintPath>
</Reference>
<Reference Include="DevExpress.XtraPrinting.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\Dev15.2\Components\Bin\Framework\DevExpress.XtraPrinting.v15.2.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="DllBaseClass.cs" />
<Compile Include="FrmMain.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmMain.Designer.cs">
<DependentUpon>FrmMain.cs</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
</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>
<ItemGroup>
<EmbeddedResource Include="FrmMain.resx">
<DependentUpon>FrmMain.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("Lskj.PubVoucherPush")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Lskj.PubVoucherPush")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("bf223628-e59a-4c2e-871b-eaa9d312c09b")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
+23
View File
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="NPOI" publicKeyToken="0df73ec7942b34e1" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.1.3.1" newVersion="2.1.3.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.6.10.0" newVersion="2.6.10.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.6.10.0" newVersion="2.6.10.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>