基线 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,44 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using DevExpress.UserSkins;
using DevExpress.Skins;
using DevExpress.LookAndFeel;
using Lskj.Util;
using Lskj.Business;
using Lskj.Model;
namespace Lskj.ProductBarCode2
{
/// <summary>
/// c#库被调用统一接口类
/// </summary>
public sealed class DllBaseClass : IForm
{
public DllBaseClass()
{
}
public DllBaseClass(string[] obj)
{
try
{
FrmMain main = new FrmMain();
this.SubForm = main;
main.IncomingParameters = obj;
main.SysModel = new DynamicBarCodeModel(obj);
}
catch (Exception ex)
{
LogUtil.WriteError("Lskj.ProductBarCode2.dll--参数错误-->" + obj.ToString(), ex);
}
}
/// <summary>
/// 窗口
/// </summary>
public Form SubForm { get; set; }
}
}
+118
View File
@@ -0,0 +1,118 @@
namespace Lskj.ProductBarCode2
{
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.splitMainControl = new DevExpress.XtraEditors.SplitContainerControl();
this.gcLeft = new Lskj.Control.GridControlEx();
this.pl_left_top = new DevExpress.XtraEditors.PanelControl();
this.xtc_container = new DevExpress.XtraTab.XtraTabControl();
((System.ComponentModel.ISupportInitialize)(this.splitMainControl)).BeginInit();
this.splitMainControl.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pl_left_top)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xtc_container)).BeginInit();
this.SuspendLayout();
//
// splitMainControl
//
this.splitMainControl.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitMainControl.Location = new System.Drawing.Point(0, 0);
this.splitMainControl.Margin = new System.Windows.Forms.Padding(2);
this.splitMainControl.Name = "splitMainControl";
this.splitMainControl.Panel1.Controls.Add(this.gcLeft);
this.splitMainControl.Panel1.Controls.Add(this.pl_left_top);
this.splitMainControl.Panel1.Text = "Panel1";
this.splitMainControl.Panel2.Controls.Add(this.xtc_container);
this.splitMainControl.Panel2.Text = "Panel2";
this.splitMainControl.Size = new System.Drawing.Size(1025, 598);
this.splitMainControl.SplitterPosition = 290;
this.splitMainControl.TabIndex = 0;
this.splitMainControl.Text = "splitContainerControl1";
//
// gcLeft
//
this.gcLeft.AdapterObj = null;
this.gcLeft.Dock = System.Windows.Forms.DockStyle.Fill;
this.gcLeft.Location = new System.Drawing.Point(0, 36);
this.gcLeft.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.gcLeft.Name = "gcLeft";
this.gcLeft.SiftEnumObj = Lskj.Control.GridControlEx.HeaderSiftEnum.Sum;
this.gcLeft.Size = new System.Drawing.Size(290, 562);
this.gcLeft.TabIndex = 10;
//
// pl_left_top
//
this.pl_left_top.Appearance.BackColor = System.Drawing.Color.Transparent;
this.pl_left_top.Appearance.Options.UseBackColor = true;
this.pl_left_top.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
this.pl_left_top.Dock = System.Windows.Forms.DockStyle.Top;
this.pl_left_top.Location = new System.Drawing.Point(0, 0);
this.pl_left_top.LookAndFeel.UseDefaultLookAndFeel = false;
this.pl_left_top.Name = "pl_left_top";
this.pl_left_top.Size = new System.Drawing.Size(290, 36);
this.pl_left_top.TabIndex = 9;
//
// 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.Name = "xtc_container";
this.xtc_container.Size = new System.Drawing.Size(730, 598);
this.xtc_container.TabIndex = 6;
//
// FrmMain
//
this.Appearance.BackColor = System.Drawing.SystemColors.Control;
this.Appearance.Options.UseBackColor = true;
this.Appearance.Options.UseFont = true;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1025, 598);
this.Controls.Add(this.splitMainControl);
this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.Name = "FrmMain";
this.Text = "Form1";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmMain_FormClosing);
((System.ComponentModel.ISupportInitialize)(this.splitMainControl)).EndInit();
this.splitMainControl.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pl_left_top)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xtc_container)).EndInit();
this.ResumeLayout(false);
}
#endregion
private DevExpress.XtraEditors.SplitContainerControl splitMainControl;
private DevExpress.XtraEditors.PanelControl pl_left_top;
private Control.GridControlEx gcLeft;
public DevExpress.XtraTab.XtraTabControl xtc_container;
}
}
+626
View File
@@ -0,0 +1,626 @@
using DevExpress.Utils;
using DevExpress.XtraEditors;
using DevExpress.XtraGrid.Columns;
using DevExpress.XtraGrid.Views.Grid;
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.ProductBarCode2
{
public partial class FrmMain : BaseForm
{
/// <summary>
/// 左侧树数据
/// </summary>
public DataRow LeftRowObj;
/// <summary>
/// 主键名
/// </summary>
private string _primaryLeftKey;
/// <summary>
/// 表格对象
/// </summary>
/// <value>The grid view object.</value>
public GridControlEx GridControlObj { get { return (xtc_container.SelectedTabPage.Tag as FrmMainModule).GridControlObj; } }
/// <summary>
/// 表格对象
/// </summary>
/// <value>The grid view object.</value>
public GridControlEx gcBottom { get { return (xtc_container.SelectedTabPage.Tag as FrmMainModule).GcBottom; } }
/// <summary>
/// 必须录入字段
/// </summary>
private DataRow[] _nullFields = new DataRow[] { };
/// <summary>
/// 基础模型
/// </summary>
public ModuleModel MoudleObj { get { return (xtc_container.SelectedTabPage.Tag as FrmMainModule).MoudleObj; } }
/// <summary>
/// 底部基础模型
/// </summary>
public ModuleModel MoudleBottomObj { get { return (xtc_container.SelectedTabPage.Tag as FrmMainModule).MoudleBottomObj; } }
/// <summary>
/// 表格明细集合
/// </summary>
public List<GridDetailModel> GridDetailModelObjs;
/// <summary>
/// 控件源数据
/// </summary>
private DataTable _dtFields;
/// <summary>
/// 单据信息
/// </summary>
private DataRow _drBillInfo{ get { return (xtc_container.SelectedTabPage.Tag as FrmMainModule)._drBillInfo; } }
/// <summary>
/// 单据模型
/// </summary>
public BillModel BillModelObj;
public DynamicBarCodeModel SysModel;
public DynamicModuleModel dmoudelModel;
/// <summary>
/// 单表模型
/// </summary>
public DynamicModuleModel moudelModel;
/// <summary>
/// 控件对象
/// </summary>
public MyControl ControlObj { get { return (xtc_container.SelectedTabPage.Tag as FrmMainModule).ControlObj; } }
/// <summary>
/// 控件高度
/// </summary>
/// <value>The height of the control.</value>
public int ControlHeight { get; private set; }
/// <summary>
/// 控件数据源
/// </summary>
private DataTable _controlTable;
/// <summary>
/// 单据明细列
/// </summary>
private DataTable _detailColumns;
/// <summary>
/// 单据关联字段
/// </summary>
public string BillRelation;
/// <summary>
/// 单据明细id
/// </summary>
public int MxId;
/// <summary>
/// 设置红蓝单据
/// </summary>
public string BillStatus;
/// <summary>
/// 单据名称
/// </summary>
public string typename;
/// <summary>
/// 左侧表格查询条件
/// </summary>
private MyControl _leftGridSearchObj;
/// <summary>
/// 传入的参数
/// </summary>
public string[] IncomingParameters;
/// <summary>
/// 右侧页签存的模块号和对应的顺序
/// </summary>
public Dictionary<string, int> TabInformation = new Dictionary<string, int>();
public FrmMain()
{
InitializeComponent();
}
protected override void OnLoad(EventArgs e)
{
try
{
SetInterfaceState();//设置界面状态
SetLeftGridView();
InitializeSetting();
SelectSettingsRows();//加载左侧数据源和设置左侧选中行
}
catch (Exception ex)
{
LogHelper.Instance.WriteError(ex);
//MessageUtil.Show(ex);
string Message = ErrorMessage.PromptErrorMessage(ex);
MessageUtil.Show(Message,ex.Message);
}
finally
{
Lskj.Control.Model.AutoSizeChange.ControllInitializeSize(this);
WaitForm.HideForm();
}
}
/// <summary>
/// <para>说明:判断是否终审,加载界面是否可以编辑</para>
/// <para>创建人:龚宇超</para>
/// <para>创建日期:2017-10-25 </para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
protected void SetInterfaceState()
{
try
{
this.BillModelObj = new BillAuditModel(BillImpl.GetBillInfo(this.SysModel.ModuleCode));
this.BillModelObj.MasterPreFix = BaseImpl.GetColumnPrefix(this.BillModelObj.MasterTable);
this.BillModelObj.DetailPreFix = BaseImpl.GetColumnPrefix(this.BillModelObj.DetailTable);
}
catch (Exception)
{
throw;
}
}
/// <summary>
/// <para>说明:设置左侧表格数据</para>
/// <para>创建人:龚宇超</para>
/// <para>创建日期:2017-10-25 </para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
protected void SetLeftGridView()
{
this.LeftRowObj = BaseModuleImpl.GetBaseLeftTreeField(this.SysModel.MoudelId);
if (this.LeftRowObj != null)
{
DataTable dtTable = BaseModuleImpl.GetBaseLeftGridField(this.SysModel.MoudelId);
DataTable dtColorTable = BaseModuleImpl.GetBaseGridRowColors(this.LeftRowObj["fieldKey"] + "");
BillRelation = "{" + this.LeftRowObj["fieldsqlname"] + "}";
this.gcLeft.GridView.FocusedRowObjectChanged += OnGridViewRowClick;
//this.gcLeft.GridView.RowClick += new DevExpress.XtraGrid.Views.Grid.RowClickEventHandler(OnGridViewRowClick);
this.gcLeft.SetGridRowColors(dtColorTable);
this.gcLeft.SetReadOnlyColumns(dtTable, GridCustomColumnStruct.BaseLeftGridView + this.SysModel.MoudelId);
}
typename = SqlHelper.ExecuteScalar(string.Format("select replace(typename,'单','') as typename from p_systembilltype where typecode='{0}'", this.SysModel.ModuleCode)) + "";
}
#region
/// <summary>
/// <para>说明:初始化属性设置</para>
/// <para>创建人:龚宇超</para>
/// <para>创建日期:2018-02-27</para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
private void InitializeSetting()
{
XtraTabPage page = new XtraTabPage();
page.Text = IncomingParameters[9];
FrmMainModule frmMainModule = new FrmMainModule();
frmMainModule.BillModelObj = BillModelObj;
frmMainModule.SysModel = this.SysModel;
frmMainModule.gridLeft = this.gcLeft;
frmMainModule.Dock = DockStyle.Fill;
if (this.LeftRowObj != null)
{
frmMainModule.ModuleGridEx.ParentKeyField = this.LeftRowObj["fieldsqlid"] + "";
frmMainModule.ModuleGridEx.ParentUnionField = this.LeftRowObj["fieldname"] + "";
frmMainModule.GcBottom.GridView.DoubleClick += new EventHandler(OnGridViewDoubleClick);
}
frmMainModule.initial();
page.Tag = frmMainModule;
page.Controls.Add(frmMainModule);
this.xtc_container.TabPages.Add(page);
this.TabInformation.Add(page.Text, this.xtc_container.TabPages.Count-1);
this.xtc_container.ShowTabHeader = DefaultBoolean.False;
this.xtc_container.SelectedPageChanged -= Xtc_container_SelectedPageChanged;
this.xtc_container.SelectedPageChanged += Xtc_container_SelectedPageChanged;
}
//页签切换时刷新
private void Xtc_container_SelectedPageChanged(object sender, DevExpress.XtraTab.TabPageChangedEventArgs e)
{
if (xtc_container.SelectedTabPage.Tag is FrmMainModule)
{
FrmMainModule frmMainModule = xtc_container.SelectedTabPage.Tag as FrmMainModule;
this.gcLeft.Model = frmMainModule.SysModel;
this.gcLeft.ParentControl = frmMainModule.ControlObj;
DataRow rowArray = this.gcLeft.GetViewFocusedDataRow();
if (!string.IsNullOrWhiteSpace(SysModel.DefaultEnabled) && rowArray.Table.Columns.Contains(SysModel.DefaultEnabled))
{
string varlue = rowArray[SysModel.DefaultEnabled] + "";
if (varlue.Equals("0"))
{
frmMainModule.SetPermissions(true);
}
else if (varlue.Equals("1"))
{
frmMainModule.SetPermissions(false);
}
}
}
}
#endregion
/// <summary>
/// 创建条码控件
/// </summary>
private void InitControls()
{
}
#region
/// <summary>
/// <para>说明:获取配置条件头属性设置</para>
/// <para>创建人:王一帆</para>
/// <para>创建日期:2021-09-07 </para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
/// <returns>System.String.</returns>
private void SetCodeHeader(DataRow newRow)
{
StringBuilder updateBuilder = new StringBuilder();
foreach (ControlModel model in this.ControlObj.ControlModels)
{
if (!string.IsNullOrEmpty(model.DefaultValue))
{
bool isStart = model.DefaultValue.StartsWith("{");
string fieldName = model.DefaultValue.Replace("{", "").Replace("}", "");
if (newRow!=null&&newRow.Table.Columns.Contains(fieldName))
{
this.ControlObj.SetControlValue(model.FieldName, newRow[fieldName] + "");
}
else
{
this.ControlObj.SetControlValue(model.FieldName, isStart ? string.Empty : model.DefaultValue);
}
}
}
}
#endregion
/// <summary>
/// <para>说明:条码点击加载详细条码</para>
/// <para>创建人:王一帆</para>
/// <para>创建日期:2020-01-07 </para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="RowCellClickEventArgs"/> instance containing the event data.</param>
private void OnGridViewRowClick(object sender, EventArgs e)
{
try
{
DataRow rowArray = this.gcLeft.GetViewFocusedDataRow();
if (!string.IsNullOrWhiteSpace(SysModel.ModuleNumber) &&rowArray.Table.Columns.Contains(SysModel.ModuleNumber))
{
if (!IncomingParameters[9].Equals(rowArray[SysModel.ModuleNumber] + ""))
{
string key=IncomingParameters[9] = rowArray[SysModel.ModuleNumber] + "";
int value = 0;
if (TabInformation.TryGetValue(key, out value))
{
//页签中已经存在,直接切换页签
this.xtc_container.SelectedTabPageIndex = value;
}
else {
//添加新页签
SysModel = new DynamicBarCodeModel(IncomingParameters);
InitializeSetting();
if (this.xtc_container.SelectedTabPageIndex == this.xtc_container.TabPages.Count - 1) Xtc_container_SelectedPageChanged(null,null);
this.xtc_container.SelectedTabPageIndex = this.xtc_container.TabPages.Count - 1;
}
}
}
SetCodeHeader(rowArray);
string detailSql = ReplaceHelper.ReplaceRowParam(rowArray, this.MoudleObj.MenuSql);
string BatchBarCodeViewSql = ReplaceHelper.ReplaceRowParam(rowArray, this.MoudleBottomObj.MenuSql);
BatchBarCodeViewSql = ReplaceHelper.ReplaceRowParam(_drBillInfo, BatchBarCodeViewSql);
this.GridControlObj.LastSearchSql = detailSql;
this.GridControlObj.SetGridViewDataSource(MainImpl.GetAdapterResult(this.GridControlObj.LastSearchSql));
this.gcBottom.LastSearchSql = BatchBarCodeViewSql;
this.gcBottom.SetGridViewDataSource(MainImpl.GetAdapterResult(this.gcBottom.LastSearchSql));
}
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex);
MessageUtil.Show(Message,ex.Message);
}
}
/// <summary>
/// <para>说明:删除主程序后刷新所有界面</para>
/// <para>创建人:王一帆</para>
/// <para>创建日期:2020-01-30 </para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
/// <param name="sender">The sender.</param>
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
protected void OnDelCallBackEven(object sender, EventArgs e)
{
try
{
this.GridControlObj.SetGridViewDataSource(MainImpl.GetAdapterResult(this.GridControlObj.LastSearchSql));
this.gcBottom.SetGridViewDataSource(MainImpl.GetAdapterResult(this.gcBottom.LastSearchSql));
MessageUtil.Show("刷新成功!");
}
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex);
MessageUtil.Show(Message,ex.Message);
}
}
/// <summary>
/// <para>说明:增加条码后,刷新规则按照上一次查询条件刷新</para>
/// <para>创建人:王一帆</para>
/// <para>创建日期:2020-01-30 </para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
/// <param name="sender">The sender.</param>
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
protected void OnGridAddCallBack(object sender, EventArgs e)
{
//if (this.addControl.addbtnSql == null) return;
//int refreshTypes = SqlHelper.ExecuteNonQuery(this.addControl.addbtnSql);
//if (refreshTypes == 1)
//{
// this.gcMain.SetGridViewDataSource(MainImpl.GetAdapterResult(this.gcMain.LastSearchSql));
// this.gcBottom.SetGridViewDataSource(MainImpl.GetAdapterResult(this.gcBottom.LastSearchSql));
// MessageUtil.Show("成功!");
//}
}
/// <summary>
/// <para>说明:条码点击需要生产的条码</para>
/// <para>创建人:王一帆</para>
/// <para>创建日期:2020-01-07 </para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="RowCellClickEventArgs"/> instance containing the event data.</param>
private void OnGridViewDoubleClick(object sender, EventArgs e)
{
int successQuantity = 0;//执行成功条数
int AllQuantity = 0;//全部条数
string mag = string.Empty;
try
{
string msgs = string.Empty;
//DataRow dr = this.gcBottom.GetViewFocusedDataRow();
DataRow[] dataRows = this.gcBottom.GetViewFocusedDataRows();
AllQuantity = dataRows.Length;
if (this.SysModel.Required.Equals("1") && dataRows.Length == 0)
{
return;
}
foreach (DataRow dr in dataRows)
{
DataRow rowArray = this.gcLeft.GetViewFocusedDataRow();
string sql = this.ControlObj.ReplaceControlValue(this.SysModel.AddbtnSql);
sql = ReplaceHelper.ReplaceRowParam(rowArray, sql);
sql = ReplaceHelper.ReplaceRowParam(dr, sql);
string result = SqlHelper.ExecuteScalar(sql) + "";
if (result == "1")
{
successQuantity++;
}
else
{
mag += result + "\r\n";
}
}
}
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex);
MessageUtil.Show(Message, ex.Message);
}
finally
{
if (successQuantity>0)
{
this.GridControlObj.SetGridViewDataSource(MainImpl.GetAdapterResult(this.GridControlObj.LastSearchSql));
this.gcBottom.SetGridViewDataSource(MainImpl.GetAdapterResult(this.gcBottom.LastSearchSql));
if(AllQuantity== successQuantity&& !this.SysModel.CancelPrompt) MessageUtil.Show("成功!");
}
if (AllQuantity > successQuantity)
{
MessageUtil.Show(mag);
}
}
}
/// <summary>
/// 界面关闭事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void FrmMain_FormClosing(object sender, FormClosingEventArgs e)
{
try
{
DataRow rowArray = this.gcLeft.GetViewFocusedDataRow();
string sql = ReplaceHelper.ReplaceRowParam(rowArray, this.SysModel.ClosebtnSql);
string result = SqlHelper.ExecuteScalar(sql) + "";
if (result == "1")
{
e.Cancel = false;//取消关闭事件
}
else
{
this.DialogResult = MessageUtil.Show(string.Format(result), MessageBoxButtons.YesNo);
if (this.DialogResult == DialogResult.No)
{
e.Cancel = true;//取消关闭事件
}
}
}
catch (Exception)
{
this.Dispose();
}
}
/// <summary>
///左侧表格选中设置行
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void SelectSettingsRows()
{
try
{
//设置左侧数据源
string detailSql = ReplaceHelper.ReplaceParamToValue(this.BillModelObj.DetailSql + " " + SysModel.LeftCondition, this.SysModel.BillDocumentId);
//设置左侧条件和加载左侧表数据源
if (this.LeftRowObj != null)
{
DataTable table = BaseModuleImpl.GetCustomQueryFields(this.LeftRowObj["fieldKey"] + "");
string searchSql = detailSql + " ";
if (table != null && table.Rows.Count > 0)
{
// 自定义查询条件
this._leftGridSearchObj = new MyControl(searchSql, this.gcLeft);
this.pl_left_top.Height = this._leftGridSearchObj.InitSearchControl(table, this.pl_left_top);
this._leftGridSearchObj.OnDataSourceBindCallBack += new EventHandler(OnLeftControlObjDataSourceBindCallBack);
}
else
{
this.pl_left_top.Visible = false;
this.gcLeft.SetGridViewDataSource(BaseImpl.GetDataTableResult(detailSql));
}
}
else
{
this.gcLeft.SetGridViewDataSource(BaseImpl.GetDataTableResult(detailSql));
}
//设置选中行
if (!string.IsNullOrWhiteSpace(this.SysModel.SelectionCriteria))
{
DataTable dt = this.gcLeft.gridControl.DataSource as DataTable;
DataRow[] dataRows = dt.Select(this.SysModel.SelectionCriteria);
if (dt.Rows.Count > 0 && dataRows.Length > 0)
{
for (int i = 0; i < dt.Rows.Count; i++)
{
if (dt.Rows[i] == dataRows[0])
{
this.gcLeft.GridView.SelectRowHandler(i);
break;
}
}
}
}
}
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex);
MessageUtil.Show("左侧行选择错误", ex.Message);
}
}
/// <summary>
/// <para>说明:数据绑定完成后加载数据</para>
/// <para>创建人:龚宇超</para>
/// <para>创建日期: </para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
protected void OnLeftControlObjDataSourceBindCallBack(object sender, EventArgs e)
{
try
{
this._leftGridSearchObj.SearchGrid();
}
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex);
MessageUtil.Show(Message, ex.Message);
}
}
}
}
+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>
+186
View File
@@ -0,0 +1,186 @@
namespace Lskj.ProductBarCode2
{
partial class FrmMainModule
{
/// <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
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.pl_bottom = new DevExpress.XtraEditors.PanelControl();
this.splitRightControl = new DevExpress.XtraEditors.SplitContainerControl();
this.moduleGridEx = new Lskj.Control.ModuleGridEx();
this.gcBottom = new Lskj.Control.GridControlEx();
this.pl_top = new DevExpress.XtraEditors.PanelControl();
this.pl_top_main = new DevExpress.XtraEditors.PanelControl();
this.pl_top_right = new DevExpress.XtraEditors.PanelControl();
this.but_CreatBarCode = new DevExpress.XtraEditors.SimpleButton();
((System.ComponentModel.ISupportInitialize)(this.pl_bottom)).BeginInit();
this.pl_bottom.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitRightControl)).BeginInit();
this.splitRightControl.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pl_top)).BeginInit();
this.pl_top.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pl_top_main)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pl_top_right)).BeginInit();
this.pl_top_right.SuspendLayout();
this.SuspendLayout();
//
// 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.splitRightControl);
this.pl_bottom.Controls.Add(this.pl_top);
this.pl_bottom.Dock = System.Windows.Forms.DockStyle.Fill;
this.pl_bottom.Location = new System.Drawing.Point(0, 0);
this.pl_bottom.LookAndFeel.UseDefaultLookAndFeel = false;
this.pl_bottom.Name = "pl_bottom";
this.pl_bottom.Size = new System.Drawing.Size(747, 619);
this.pl_bottom.TabIndex = 10;
//
// splitRightControl
//
this.splitRightControl.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitRightControl.Horizontal = false;
this.splitRightControl.Location = new System.Drawing.Point(0, 42);
this.splitRightControl.Margin = new System.Windows.Forms.Padding(2);
this.splitRightControl.Name = "splitRightControl";
this.splitRightControl.Panel1.Controls.Add(this.moduleGridEx);
this.splitRightControl.Panel1.Text = "Panel1";
this.splitRightControl.Panel2.Controls.Add(this.gcBottom);
this.splitRightControl.Panel2.Text = "Panel2";
this.splitRightControl.Size = new System.Drawing.Size(747, 577);
this.splitRightControl.SplitterPosition = 275;
this.splitRightControl.TabIndex = 7;
this.splitRightControl.Text = "splitContainerControl2";
//
// moduleGridEx
//
this.moduleGridEx.BackColor = System.Drawing.Color.Transparent;
this.moduleGridEx.Dock = System.Windows.Forms.DockStyle.Fill;
this.moduleGridEx.Location = new System.Drawing.Point(0, 0);
this.moduleGridEx.Name = "moduleGridEx";
this.moduleGridEx.OperShortMode = true;
this.moduleGridEx.Size = new System.Drawing.Size(747, 275);
this.moduleGridEx.TabIndex = 0;
this.moduleGridEx.VisibleMrpSearchPanel = false;
this.moduleGridEx.VisibleOperPanel = true;
this.moduleGridEx.VisibleSearchPanel = true;
//
// gcBottom
//
this.gcBottom.AdapterObj = null;
this.gcBottom.Dock = System.Windows.Forms.DockStyle.Fill;
this.gcBottom.Location = new System.Drawing.Point(0, 0);
this.gcBottom.Name = "gcBottom";
this.gcBottom.SiftEnumObj = Lskj.Control.GridControlEx.HeaderSiftEnum.Sum;
this.gcBottom.Size = new System.Drawing.Size(747, 297);
this.gcBottom.TabIndex = 4;
//
// pl_top
//
this.pl_top.Appearance.BackColor = System.Drawing.Color.White;
this.pl_top.Appearance.Options.UseBackColor = true;
this.pl_top.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
this.pl_top.Controls.Add(this.pl_top_main);
this.pl_top.Controls.Add(this.pl_top_right);
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(2);
this.pl_top.Name = "pl_top";
this.pl_top.Size = new System.Drawing.Size(747, 42);
this.pl_top.TabIndex = 6;
//
// pl_top_main
//
this.pl_top_main.Appearance.BackColor = System.Drawing.Color.White;
this.pl_top_main.Appearance.Options.UseBackColor = true;
this.pl_top_main.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
this.pl_top_main.Dock = System.Windows.Forms.DockStyle.Fill;
this.pl_top_main.Location = new System.Drawing.Point(0, 0);
this.pl_top_main.LookAndFeel.Style = DevExpress.LookAndFeel.LookAndFeelStyle.Flat;
this.pl_top_main.LookAndFeel.UseDefaultLookAndFeel = false;
this.pl_top_main.Name = "pl_top_main";
this.pl_top_main.Size = new System.Drawing.Size(661, 42);
this.pl_top_main.TabIndex = 4;
//
// pl_top_right
//
this.pl_top_right.Appearance.BackColor = System.Drawing.Color.White;
this.pl_top_right.Appearance.Options.UseBackColor = true;
this.pl_top_right.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
this.pl_top_right.Controls.Add(this.but_CreatBarCode);
this.pl_top_right.Dock = System.Windows.Forms.DockStyle.Right;
this.pl_top_right.Location = new System.Drawing.Point(661, 0);
this.pl_top_right.Margin = new System.Windows.Forms.Padding(2);
this.pl_top_right.Name = "pl_top_right";
this.pl_top_right.Size = new System.Drawing.Size(86, 42);
this.pl_top_right.TabIndex = 0;
//
// but_CreatBarCode
//
this.but_CreatBarCode.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.but_CreatBarCode.Location = new System.Drawing.Point(12, 6);
this.but_CreatBarCode.Margin = new System.Windows.Forms.Padding(2);
this.but_CreatBarCode.Name = "but_CreatBarCode";
this.but_CreatBarCode.Size = new System.Drawing.Size(65, 27);
this.but_CreatBarCode.TabIndex = 0;
this.but_CreatBarCode.Text = "生成条码";
this.but_CreatBarCode.Click += new System.EventHandler(this.but_CreatBarCode_Click);
//
// FrmMainModule
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.pl_bottom);
this.Name = "FrmMainModule";
this.Size = new System.Drawing.Size(747, 619);
((System.ComponentModel.ISupportInitialize)(this.pl_bottom)).EndInit();
this.pl_bottom.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitRightControl)).EndInit();
this.splitRightControl.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pl_top)).EndInit();
this.pl_top.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pl_top_main)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pl_top_right)).EndInit();
this.pl_top_right.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private DevExpress.XtraEditors.PanelControl pl_bottom;
private DevExpress.XtraEditors.PanelControl pl_top;
private DevExpress.XtraEditors.PanelControl pl_top_main;
private DevExpress.XtraEditors.PanelControl pl_top_right;
private DevExpress.XtraEditors.SimpleButton but_CreatBarCode;
private DevExpress.XtraEditors.SplitContainerControl splitRightControl;
private Control.ModuleGridEx moduleGridEx;
private Control.GridControlEx gcBottom;
}
}
@@ -0,0 +1,457 @@
using DevExpress.XtraEditors;
using Lskj.Business;
using Lskj.Business.Impl;
using Lskj.Control;
using Lskj.Control.Model;
using Lskj.Core;
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.ProductBarCode2
{
public partial class FrmMainModule : UserControl
{
/// <summary>
/// 上方主表
/// </summary>
/// <value>The grid view object.</value>
public ModuleGridEx ModuleGridEx { get { return this.moduleGridEx; } }
/// <summary>
/// 下方明细
/// </summary>
/// <value>The grid view object.</value>
public GridControlEx GcBottom { get { return this.gcBottom; } }
/// <summary>
/// 表格对象
/// </summary>
/// <value>The grid view object.</value>
public GridControlEx GridControlObj { get { return this.moduleGridEx.GridControlObj; } }
/// <summary>
/// 基础模型
/// </summary>
public ModuleModel MoudleObj;
/// <summary>
/// 底部基础模型
/// </summary>
public ModuleModel MoudleBottomObj;
/// <summary>
/// 表格明细集合
/// </summary>
public List<GridDetailModel> GridDetailModelObjs;
/// <summary>
/// 单据信息
/// </summary>
public DataRow _drBillInfo;
/// <summary>
/// 单据模型
/// </summary>
public BillModel BillModelObj;
public DynamicBarCodeModel SysModel;
public DynamicModuleModel dmoudelModel;
/// <summary>
/// 单表模型
/// </summary>
public DynamicModuleModel moudelModel;
/// <summary>
/// 控件对象
/// </summary>
public MyControl ControlObj { get; private set; }
/// <summary>
/// 控件高度
/// </summary>
/// <value>The height of the control.</value>
public int ControlHeight { get; private set; }
/// <summary>
/// 控件数据源
/// </summary>
private DataTable _controlTable;
/// <summary>
/// 设置红蓝单据
/// </summary>
public string BillStatus;
/// <summary>
/// 设置是否有操作权限
/// </summary>
public bool Ispower = true;
/// <summary>
/// 左侧表格查询条件
/// </summary>
private MyControl _leftGridSearchObj;
/// <summary>
/// 左侧表格
/// </summary>
public GridControlEx gridLeft;
public FrmMainModule()
{
InitializeComponent();
}
public void initial()
{
SetInterfaceState();
InitializeSetting();
InitControls();
}
/// <summary>
/// <para>说明:判断是否终审,加载界面是否可以编辑</para>
/// <para>创建人:龚宇超</para>
/// <para>创建日期:2017-10-25 </para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
protected void SetInterfaceState()
{
try
{
DataRow rowItem = SqlHelper.ExecuteDataTable(string.Format("SELECT * FROM {2} WHERE {0}='{1}'", this.BillModelObj.PrimaryKey, this.SysModel.BillDocumentId, this.BillModelObj.MasterTable)).Rows[0];
if (("1".Equals(rowItem[this.BillModelObj.MasterPreFix + "stepover"] + "") || "true".Equals((rowItem[this.BillModelObj.MasterPreFix + "stepover"] + "").ToLower())))
{
this.but_CreatBarCode.Enabled = false;
this.Ispower = false;
}
}
catch (Exception)
{
throw;
}
}
/// <summary>
/// 重新设置生成条码按钮状态和权限
/// </summary>
/// <param name="Authority"></param>
public void SetPermissions(bool Authority)
{
if (Authority)
{
this.but_CreatBarCode.Enabled = true;
this.Ispower = true;
this.gcBottom.SetGridRightMenus(BaseModuleImpl.GetBaseGridRightMenus(this.gcBottom.Model.ModuleCode), this.gcBottom.Model, OnGridViewRightCallBack, this.ControlObj, null);
this.GridControlObj.SetGridRightMenus(BaseModuleImpl.GetBaseGridRightMenus(this.moudelModel.ModuleCode), this.moudelModel, OnGridViewRightCallBack, this.ControlObj, null);
}
else {
this.but_CreatBarCode.Enabled = false;
this.Ispower = false;
this.gcBottom.SetGridRightMenus(new DataTable(), this.gcBottom.Model, OnGridViewRightCallBack, this.ControlObj, null);
this.GridControlObj.SetGridRightMenus(new DataTable(), this.moudelModel, OnGridViewRightCallBack, this.ControlObj, null);
}
}
/// <summary>
/// <para>说明:初始化属性设置</para>
/// <para>创建人:龚宇超</para>
/// <para>创建日期:2018-02-27</para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
private void InitializeSetting()
{
this.GridControlObj.Tag = "IsOldPost";
this.moudelModel = new DynamicModuleModel(new string[] { "0", ERPInfo.Instance.UserId, ERPInfo.Instance.UserName, "1", this.SysModel.MoudelId + "", "0" });
this.MoudleObj = new ModuleModel(MainImpl.GetSystemdllTab(this.moudelModel.ModuleCode));
//初始表头
this.ControlObj = new MyControl();
this.ControlObj = new MyControl(this.MoudleObj.MenuSql, null);
this.ControlObj.OnDataSourceBindCallBack += OnDataSourceBindCallBack;
this.GridDetailModelObjs = GetDetailGrids();
string UnionModule = this.GridDetailModelObjs.Count > 0 ? this.GridDetailModelObjs[0].UnionModule : string.Empty;
if (!string.IsNullOrEmpty(UnionModule))
{
DynamicModuleModel dmoudelModel = new DynamicModuleModel(new string[] { "0", ERPInfo.Instance.UserId, ERPInfo.Instance.UserName, "1", UnionModule + "", "0" });
this.MoudleBottomObj = new ModuleModel(MainImpl.GetSystemdllTab(dmoudelModel.ModuleCode));
DataTable _gridColumns = BaseModuleImpl.GetBaseGridColumns(UnionModule);
this.gcBottom.Model = dmoudelModel;
this.gcBottom.SetReadOnlyColumns(_gridColumns, GridCustomColumnStruct.BaseMainGridView + this.MoudleBottomObj.FormKey);
if (Ispower)
{
this.gcBottom.SetGridRightMenus(BaseModuleImpl.GetBaseGridRightMenus(dmoudelModel.ModuleCode), dmoudelModel, OnGridViewRightCallBack, this.ControlObj, null);
}
if (this.MoudleBottomObj.GridObjIsCheck == 1)//主表加载复选框
{
GridDragGrid.GridAddCheckBox(this.gcBottom.GridView);
}
}
//this._dtFields = BaseModuleImpl.GetControlLocation(this.MoudleObj.FormKey, this.moudelModel.ModuleCode);
}
/// <summary>
/// 创建条码控件
/// </summary>
private void InitControls()
{
this._drBillInfo = BaseAuditImpl.GetCurrentFlowRowData(this.BillModelObj.MasterTable, this.BillModelObj.PrimaryKey, this.SysModel.BillDocumentId);
BillStatus = _drBillInfo[this.BillModelObj.RtagidKey] + "";
this._controlTable = BaseModuleImpl.GetControlLocation(this.MoudleObj.FormKey, this.moudelModel.ModuleCode);
this.ControlObj.InitControl(this._controlTable, this.pl_top_main, BaseModuleImpl.GetAddGroupData(this.MoudleObj.FormKey));
this.ControlObj.SetReadOnlyAllControl(false);
this.moduleGridEx.VisibleSearchPanel = false;
//每次切换时都要设置
//this.gcLeft.Model = this.SysModel;
// this.gcLeft.ParentControl = this.ControlObj;
this.moduleGridEx.InitializeControl(this.MoudleObj, moudelModel);
//_detailColumns = BillImpl.GetDetailColumns(this.SysModel.ModuleCode);
this.moduleGridEx.LeftGridEx = this.gridLeft;
this.moduleGridEx.ParentGridEx = this.gridLeft; // 方便右侧添加数据自动带出相同字段值
this.moduleGridEx.AfterDeleteGridCallBack += ModuleGridExAfterDeleteGridCallBack;//点击删除后刷新上下表数据源
DataTable _gridColumns = BaseModuleImpl.GetBaseGridColumns(this.moudelModel.ModuleCode);
this.GridControlObj.SetEditColumns(_gridColumns, GridCustomColumnStruct.BaseMainGridView + this.MoudleObj.FormKey);
this.GridControlObj.Model = this.moudelModel;
if (Ispower)
{
this.GridControlObj.SetGridRightMenus(BaseModuleImpl.GetBaseGridRightMenus(this.moudelModel.ModuleCode), this.moudelModel, OnGridViewRightCallBack, this.ControlObj, null);
}
if (!(this.SysModel.isRedFlag.Equals("1")))
{
if ("0".Equals(BillStatus))
{
this.splitRightControl.PanelVisibility = SplitPanelVisibility.Panel1;
}
else
{
this.pl_top_main.Visible = false;
this.but_CreatBarCode.Visible = false;
}
}
else
{
if ("1".Equals(BillStatus))
{
this.splitRightControl.PanelVisibility = SplitPanelVisibility.Panel1;
}
//else
//{
// this.pl_top_main.Visible = false;
// this.but_CreatBarCode.Visible = false;
//}
}
if (this.SysModel.isVisibelFlag.Equals("1"))
{
this.pl_top.Visible = false;
this.but_CreatBarCode.Visible = false;
}
this.moduleGridEx.GridControlObj.OnParseGridDataCallBack += new GridControlEx.ParseGridDataEventHandler(OnGridViewParseGridDataCallBack);
}
/// <summary>
/// <para>说明:粘贴表格后更新树结构关联字段</para>
/// <para>创建人:龚宇超</para>
/// <para>创建日期: </para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
/// <param name="rowItem">The row item.</param>
protected void OnGridViewParseGridDataCallBack(DataRow rowItem)
{
if (rowItem != null && rowItem.Table.Columns.Contains(this.moduleGridEx.ParentKeyField))
{
if (this.gridLeft != null)
{
rowItem[this.moduleGridEx.ParentKeyField] = this.gridLeft.GetViewFocusedDataRow()[this.moduleGridEx.ParentKeyField] + "";
}
}
else
{
if (this.gridLeft != null)
{
DataTable table = moduleGridEx.GridControlObj.GridView.GridControl.DataSourceTable();
moduleGridEx.GridControlObj.GridView.SetRowCellValue(this.moduleGridEx.GridControlObj.GridView.GetFocusedDataSourceRowIndex(), this.moduleGridEx.ParentUnionField, this.gridLeft.GetViewFocusedDataRow()[this.moduleGridEx.ParentKeyField] + "");
}
}
}
/// <summary>
/// moduleGridEx点击删除后刷新上下表
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void ModuleGridExAfterDeleteGridCallBack(object sender, EventArgs e)
{
if (this.splitRightControl.PanelVisibility == SplitPanelVisibility.Both)
{
this.GridControlObj.SetGridViewDataSource(MainImpl.GetAdapterResult(this.GridControlObj.LastSearchSql));
this.gcBottom.SetGridViewDataSource(MainImpl.GetAdapterResult(this.gcBottom.LastSearchSql));
}
else
{
this.GridControlObj.SetGridViewDataSource(MainImpl.GetAdapterResult(this.GridControlObj.LastSearchSql));
}
}
/// <summary>
/// 数据绑定完成后触发事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnDataSourceBindCallBack(object sender, EventArgs e)
{
DataRow rowArray = this.gridLeft.GetViewFocusedDataRow();
SetCodeHeader(rowArray);
}
#region
/// <summary>
/// <para>说明:获取报表明细</para>
/// <para>创建人:龚宇超</para>
/// <para>创建日期:2018-02-27 </para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
private List<GridDetailModel> GetDetailGrids()
{
List<GridDetailModel> details = new List<GridDetailModel>();
DataTable moduleDetailBottomTable = BaseModuleImpl.GetBaseDetailPages(this.moudelModel.ModuleCode);
if (moduleDetailBottomTable.Rows.Count == 0)
{
moduleDetailBottomTable = BaseModuleImpl.GetBaseAddTabDetail(this.moudelModel.ModuleCode);
}
foreach (DataRow item in moduleDetailBottomTable.Rows)
{
DataTable dtGridColumns = ReportImpl.GetReportDetailColumns(this.moudelModel.ModuleCode, item["id"] + "");
details.Add(new GridDetailModel(item, dtGridColumns, GridCustomColumnStruct.BaseDetailGridView));
}
return details;
}
#endregion
#region
/// <summary>
/// <para>说明:获取配置条件头属性设置</para>
/// <para>创建人:王一帆</para>
/// <para>创建日期:2021-09-07 </para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
/// <returns>System.String.</returns>
private void SetCodeHeader(DataRow newRow)
{
StringBuilder updateBuilder = new StringBuilder();
foreach (ControlModel model in this.ControlObj.ControlModels)
{
if (!string.IsNullOrEmpty(model.DefaultValue))
{
bool isStart = model.DefaultValue.StartsWith("{");
string fieldName = model.DefaultValue.Replace("{", "").Replace("}", "");
if (newRow != null && newRow.Table.Columns.Contains(fieldName))
{
this.ControlObj.SetControlValue(model.FieldName, newRow[fieldName] + "");
}
else
{
this.ControlObj.SetControlValue(model.FieldName, isStart ? string.Empty : model.DefaultValue);
}
}
}
}
#endregion
/// <summary>
/// <para>说明:右键菜单执行后刷新数据,刷新规则按照上一次查询条件刷新</para>
/// <para>创建人:王一帆</para>
/// <para>创建日期:2020-01-30 </para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
/// <param name="sender">The sender.</param>
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
protected void OnGridViewRightCallBack(object sender, EventArgs e)
{
try
{
if (this.GridControlObj.LastSearchSql != null)
{
this.GridControlObj.SetGridViewDataSource(MainImpl.GetAdapterResult(this.GridControlObj.LastSearchSql));
this.gcBottom.SetGridViewDataSource(MainImpl.GetAdapterResult(this.gcBottom.LastSearchSql));
if (!this.SysModel.CancelPrompt) MessageUtil.Show("成功!");
}
}
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 but_CreatBarCode_Click(object sender, EventArgs e)
{
try
{
DataRow rowArray = this.gridLeft.GetViewFocusedDataRow();
string sql = this.ControlObj.ReplaceControlValue(this.SysModel.BillbtnSql);
sql = ReplaceHelper.ReplaceRowParam(rowArray, sql);
string result = SqlHelper.ExecuteScalar(sql) + "";
if (result == "1")
{
this.GridControlObj.SetGridViewDataSource(MainImpl.GetAdapterResult(this.GridControlObj.LastSearchSql));
this.gcBottom.SetGridViewDataSource(MainImpl.GetAdapterResult(this.gcBottom.LastSearchSql));
if (!this.SysModel.CancelPrompt) MessageUtil.Show("成功!");
}
else
{
MessageUtil.Show(result);
}
}
catch (Exception ex)
{
LogUtil.WriteError("生成条码事件出错!", ex);
string Message = ErrorMessage.PromptErrorMessage(ex);
MessageUtil.Show(Message, ex.Message);
}
}
}
}
@@ -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,178 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{08D58AD0-9064-49C2-9203-40864FF3E95C}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Lskj.ProductBarCode2</RootNamespace>
<AssemblyName>Lskj.ProductBarCode2</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\Debug\Lib\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>..\..\Debug\AllMethodXml\Lskj.ProductBarCode.XML</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<ItemGroup>
<Reference Include="DevExpress.BonusSkins.v15.2" />
<Reference Include="DevExpress.Data.v15.2" />
<Reference Include="DevExpress.Printing.v15.2.Core, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.RichEdit.v15.2.Core, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Spreadsheet.v15.2.Core, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Utils.v15.2" />
<Reference Include="DevExpress.Sparkline.v15.2.Core" />
<Reference Include="DevExpress.XtraBars.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraCharts.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraCharts.v15.2.UI, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraEditors.v15.2" />
<Reference Include="DevExpress.XtraGrid.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraPrinting.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraReports.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraReports.v15.2.Extensions, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraRichEdit.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraScheduler.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraScheduler.v15.2.Core, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraSpreadsheet.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, processorArchitecture=MSIL" />
<Reference Include="FastReport">
<HintPath>..\..\..\引用DLL\FastReport.dll</HintPath>
</Reference>
<Reference Include="Geckofx-Core">
<HintPath>..\..\..\引用DLL\Geckofx-Core.dll</HintPath>
</Reference>
<Reference Include="Geckofx-Winforms">
<HintPath>..\..\..\引用DLL\Geckofx-Winforms.dll</HintPath>
</Reference>
<Reference Include="itextsharp">
<HintPath>..\..\..\引用DLL\itextsharp.dll</HintPath>
</Reference>
<Reference Include="NPOI">
<HintPath>..\..\..\引用DLL\NPOI.dll</HintPath>
</Reference>
<Reference Include="O2S.Components.PDFView4NET">
<HintPath>..\..\..\引用DLL\O2S.Components.PDFView4NET.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Net" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="addControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="addControl.Designer.cs">
<DependentUpon>addControl.cs</DependentUpon>
</Compile>
<Compile Include="FrmMain.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmMain.Designer.cs">
<DependentUpon>FrmMain.cs</DependentUpon>
</Compile>
<Compile Include="DllBaseClass.cs" />
<Compile Include="FrmMainModule.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="FrmMainModule.Designer.cs">
<DependentUpon>FrmMainModule.cs</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="addControl.resx">
<DependentUpon>addControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmMain.resx">
<DependentUpon>FrmMain.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmMainModule.resx">
<DependentUpon>FrmMainModule.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="app.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</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" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Lskj.BarCode")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Lskj.BarCode")]
[assembly: AssemblyCopyright("Copyright © 2013")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("9006f149-aa49-4b8e-ba69-386d945fa738")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
@@ -0,0 +1,63 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace Lskj.ProductBarCode2.Properties {
using System;
/// <summary>
/// 一个强类型的资源类,用于查找本地化的字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// 返回此类使用的缓存的 ResourceManager 实例。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Lskj.ProductBarCode22.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 重写当前线程的 CurrentUICulture 属性,对
/// 使用此强类型资源类的所有资源查找执行重写。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}
@@ -0,0 +1,117 @@
<?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.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: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" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</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" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
@@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace Lskj.ProductBarCode2.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}
@@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>
+95
View File
@@ -0,0 +1,95 @@
namespace Lskj.ProductBarCode2
{
partial class addControl
{
/// <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
/// <summary>
/// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.panelControl2 = new DevExpress.XtraEditors.PanelControl();
this.btn_add = new DevExpress.XtraEditors.SimpleButton();
this.panelMain = new DevExpress.XtraEditors.PanelControl();
((System.ComponentModel.ISupportInitialize)(this.panelControl2)).BeginInit();
this.panelControl2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.panelMain)).BeginInit();
this.SuspendLayout();
//
// panelControl2
//
this.panelControl2.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
this.panelControl2.Controls.Add(this.btn_add);
this.panelControl2.Dock = System.Windows.Forms.DockStyle.Right;
this.panelControl2.Location = new System.Drawing.Point(896, 0);
this.panelControl2.Name = "panelControl2";
this.panelControl2.Size = new System.Drawing.Size(86, 47);
this.panelControl2.TabIndex = 2;
//
// btn_add
//
this.btn_add.Dock = System.Windows.Forms.DockStyle.Fill;
this.btn_add.Location = new System.Drawing.Point(2, 2);
this.btn_add.Name = "btn_add";
this.btn_add.Size = new System.Drawing.Size(82, 43);
this.btn_add.TabIndex = 0;
this.btn_add.Text = "增加条码";
//
// panelMain
//
this.panelMain.Appearance.BackColor = System.Drawing.Color.White;
this.panelMain.Appearance.Options.UseBackColor = true;
this.panelMain.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
this.panelMain.Dock = System.Windows.Forms.DockStyle.Fill;
this.panelMain.Location = new System.Drawing.Point(0, 0);
this.panelMain.LookAndFeel.Style = DevExpress.LookAndFeel.LookAndFeelStyle.Flat;
this.panelMain.LookAndFeel.UseDefaultLookAndFeel = false;
this.panelMain.Margin = new System.Windows.Forms.Padding(4);
this.panelMain.Name = "panelMain";
this.panelMain.Size = new System.Drawing.Size(896, 47);
this.panelMain.TabIndex = 3;
//
// addControl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.panelMain);
this.Controls.Add(this.panelControl2);
this.Name = "addControl";
this.Size = new System.Drawing.Size(982, 47);
((System.ComponentModel.ISupportInitialize)(this.panelControl2)).EndInit();
this.panelControl2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.panelMain)).EndInit();
this.ResumeLayout(false);
}
#endregion
private DevExpress.XtraEditors.PanelControl panelControl2;
private DevExpress.XtraEditors.SimpleButton btn_add;
private DevExpress.XtraEditors.PanelControl panelMain;
}
}
@@ -0,0 +1,109 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Lskj.Model;
using Lskj.Control.Model;
using Lskj.Business.Impl;
using DevExpress.XtraEditors;
namespace Lskj.ProductBarCode2
{
public partial class addControl : UserControl
{
/// <summary>
/// 查询条件
/// </summary>
private DataTable _controlTable = new DataTable();
/// <summary>
/// 系统模块实体对象
/// </summary>
/// <value>The system model.</value>
public ModuleModel SysModel { get; private set; }
/// <summary>
/// 控件对象
/// </summary>
public MyControl ControlObj { get; private set; }
/// <summary>
/// 调用动态链接库默认传递参数对象
/// </summary>
public DynamicModel Model { get; private set; }
/// <summary>
/// 添加条码条件
/// </summary>
public string addbtnSql;
/// <summary>
/// 添加按钮回调sql
/// </summary>
public string addCellSql;
/// <summary>
/// 点击增加条码触发事件
/// </summary>
/// <param name="sender">The sender.</param>
public event EventHandler OnAddGridCallback;
public addControl()
{
InitializeComponent();
}
/// <summary>
/// <para>说明:创建界面</para>
/// <para>创建人:龚宇超</para>
/// <para>创建日期:2017-09-12 </para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
/// <param name="menuCode">The menu code.</param>
public void InitControls(DynamicModel model,string addbtnSql)
{
this.Model = model;
this.SysModel = new ModuleModel(MainImpl.GetSystemdllTab(this.Model.ModuleCode));
this.ControlObj = new MyControl();
this.ControlObj = new MyControl(this.SysModel.MenuSql, null);
this._controlTable = BaseModuleImpl.GetControlLocation(this.SysModel.FormKey, this.Model.ModuleCode);
this.ControlObj.InitControl(this._controlTable, this.panelMain, BaseModuleImpl.GetAddGroupData(this.SysModel.FormKey));
this.btn_add.Click += new EventHandler(OnAddBtnClick);
this.addbtnSql = addbtnSql;
}
/// <summary>
/// 增加条码事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
public void OnAddBtnClick(object sender, EventArgs e)
{
addCellSql = this.ControlObj.ReplaceControlValue(addbtnSql);
if (OnAddGridCallback != null)
{
this.OnAddGridCallback(sender, e);
}
}
#region
/// <summary>
/// <para>说明:隐藏搜索</para>
/// <para>创建人:王一帆</para>
/// <para>创建日期:2020-01-09</para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
private void HideControls()
{
foreach (System.Windows.Forms.Control control in this.panelMain.Controls)
{
if (control is SimpleButton)
{
SimpleButton simpleButton = control as SimpleButton;
simpleButton.Visible = false;
}
}
}
#endregion
}
}
@@ -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>
+36
View File
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" /></startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<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="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="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>
<dependentAssembly>
<assemblyIdentity name="Spire.XLS" publicKeyToken="663f351905198cb3" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-10.3.8.0" newVersion="10.3.8.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Spire.Presentation" publicKeyToken="663f351905198cb3" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.3.6.0" newVersion="5.3.6.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Spire.Doc" publicKeyToken="663f351905198cb3" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-8.3.15.0" newVersion="8.3.15.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>