基线 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,36 @@
using System;
using System.Windows.Forms;
using Lskj.Util;
using Lskj.Business;
using Lskj.PubUserPrivate;
namespace Lskj.PubModulePrivate
{
/// <summary>
/// c#库被调用统一接口类
/// </summary>
public sealed class DllBaseClass : IForm
{
public DllBaseClass()
{
}
public DllBaseClass(string[] obj)
{
try
{
FrmMain main = new FrmMain();
this.SubForm = main;
}
catch (Exception ex)
{
LogUtil.WriteError("Lskj.PubUserToUser.dll--参数错误-->" + obj.ToString(), ex);
}
}
/// <summary>
/// 窗口
/// </summary>
public Form SubForm { get; set; }
}
}
+203
View File
@@ -0,0 +1,203 @@
namespace Lskj.PubUserPrivate
{
partial class FrmMain
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.splitContainerControl3 = new DevExpress.XtraEditors.SplitContainerControl();
this.panelControl22 = new DevExpress.XtraEditors.PanelControl();
this.AllQuickControlEx = new Lskj.Control.GridControlEx();
this.panelControl23 = new DevExpress.XtraEditors.PanelControl();
this.Save = new DevExpress.XtraEditors.SimpleButton();
this.panelControl24 = new DevExpress.XtraEditors.PanelControl();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.checkGrid = new Lskj.Control.GridControlEx();
this.panelControl25 = new DevExpress.XtraEditors.PanelControl();
this.SetRemovePermissions = new DevExpress.XtraEditors.SimpleButton();
((System.ComponentModel.ISupportInitialize)(this.splitContainerControl3)).BeginInit();
this.splitContainerControl3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.panelControl22)).BeginInit();
this.panelControl22.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.panelControl23)).BeginInit();
this.panelControl23.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.panelControl24)).BeginInit();
this.panelControl24.SuspendLayout();
this.groupBox3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.panelControl25)).BeginInit();
this.panelControl25.SuspendLayout();
this.SuspendLayout();
//
// splitContainerControl3
//
this.splitContainerControl3.CollapsePanel = DevExpress.XtraEditors.SplitCollapsePanel.Panel2;
this.splitContainerControl3.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainerControl3.Horizontal = false;
this.splitContainerControl3.Location = new System.Drawing.Point(0, 0);
this.splitContainerControl3.Name = "splitContainerControl3";
this.splitContainerControl3.Panel1.Controls.Add(this.panelControl22);
this.splitContainerControl3.Panel1.Controls.Add(this.panelControl23);
this.splitContainerControl3.Panel1.Text = "Panel1";
this.splitContainerControl3.Panel2.Controls.Add(this.panelControl24);
this.splitContainerControl3.Panel2.Controls.Add(this.panelControl25);
this.splitContainerControl3.Panel2.Text = "Panel2";
this.splitContainerControl3.Size = new System.Drawing.Size(855, 478);
this.splitContainerControl3.SplitterPosition = 233;
this.splitContainerControl3.TabIndex = 6;
this.splitContainerControl3.Text = "splitContainerControl1";
//
// panelControl22
//
this.panelControl22.Controls.Add(this.AllQuickControlEx);
this.panelControl22.Dock = System.Windows.Forms.DockStyle.Fill;
this.panelControl22.Location = new System.Drawing.Point(0, 0);
this.panelControl22.Name = "panelControl22";
this.panelControl22.Size = new System.Drawing.Size(855, 195);
this.panelControl22.TabIndex = 25;
//
// AllQuickControlEx
//
this.AllQuickControlEx.AdapterObj = null;
this.AllQuickControlEx.Dock = System.Windows.Forms.DockStyle.Fill;
this.AllQuickControlEx.Location = new System.Drawing.Point(2, 2);
this.AllQuickControlEx.Margin = new System.Windows.Forms.Padding(4);
this.AllQuickControlEx.Name = "AllQuickControlEx";
this.AllQuickControlEx.SiftEnumObj = Lskj.Control.GridControlEx.HeaderSiftEnum.Sum;
this.AllQuickControlEx.Size = new System.Drawing.Size(851, 191);
this.AllQuickControlEx.TabIndex = 1;
//
// panelControl23
//
this.panelControl23.Controls.Add(this.Save);
this.panelControl23.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panelControl23.Location = new System.Drawing.Point(0, 195);
this.panelControl23.Name = "panelControl23";
this.panelControl23.Size = new System.Drawing.Size(855, 38);
this.panelControl23.TabIndex = 11;
//
// Save
//
this.Save.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.Save.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Save.Appearance.Options.UseFont = true;
this.Save.Location = new System.Drawing.Point(749, 5);
this.Save.Name = "Save";
this.Save.Size = new System.Drawing.Size(100, 28);
this.Save.TabIndex = 24;
this.Save.TabStop = false;
this.Save.Text = "设置私密人员";
//
// panelControl24
//
this.panelControl24.Controls.Add(this.groupBox3);
this.panelControl24.Dock = System.Windows.Forms.DockStyle.Fill;
this.panelControl24.Location = new System.Drawing.Point(0, 0);
this.panelControl24.Name = "panelControl24";
this.panelControl24.Size = new System.Drawing.Size(855, 205);
this.panelControl24.TabIndex = 27;
//
// groupBox3
//
this.groupBox3.Controls.Add(this.checkGrid);
this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill;
this.groupBox3.Location = new System.Drawing.Point(2, 2);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(851, 201);
this.groupBox3.TabIndex = 3;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "私密人员";
//
// checkGrid
//
this.checkGrid.AdapterObj = null;
this.checkGrid.Dock = System.Windows.Forms.DockStyle.Fill;
this.checkGrid.Location = new System.Drawing.Point(3, 22);
this.checkGrid.Margin = new System.Windows.Forms.Padding(4);
this.checkGrid.Name = "checkGrid";
this.checkGrid.SiftEnumObj = Lskj.Control.GridControlEx.HeaderSiftEnum.Sum;
this.checkGrid.Size = new System.Drawing.Size(845, 176);
this.checkGrid.TabIndex = 1;
//
// panelControl25
//
this.panelControl25.Controls.Add(this.SetRemovePermissions);
this.panelControl25.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panelControl25.Location = new System.Drawing.Point(0, 205);
this.panelControl25.Name = "panelControl25";
this.panelControl25.Size = new System.Drawing.Size(855, 34);
this.panelControl25.TabIndex = 8;
//
// SetRemovePermissions
//
this.SetRemovePermissions.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.SetRemovePermissions.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.SetRemovePermissions.Appearance.Options.UseFont = true;
this.SetRemovePermissions.Location = new System.Drawing.Point(724, 4);
this.SetRemovePermissions.Name = "SetRemovePermissions";
this.SetRemovePermissions.Size = new System.Drawing.Size(126, 28);
this.SetRemovePermissions.TabIndex = 26;
this.SetRemovePermissions.TabStop = false;
this.SetRemovePermissions.Text = "删除已选择人员";
//
// FrmMain
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(855, 478);
this.Controls.Add(this.splitContainerControl3);
this.Name = "FrmMain";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "FrmMain";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
((System.ComponentModel.ISupportInitialize)(this.splitContainerControl3)).EndInit();
this.splitContainerControl3.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.panelControl22)).EndInit();
this.panelControl22.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.panelControl23)).EndInit();
this.panelControl23.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.panelControl24)).EndInit();
this.panelControl24.ResumeLayout(false);
this.groupBox3.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.panelControl25)).EndInit();
this.panelControl25.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private DevExpress.XtraEditors.SplitContainerControl splitContainerControl3;
private DevExpress.XtraEditors.PanelControl panelControl22;
private Control.GridControlEx AllQuickControlEx;
private DevExpress.XtraEditors.PanelControl panelControl23;
private DevExpress.XtraEditors.SimpleButton Save;
private DevExpress.XtraEditors.PanelControl panelControl24;
private System.Windows.Forms.GroupBox groupBox3;
private Control.GridControlEx checkGrid;
private DevExpress.XtraEditors.PanelControl panelControl25;
private DevExpress.XtraEditors.SimpleButton SetRemovePermissions;
}
}
+412
View File
@@ -0,0 +1,412 @@
using DevExpress.XtraGrid.Columns;
using Lskj.Business;
using Lskj.Business.Impl;
using Lskj.Control;
using Lskj.Control.Model;
using Lskj.Core;
using Lskj.Data;
using Lskj.Model;
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.PubUserPrivate
{
public partial class FrmMain : Form
{
/// <summary>
/// 全部的人员
/// </summary>
public DataTable AllUserTable = new DataTable();
/// <summary>
/// 全部的私有人员人员
/// </summary>
public DataTable AllPrivateUserTable = new DataTable();
/// <summary>
/// 全部的私密人员
/// </summary>
public List<string> AllPrivateUser = new List<string>();
public FrmMain()
{
InitializeComponent();
this.Load += FrmMain_Load;
}
/// <summary>
/// 窗体加载时
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void FrmMain_Load(object sender, EventArgs e)
{
if (CheckPrivateUserTable())
{
this.AllUserTable = GetUsersInfo("", "");
this.AllPrivateUserTable = this.AllUserTable.Clone();
this.AllPrivateUser = GetPrivateUsersInfo();
this.AllUserTable.DefaultView.Sort = "employeeid";
this.AllPrivateUserTable.DefaultView.Sort = "employeeid";
InitGrid();
InitBtn();
}
else
{
Lskj.Control.MessageUtil.Show("私有模块数据表不存在或功能未开启,请联系管理员");
return;
}
}
private void InitBtn()
{
this.Save.Click += new EventHandler(OnPrivateSave);
this.SetRemovePermissions.Click += new EventHandler(OnPrivateDeleteClick);
}
/// <summary>
/// 初始化左侧表格
/// </summary>
private void InitGrid()
{
this.AllQuickControlEx.GridView.Columns.AddVisible("loginaccount", "员工工号").MinWidth = 100;
this.AllQuickControlEx.GridView.Columns.AddVisible("employeename", "员工姓名").MinWidth = 200;
this.AllQuickControlEx.GridView.Columns.AddVisible("departmentname", "部门名称").MinWidth = 200;
this.checkGrid.GridView.Columns.AddVisible("loginaccount", "员工工号").MinWidth = 100;
this.checkGrid.GridView.Columns.AddVisible("employeename", "员工姓名").MinWidth = 200;
this.checkGrid.GridView.Columns.AddVisible("departmentname", "部门名称").MinWidth = 200;
this.AllQuickControlEx.GridView.BestFitColumns();//设置根据内容填充列宽
this.AllQuickControlEx.GridView.OptionsBehavior.EditorShowMode = DevExpress.Utils.EditorShowMode.MouseDown;
GridDragGrid dragPrivateGrid = new GridDragGrid(this.AllQuickControlEx.GridView, this.checkGrid.GridView);
GridDragGrid dragPrivateGridNew = new GridDragGrid(this.checkGrid.GridView, this.AllQuickControlEx.GridView);
GridDragGrid.GridAddCheckBox(this.checkGrid.GridView);
GridDragGrid.GridAddCheckBox(this.AllQuickControlEx.GridView);
this.checkGrid.GridView.OptionsSelection.EnableAppearanceFocusedCell = false;
this.AllQuickControlEx.GridControl.AllowDrop = true;
this.checkGrid.GridControl.AllowDrop = true;
this.AllQuickControlEx.GridView.OptionsBehavior.Editable = false;
this.checkGrid.GridView.OptionsBehavior.Editable = false;
this.AllQuickControlEx.GridView.OptionsCustomization.AllowSort = false;
this.checkGrid.GridView.OptionsCustomization.AllowSort = false;
this.AllQuickControlEx.gridControl.DataSource = AllUserTable;
this.checkGrid.GridControl.DataSource = AllPrivateUserTable;
this.AllQuickControlEx.GridView.BestFitColumns();
this.checkGrid.GridView.BestFitColumns();
foreach (string item in AllPrivateUser)
{
try
{
DataRow dataRow = AllUserTable.Select().Where(n => (n["employeeid"] + "").Equals(item)).FirstOrDefault();
if (dataRow != null)
{
AllPrivateUserTable.Rows.Add(dataRow.ItemArray);
AllUserTable.Rows.Remove(dataRow);
}
}
catch (Exception ex)
{
}
}
}
public void PrivateAccessPermissions(DataRow rowItem, string privateTag)
{
DataRow dr = this.AllPrivateUserTable.NewRow();
dr.ItemArray = rowItem.ItemArray;
this.AllPrivateUserTable.Rows.Add(dr);
}
/// <summary>
/// 判断私有模块权限表格是否存在
/// </summary>
private bool CheckPrivateUserTable()
{
try
{
string alterSql = "";
if (!BaseImpl.HasExistsColumn("p_employeeTab", "isPrivateLogin"))
{
alterSql += "alter table p_employeeTab add isPrivateLogin int;";
}
if (!string.IsNullOrEmpty(alterSql))
{
SqlHelper.ExecuteNonQuery(alterSql);
}
return true;
}
catch (Exception)
{
return false;
}
}
/// <summary>
/// 下方数据删除,上方取消勾选
/// </summary>
/// <param name="rowItem"></param>
public void RemovePermissions(DataRow rowItem)
{
DataRow dr = this.AllUserTable.NewRow();
dr.ItemArray = rowItem.ItemArray;
this.AllUserTable.Rows.Add(dr);
}
#region
/// <summary>
/// 设置私密权限保存事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnPrivateSave(object sender, EventArgs e)
{
//if (!CheckPassWord())
//{
// return;
//}
int[] rowNumbers = this.AllQuickControlEx.GridView.GetSelectedRows();
List<DataRow> addRows = new List<DataRow>();
foreach (int rowIndex in rowNumbers)
{
DataRow rowItem = this.AllQuickControlEx.GridView.GetDataRow(rowIndex);
addRows.Add(rowItem);
}
foreach (DataRow dr in addRows)
{
PrivateAccessPermissions(dr, "1");
this.AllUserTable.Rows.Remove(dr);
}
SaveProvate();
}
/// <summary>\
/// 删除权限 QuickOperationControlEx表
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnPrivateDeleteClick(object sender, EventArgs e)
{
//if (!CheckPassWord())
//{
// return;
//}
int[] rowNumbers = this.checkGrid.GridView.GetSelectedRows();
if (rowNumbers.Length == 0) return;
List<DataRow> deleteRows = new List<DataRow>();
foreach (int rowIndex in rowNumbers)
{
DataRow rowItem = this.checkGrid.GridView.GetDataRow(rowIndex);
deleteRows.Add(rowItem);
}
foreach (DataRow dr in deleteRows)
{
RemovePermissions(dr);
this.AllPrivateUserTable.Rows.Remove(dr);
}
SaveProvate();
}
/// <summary>
/// 检查密码状态
/// </summary>
private bool CheckPassWord()
{
bool isCheck = false;
int keyHandle = ERPInfo.Instance.keyHandles[0];
int uPin1 = Convert.ToInt32("0x987F6BCD", 16);
int uPin2 = Convert.ToInt32("0xE193C5B2", 16);
int uPin3 = Convert.ToInt32("0xD507CC28", 16);
int uPin4 = Convert.ToInt32("0x4B125AF6", 16);
int rtn = SmartX1Api.SmartX1Open(keyHandle, uPin1, uPin2, uPin3, uPin4);
if (rtn == 0)
{
byte[] readBuffer = new byte[256];
int add = 0;
int len = 256;
int readPageRtn = SmartX1Api.SmartX1ReadPage(keyHandle, 1, add, ref len, readBuffer);
if (readPageRtn == 0)
{
string savePassword = Encoding.Default.GetString(readBuffer);
if (savePassword.Equals(ERPInfo.Instance.dogVerifyPasswordDefault) || string.IsNullOrWhiteSpace(savePassword.Replace("\0", "")))
{
MessageUtil.Show("当前未设置U盾密码,请设置后重试");
}
else
{
isCheck = true;
}
}
else
{
MessageUtil.Show("U盾数据获取失败,请重试或联系管理员");
}
}
else
{
MessageUtil.Show("U盾数据获取失败,请重试或联系管理员");
}
SmartX1Api.SmartX1Close(keyHandle);
return isCheck;
}
/// <summary>
/// 获取员工信息
/// </summary>
/// <param name="depid"></param>
/// <param name="mf"></param>
/// <returns></returns>
private DataTable GetUsersInfo(string depid, string mf)
{
string where = string.Empty;
if (!string.IsNullOrEmpty(depid))
where = " and a.departmentid=" + depid;
if (!string.IsNullOrEmpty(mf))
where = string.Format(" and (a.loginaccount like '%{0}%' or a.employeename like '%{0}%' or dbo.P_getpy(a.employeename) like '%{0}%')", mf);
string sqlValue = "select a.loginaccount,a.employeeid,a.employeename,a.departmentid,b.departmentname from p_employeeTab a left join P_DepartmentTab b on a.departmentid=b.departmentid where a.sign=0 and a.UseFlag=1 " + where + " order by a.employeeid";
return BaseImpl.GetDataTableResult(sqlValue);
}
/// <summary>
/// 获取私密人员
/// </summary>
private List<string> GetPrivateUsersInfo()
{
List<string> readVerifyStrList = new List<string>();
try
{
int keyHandle = ERPInfo.Instance.keyHandles[0];
int uPin1 = Convert.ToInt32("0x987F6BCD", 16);
int uPin2 = Convert.ToInt32("0xE193C5B2", 16);
int uPin3 = Convert.ToInt32("0xD507CC28", 16);
int uPin4 = Convert.ToInt32("0x4B125AF6", 16);
int rtn = SmartX1Api.SmartX1Open(keyHandle, uPin1, uPin2, uPin3, uPin4);
if (rtn == 0)
{
string writeKey = string.Format("{0}_{1}", DBConfig.Instance.ServerName, DBConfig.Instance.DataBase);
int length = 256;
byte[] readBuffer = new byte[length];
int readRtn = SmartX1Api.SmartX1ReadPage(keyHandle, 1, 0, ref length, readBuffer);
if (readRtn == 0)
{
Dictionary<string, string> readKeysValues = new Dictionary<string, string>();
string readVerifyStr = Encoding.Default.GetString(readBuffer);
string[] readVerifyStrArray = readVerifyStr.Replace("\0", "").Split(';');//获取多个账套设置
foreach (string readVerify in readVerifyStrArray)
{
string[] readKeyValue = readVerify.Split('^');//获取单个账套
if (readKeyValue.Length == 2)
{
readKeysValues.Add(readKeyValue[0], readKeyValue[1]);
}
}
if (readKeysValues.ContainsKey(writeKey))//如果存在当前账套
{
readVerifyStrList = readKeysValues[writeKey].Split('^').ToList();
}
}
else
{
MessageUtil.Show("U盾数据获取失败,请重试或联系管理员");
return readVerifyStrList;
}
}
else
{
MessageUtil.Show("U盾数据获取失败,请重试或联系管理员");
return readVerifyStrList;
}
}
catch (Exception)
{
}
return readVerifyStrList;
}
private void SaveProvate()
{
WaitForm.ShowForm(ResourceKeys.DataSaving);
try
{
string sql = string.Empty;
string writeStr = string.Empty;
foreach (DataRow dr in this.AllPrivateUserTable.Rows)
{
writeStr += string.Format("{0},", dr["employeeid"] + "");
}
int keyHandle = ERPInfo.Instance.keyHandles[0];
int uPin1 = Convert.ToInt32("0x987F6BCD", 16);
int uPin2 = Convert.ToInt32("0xE193C5B2", 16);
int uPin3 = Convert.ToInt32("0xD507CC28", 16);
int uPin4 = Convert.ToInt32("0x4B125AF6", 16);
int rtn = SmartX1Api.SmartX1Open(keyHandle, uPin1, uPin2, uPin3, uPin4);
if (rtn == 0)
{
string writeKey = string.Format("{0}_{1}", DBConfig.Instance.ServerName, DBConfig.Instance.DataBase);
int length = 256;
byte[] readBuffer = new byte[length];
int readRtn = SmartX1Api.SmartX1ReadPage(keyHandle, 1, 0, ref length, readBuffer);
if (readRtn == 0)
{
Dictionary<string, string> readKeysValues = new Dictionary<string, string>();
string readVerifyStr = Encoding.Default.GetString(readBuffer);
string[] readVerifyStrArray = readVerifyStr.Replace("\0", "").Split(';');//获取多个账套设置
foreach (string readVerify in readVerifyStrArray)
{
string[] readKeyValue = readVerify.Split('^');//获取单个账套
if (readKeyValue.Length == 2)
{
readKeysValues.Add(readKeyValue[0], readKeyValue[1]);
}
}
if (readKeysValues.ContainsKey(writeKey))//如果存在当前账套
{
readKeysValues[writeKey] = writeStr.TrimEnd(',');
}
else
{
readKeysValues.Add(writeKey, writeStr.TrimEnd(','));
}
string allWriteStr = string.Empty;
foreach (string key in readKeysValues.Keys)
{
allWriteStr += string.Format("{0}^{1};", key, readKeysValues[key]);
}
byte[] writeBuffer = Encoding.Default.GetBytes(allWriteStr);
int writeRtn = SmartX1Api.SmartX1WritePage(keyHandle, 1, 0, 256, writeBuffer);
if (writeRtn == 0)
{
MessageUtil.Show("保存成功");
}
else
{
MessageUtil.Show("U盾数据获取失败,请重试或联系管理员");
return;
}
}
else
{
MessageUtil.Show("U盾数据获取失败,请重试或联系管理员");
return;
}
}
else
{
MessageUtil.Show("U盾验证失败,请重试或联系管理员");
return;
}
SmartX1Api.SmartX1Close(keyHandle);
}
catch (Exception ex)
{
MessageUtil.Show("保存失败");
}
finally
{
WaitForm.HideForm();
}
}
#endregion
}
}
+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,146 @@
<?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>{96C30EF7-5C16-40EA-A2E2-9800F01BFC17}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>Lskj.PubUserPrivate</RootNamespace>
<AssemblyName>Lskj.PubUserPrivate</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<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>
</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.Data.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.Utils.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.XtraEditors.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.XtraGrid.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\Lskj.LserpAll\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Threading.Tasks.Extensions, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\Lskj.LserpAll\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Threading.Tasks.Extensions.Desktop, Version=1.0.168.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\Lskj.LserpAll\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.IO, Version=2.6.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\Lskj.LserpAll\packages\Microsoft.Bcl.1.1.10\lib\net40\System.IO.dll</HintPath>
</Reference>
<Reference Include="System.Net" />
<Reference Include="System.Runtime, Version=2.6.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\Lskj.LserpAll\packages\Microsoft.Bcl.1.1.10\lib\net40\System.Runtime.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Tasks, Version=2.6.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\Lskj.LserpAll\packages\Microsoft.Bcl.1.1.10\lib\net40\System.Threading.Tasks.dll</HintPath>
</Reference>
<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="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" />
<EmbeddedResource Include="FrmMain.resx">
<DependentUpon>FrmMain.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\licenses.licx" />
<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>
</Compile>
<None Include="app.config" />
<None Include="packages.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.ProductDynamic\Lskj.ProductDynamic.csproj">
<Project>{DB8D4194-816A-4EA3-86C2-90BA02134CF9}</Project>
<Name>Lskj.ProductDynamic</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" />
<Import Project="..\Lskj.LserpAll\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets" Condition="Exists('..\Lskj.LserpAll\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\Lskj.LserpAll\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\Lskj.LserpAll\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets'))" />
</Target>
</Project>
@@ -0,0 +1,8 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("Lskj.PubUserPrivate")]
@@ -0,0 +1,36 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本: 4.0.30319.42000
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace Lskj.PubUserPrivate.Properties
{
/// <summary>
/// 强类型资源类,用于查找本地化字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.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()
{
}
}
}
@@ -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,2 @@
//------------------------------------------------------------------------------
// <auto-generated>
@@ -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>
+35
View File
@@ -0,0 +1,35 @@
<?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-12.0.0.0" newVersion="12.0.0.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>
<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>
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net40" />
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net40" />
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="net40" />
</packages>