init lserp cs 5.0

This commit is contained in:
cyf
2026-07-10 15:25:05 +08:00
commit 90f3fda86a
3799 changed files with 976868 additions and 0 deletions
@@ -0,0 +1,125 @@
namespace Lskj.Common.ComfirmDialog
{
partial class ComfirmDialog
{
/// <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.labelHint = new DevExpress.XtraEditors.LabelControl();
this.simpleButton1 = new DevExpress.XtraEditors.SimpleButton();
this.memInput = new DevExpress.XtraEditors.MemoEdit();
this.simpleButton2 = new DevExpress.XtraEditors.SimpleButton();
this.panelControl1 = new DevExpress.XtraEditors.PanelControl();
((System.ComponentModel.ISupportInitialize)(this.memInput.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.panelControl1)).BeginInit();
this.panelControl1.SuspendLayout();
this.SuspendLayout();
//
// labelHint
//
this.labelHint.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.labelHint.Dock = System.Windows.Forms.DockStyle.Top;
this.labelHint.Location = new System.Drawing.Point(8, 8);
this.labelHint.Name = "labelHint";
this.labelHint.Padding = new System.Windows.Forms.Padding(5);
this.labelHint.Size = new System.Drawing.Size(58, 22);
this.labelHint.TabIndex = 0;
this.labelHint.Text = "请输入:";
//
// simpleButton1
//
this.simpleButton1.Location = new System.Drawing.Point(115, 8);
this.simpleButton1.Name = "simpleButton1";
this.simpleButton1.Size = new System.Drawing.Size(74, 26);
this.simpleButton1.TabIndex = 1;
this.simpleButton1.Text = "确定(&Y)";
this.simpleButton1.Click += new System.EventHandler(this.simpleButton1_Click);
//
// memInput
//
this.memInput.Dock = System.Windows.Forms.DockStyle.Fill;
this.memInput.Location = new System.Drawing.Point(8, 30);
this.memInput.Name = "memInput";
this.memInput.Properties.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.memInput.Size = new System.Drawing.Size(416, 191);
this.memInput.TabIndex = 2;
//
// simpleButton2
//
this.simpleButton2.Location = new System.Drawing.Point(209, 8);
this.simpleButton2.Name = "simpleButton2";
this.simpleButton2.Size = new System.Drawing.Size(74, 26);
this.simpleButton2.TabIndex = 3;
this.simpleButton2.Text = "取消(&E)";
this.simpleButton2.Click += new System.EventHandler(this.simpleButton2_Click);
//
// panelControl1
//
this.panelControl1.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
this.panelControl1.Controls.Add(this.simpleButton1);
this.panelControl1.Controls.Add(this.simpleButton2);
this.panelControl1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panelControl1.Location = new System.Drawing.Point(8, 221);
this.panelControl1.LookAndFeel.SkinName = "Office 2013";
this.panelControl1.Name = "panelControl1";
this.panelControl1.Size = new System.Drawing.Size(416, 42);
this.panelControl1.TabIndex = 4;
//
// ComfirmDialog
//
this.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
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(432, 271);
this.ControlBox = false;
this.Controls.Add(this.memInput);
this.Controls.Add(this.panelControl1);
this.Controls.Add(this.labelHint);
this.LookAndFeel.SkinName = "Office 2010 Blue";
this.LookAndFeel.Style = DevExpress.LookAndFeel.LookAndFeelStyle.Office2003;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "ComfirmDialog";
this.Padding = new System.Windows.Forms.Padding(8);
this.Text = "确认框";
((System.ComponentModel.ISupportInitialize)(this.memInput.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.panelControl1)).EndInit();
this.panelControl1.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private DevExpress.XtraEditors.LabelControl labelHint;
private DevExpress.XtraEditors.SimpleButton simpleButton1;
private DevExpress.XtraEditors.MemoEdit memInput;
private DevExpress.XtraEditors.SimpleButton simpleButton2;
private DevExpress.XtraEditors.PanelControl panelControl1;
}
}
@@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CommonLib.data;
namespace Lskj.Common.ComfirmDialog
{
public partial class ComfirmDialog : FormBase
{
public string ComfirmMsg = string.Empty;
public ComfirmDialog(string hint)
{
InitializeComponent();
memInput.Text = "";
ComfirmMsg = "";
labelHint.Text = hint;
}
private void simpleButton1_Click(object sender, EventArgs e)
{
ComfirmMsg = memInput.Text;
if (ComfirmMsg.Trim() == "")
ComfirmMsg = "未填写任何内容";
this.DialogResult = DialogResult.OK;
this.Close();
}
private void simpleButton2_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
this.Close();
}
}
}
@@ -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>
+14
View File
@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Lskj.Common
{
public class ControlModel
{
public object ControlObj { get; set; }
public string Tag { get; set; }
public int TypeId { get; set; }
}
}
+23
View File
@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Lskj.Common
{
public class DLLType
{
/// <summary>
/// 树
/// </summary>
public const int DllLeftTree = 1;
/// <summary>
/// 列表
/// </summary>
public const int DllLeftGrid = 2;
/// <summary>
/// 左边没有
/// </summary>
public const int DllLeft = 3;
}
}
@@ -0,0 +1,23 @@
using System;
using System.Data;
using System.Text;
using Lskj.DevFx.Utils;
using Lskj.DevFx.Core;
using Lskj.DBUtility.Helper;
using Lskj.DBUtility.Provider;
using System.ComponentModel;
using System.Collections.Generic;
namespace Lskj.Dao
{
/// <summary>
/// 数据访问类P_BaseMixInfoTabDao。
/// </summary>
public class P_BaseMixInfoTabDao:BaseProvider<Lskj.Model.P_BaseMixInfoTab>
{
public P_BaseMixInfoTabDao()
{
//Model = new Lskj.Model.P_BaseMixInfoTab();
}
}
}
@@ -0,0 +1,23 @@
using System;
using System.Data;
using System.Text;
using Lskj.DevFx.Utils;
using Lskj.DevFx.Core;
using Lskj.DBUtility.Helper;
using Lskj.DBUtility.Provider;
using System.ComponentModel;
using System.Collections.Generic;
namespace Lskj.Dao
{
/// <summary>
/// 数据访问类P_BaseMixInfoTypeTabDao。
/// </summary>
public class P_BaseMixInfoTypeTabDao:BaseProvider<Lskj.Model.P_BaseMixInfoTypeTab>
{
public P_BaseMixInfoTypeTabDao()
{
//Model = new Lskj.Model.P_BaseMixInfoTypeTab();
}
}
}
@@ -0,0 +1,23 @@
using System;
using System.Data;
using System.Text;
using Lskj.DevFx.Utils;
using Lskj.DevFx.Core;
using Lskj.DBUtility.Helper;
using Lskj.DBUtility.Provider;
using System.ComponentModel;
using System.Collections.Generic;
namespace Lskj.Dao
{
/// <summary>
/// 数据访问类P_ProductExplainTabDao。
/// </summary>
public class P_ProductExplainTabDao:BaseProvider<Lskj.Model.P_ProductExplainTab>
{
public P_ProductExplainTabDao()
{
//Model = new Lskj.Model.P_ProductExplainTab();
}
}
}
@@ -0,0 +1,23 @@
using System;
using System.Data;
using System.Text;
using Lskj.DevFx.Utils;
using Lskj.DevFx.Core;
using Lskj.DBUtility.Helper;
using Lskj.DBUtility.Provider;
using System.ComponentModel;
using System.Collections.Generic;
namespace Lskj.Dao
{
/// <summary>
/// 数据访问类P_systemDlltabDao。
/// </summary>
public class P_systemDlltabDao:BaseProvider<Lskj.Model.P_systemDlltab>
{
public P_systemDlltabDao()
{
//Model = new Lskj.Model.P_systemDlltab();
}
}
}
@@ -0,0 +1,23 @@
using System;
using System.Data;
using System.Text;
using Lskj.DevFx.Utils;
using Lskj.DevFx.Core;
using Lskj.DBUtility.Helper;
using Lskj.DBUtility.Provider;
using System.ComponentModel;
using System.Collections.Generic;
namespace lskj.Dao
{
/// <summary>
/// 数据访问类P_systempopupmenuDao。
/// </summary>
public class P_systempopupmenuDao:BaseProvider<lskj.Model.P_systempopupmenu>
{
public P_systempopupmenuDao()
{
//Model = new lskj.Model.P_systempopupmenu();
}
}
}
@@ -0,0 +1,23 @@
using System;
using System.Data;
using System.Text;
using Lskj.DevFx.Utils;
using Lskj.DevFx.Core;
using Lskj.DBUtility.Helper;
using Lskj.DBUtility.Provider;
using System.ComponentModel;
using System.Collections.Generic;
namespace Lskj.Dao
{
/// <summary>
/// 数据访问类P_systemwordbookcolorDao。
/// </summary>
public class P_systemwordbookcolorDao:BaseProvider<Lskj.Model.P_systemwordbookcolor>
{
public P_systemwordbookcolorDao()
{
//Model = new Lskj.Model.P_systemwordbookcolor();
}
}
}
@@ -0,0 +1,23 @@
using System;
using System.Data;
using System.Text;
using Lskj.DevFx.Utils;
using Lskj.DevFx.Core;
using Lskj.DBUtility.Helper;
using Lskj.DBUtility.Provider;
using System.ComponentModel;
using System.Collections.Generic;
namespace Lskj.Dao
{
/// <summary>
/// 数据访问类P_systemwordbooktabDao。
/// </summary>
public class P_systemwordbooktabDao:BaseProvider<Lskj.Model.P_systemwordbooktab>
{
public P_systemwordbooktabDao()
{
//Model = new Lskj.Model.P_systemwordbooktab();
}
}
}
+75
View File
@@ -0,0 +1,75 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Lskj.PubUtils;
namespace Lskj.Common
{
/// <summary>
/// 日期格式化类型
/// </summary>
public static class DateFormatType
{
/// <summary>
/// 空时间
/// </summary>
public const string Empty = " ";
/// <summary>
/// 例如:年-月-日
/// </summary>
public const string Date = "yyyy-MM-dd";
/// <summary>
/// 例如:年-月-日 时:分
/// </summary>
public const string DateTimeShort = "yyyy-MM-dd HH:mm";
/// <summary>
/// 例如年-月-日 时:分:秒
/// </summary>
public const string DateTime = "yyyy-MM-dd HH:mm:ss";
/// <summary>
/// 例如 时:分:秒
/// </summary>
public const string Time = "HH:mm:ss";
/// <summary>
/// 例如 时:分
/// </summary>
public const string ShortTime = "HH:mm";
/// <summary>
/// 通过ControlType获取Value
/// </summary>
/// <param name="typeId"></param>
/// <returns></returns>
public static string GetFormatValue(int typeId)
{
string formatValue = string.Empty;
switch (typeId)
{
case (int)ControlType.LabDate:
case (int)ControlType.LabCheckDateEx:
formatValue = Date;
break;
case (int)ControlType.LabDateTime:
case (int)ControlType.LabCheckDateTimeEx:
formatValue = DateTime;
break;
case (int)ControlType.LabDateTimeShort:
case (int)ControlType.LabCheckDateTimeShort:
formatValue = DateTimeShort;
break;
case (int)ControlType.LabTime:
case (int)ControlType.LabCheckTime:
formatValue = Time;
break;
case (int)ControlType.LabShortTime:
case (int)ControlType.LabCheckShortTime:
formatValue = ShortTime;
break;
default:
formatValue = Empty;
break;
}
return formatValue;
}
}
}
+107
View File
@@ -0,0 +1,107 @@
using System;
using System.CodeDom.Compiler;
using System.Reflection;
using System.Windows.Forms;
using CommonLib;
using System.Data;
using Microsoft.CSharp;
using System.Text;
namespace Lskj.Common {
/**/
/// <summary>
/// 动态求值
/// </summary>
public class Evaluator {
/**/
/// <summary>
/// 计算结果,如果表达式出错则抛出异常
/// </summary>
/// <param name="statement">表达式,如"1+2+3+4"</param>
/// <returns>结果</returns>
public static object Eval(string statement)
{
object obj = string.Empty;
try
{
if ((!string.IsNullOrEmpty(statement)) && (statement.Substring(0, 1) == "@"))
{
DataTable dt = SqlHelper.ExecuteDataSet(statement.Substring(1)).Tables[0];
if (dt == null)
return 0;
if (dt.Rows.Count < 1)
return 0;
return dt.Rows[0][0];
}
if (string.IsNullOrEmpty(statement))
statement = "1==1";
JSCaller caller = new JSCaller();
obj = caller.Eval(statement);
//obj = _evaluatorType.InvokeMember(
// "Eval",
// BindingFlags.InvokeMethod,
// null,
// _evaluator,
// new object[] { statement }
// );
}
catch (Exception ex)
{
//MessageBox.Show("请仔细检查配置列条件[" + statement + "]" + ex.StackTrace + "\r\n" + ex.Message);
PubUtil.WriteLog("请仔细检查配置列条件[" + statement + "]" + ex.Message);
}
//if (string.IsNullOrEmpty(obj + ""))
// return true;
return obj;
}
/**/
/// <summary>
///
/// </summary>
static Evaluator() {
try
{
CodeDomProvider provider = CodeDomProvider.CreateProvider("JScript");
CompilerParameters options = new CompilerParameters
{
ReferencedAssemblies = {
"System.dll",
AppDomain.CurrentDomain.BaseDirectory + @"Microsoft.JScript.dll"
},
GenerateInMemory = false
};
CompilerResults results;
results = provider.CompileAssemblyFromSource(options, _jscriptSource);
Assembly assembly = results.CompiledAssembly;
_evaluatorType = assembly.GetType("Evaluator");
_evaluator = Activator.CreateInstance(_evaluatorType);
}
catch (Exception)
{
}
}
private static object _evaluator = null;
private static Type _evaluatorType = null;
/**/
/// <summary>
/// JScript代码
/// </summary>
private static readonly string _jscriptSource =
@"class Evaluator
{
public function Eval(expr : String) : String
{
return eval(expr);
}
}";
public static object Eval_Ex(string statement) {
return null;
}
}
}
+765
View File
@@ -0,0 +1,765 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Data;
using System.IO;
using System.Text;
using System.Web;
using NPOI.HPSF;
using NPOI.HSSF.UserModel;
using NPOI.SS.UserModel;
using DevExpress.XtraGrid;
using DevExpress.XtraGrid.Views.Grid;
using DevExpress.XtraGrid.Columns;
using System.Data.Common;
using System.Data.SqlClient;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using CommonLib;
namespace Lskj.Common
{
public class ExcelHelper
{
/// <summary>
/// DataTable导出到Excel文件
/// </summary>
/// <param name="dtSource">源DataTable</param>
/// <param name="strHeaderText">表头文本</param>
/// <param name="strFileName">保存位置</param>
/// <param name="strSheetName">工作表名称</param>
/// <Author>柳永法 http://www.yongfa365.com/ 2010-5-8 22:21:41</Author>
public static void Export(DataTable dtSource, string strHeaderText, string strFileName, string strSheetName, string[] oldColumnNames, string[] newColumnNames)
{
if (strSheetName == "")
{
strSheetName = "Sheet";
}
using (MemoryStream ms = Export(dtSource, strHeaderText, strSheetName, oldColumnNames, newColumnNames))
{
using (FileStream fs = new FileStream(strFileName, FileMode.Create, FileAccess.Write))
{
byte[] data = ms.ToArray();
fs.Write(data, 0, data.Length);
fs.Flush();
}
}
}
/// <summary>
/// DataTable导出到Excel的MemoryStream
/// </summary>
/// <param name="dtSource">源DataTable</param>
/// <param name="strHeaderText">表头文本</param>
/// <param name="strSheetName">工作表名称</param>
/// <Author>柳永法 http://www.yongfa365.com/ 2010-5-8 22:21:41</Author>
public static MemoryStream Export(DataTable dtSource, string strHeaderText, string strSheetName, string[] oldColumnNames, string[] newColumnNames)
{
if (oldColumnNames.Length != newColumnNames.Length)
{
return new MemoryStream();
}
HSSFWorkbook workbook = new HSSFWorkbook();
//HSSFSheet sheet = workbook.CreateSheet();// workbook.CreateSheet();
ISheet sheet = workbook.CreateSheet(strSheetName);
#region
{
DocumentSummaryInformation dsi = PropertySetFactory.CreateDocumentSummaryInformation();
dsi.Company = "朗速科技";
workbook.DocumentSummaryInformation = dsi;
SummaryInformation si = PropertySetFactory.CreateSummaryInformation();
if (HttpContext.Current.Session["realname"] != null)
{
si.Author = HttpContext.Current.Session["realname"].ToString();
}
else
{
if (HttpContext.Current.Session["username"] != null)
{
si.Author = HttpContext.Current.Session["username"].ToString();
}
} //填加xls文件作者信息
si.ApplicationName = "朗速ERP"; //填加xls文件创建程序信息
si.LastAuthor = "dingliang"; //填加xls文件最后保存者信息
si.Comments = "朗速ERP导出文件"; //填加xls文件作者信息
si.Title = strHeaderText; //填加xls文件标题信息
si.Subject = strHeaderText; //填加文件主题信息
si.CreateDateTime = DateTime.Now;
workbook.SummaryInformation = si;
}
#endregion
ICellStyle dateStyle = workbook.CreateCellStyle();
IDataFormat format = workbook.CreateDataFormat();
dateStyle.DataFormat = format.GetFormat("yyyy-mm-dd");
#region
int[] arrColWidth = new int[oldColumnNames.Length];
for (int i = 0; i < oldColumnNames.Length; i++)
{
arrColWidth[i] = Encoding.GetEncoding(936).GetBytes(newColumnNames[i]).Length;
}
/*
foreach (DataColumn item in dtSource.Columns)
{
arrColWidth[item.Ordinal] = Encoding.GetEncoding(936).GetBytes(item.ColumnName.ToString()).Length;
}
* */
for (int i = 0; i < dtSource.Rows.Count; i++)
{
for (int j = 0; j < oldColumnNames.Length; j++)
{
int intTemp = Encoding.GetEncoding(936).GetBytes(dtSource.Rows[i][oldColumnNames[j]].ToString()).Length;
if (intTemp > arrColWidth[j])
{
arrColWidth[j] = intTemp;
}
}
/*
for (int j = 0; j < dtSource.Columns.Count; j++)
{
int intTemp = Encoding.GetEncoding(936).GetBytes(dtSource.Rows[i][j].ToString()).Length;
if (intTemp > arrColWidth[j])
{
arrColWidth[j] = intTemp;
}
}
* */
}
#endregion
int rowIndex = 0;
foreach (DataRow row in dtSource.Rows)
{
#region
if (rowIndex == 65535 || rowIndex == 0)
{
if (rowIndex != 0)
{
sheet = workbook.CreateSheet(strSheetName + ((int)rowIndex / 65535).ToString());
}
#region
{
IRow headerRow = sheet.CreateRow(0);
headerRow.HeightInPoints = 25;
headerRow.CreateCell(0).SetCellValue(strHeaderText);
ICellStyle headStyle = workbook.CreateCellStyle();
headStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
IFont font = workbook.CreateFont();
font.FontHeightInPoints = 20;
font.Boldweight = 700;
headStyle.SetFont(font);
headerRow.GetCell(0).CellStyle = headStyle;
//sheet.AddMergedRegion(new Region(0, 0, 0, dtSource.Columns.Count - 1));
sheet.AddMergedRegion(new NPOI.SS.Util.CellRangeAddress(0, 0, 0, dtSource.Columns.Count - 1));
}
#endregion
#region
{
//HSSFRow headerRow = sheet.CreateRow(1);
IRow headerRow = sheet.CreateRow(1);
ICellStyle headStyle = workbook.CreateCellStyle();
headStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
IFont font = workbook.CreateFont();
font.FontHeightInPoints = 10;
font.Boldweight = 700;
headStyle.SetFont(font);
for (int i = 0; i < oldColumnNames.Length; i++)
{
headerRow.CreateCell(i).SetCellValue(newColumnNames[i]);
headerRow.GetCell(i).CellStyle = headStyle;
//设置列宽
sheet.SetColumnWidth(i, (arrColWidth[i] + 1) * 256);
}
/*
foreach (DataColumn column in dtSource.Columns)
{
headerRow.CreateCell(column.Ordinal).SetCellValue(column.ColumnName);
headerRow.GetCell(column.Ordinal).CellStyle = headStyle;
//设置列宽
sheet.SetColumnWidth(column.Ordinal, (arrColWidth[column.Ordinal] + 1) * 256);
}
* */
}
#endregion
rowIndex = 2;
}
#endregion
#region
IRow dataRow = sheet.CreateRow(rowIndex);
//foreach (DataColumn column in dtSource.Columns)
for (int i = 0; i < oldColumnNames.Length; i++)
{
ICell newCell = dataRow.CreateCell(i);
string drValue = row[oldColumnNames[i]].ToString();
switch (dtSource.Columns[oldColumnNames[i]].DataType.ToString())
{
case "System.String"://字符串类型
newCell.SetCellValue(drValue);
break;
case "System.DateTime"://日期类型
DateTime dateV;
DateTime.TryParse(drValue, out dateV);
newCell.SetCellValue(dateV);
newCell.CellStyle = dateStyle;//格式化显示
break;
case "System.Boolean"://布尔型
bool boolV = false;
bool.TryParse(drValue, out boolV);
newCell.SetCellValue(boolV);
break;
case "System.Int16"://整型
case "System.Int32":
case "System.Int64":
case "System.Byte":
int intV = 0;
int.TryParse(drValue, out intV);
newCell.SetCellValue(intV);
break;
case "System.Decimal"://浮点型
case "System.Double":
double doubV = 0;
double.TryParse(drValue, out doubV);
newCell.SetCellValue(doubV);
break;
case "System.DBNull"://空值处理
newCell.SetCellValue("");
break;
default:
newCell.SetCellValue("");
break;
}
}
#endregion
rowIndex++;
}
using (MemoryStream ms = new MemoryStream())
{
workbook.Write(ms);
ms.Flush();
ms.Position = 0;
//sheet.Dispose();
sheet = null;
workbook = null;
//workbook.Dispose();//一般只用写这一个就OK了,他会遍历并释放所有资源,但当前版本有问题所以只释放sheet
return ms;
}
}
/// <summary>
/// 从表格中读取数据到Excel
/// </summary>
/// <param name="GridControlPub">需要导出的表格</param>
/// <returns></returns>
public static int ExportGrid(DevExpress.XtraGrid.GridControl GridControlPub)
{
SaveFileDialog saveFileDialog = new SaveFileDialog();
saveFileDialog.Title = "导出Excel";
saveFileDialog.Filter = "Excel文件(*.xls)|*.xls|Excel2007|*.xlsx|PDF文件|*.PDF|RTF文件|*.RTF|HTML文件|*.html";
DialogResult dialogResult = saveFileDialog.ShowDialog();
if (dialogResult == DialogResult.OK)
{
DevExpress.XtraPrinting.XlsExportOptions options = new DevExpress.XtraPrinting.XlsExportOptions();
if (saveFileDialog.FilterIndex == 1)
{
GridControlPub.ExportToXls(saveFileDialog.FileName);
}
if (saveFileDialog.FilterIndex == 2)
{
GridControlPub.ExportToXlsx(saveFileDialog.FileName);
}
if (saveFileDialog.FilterIndex == 3)
{
GridControlPub.ExportToPdf(saveFileDialog.FileName);
}
if (saveFileDialog.FilterIndex == 4)
{
GridControlPub.ExportToRtf(saveFileDialog.FileName);
}
if (saveFileDialog.FilterIndex == 5)
{
GridControlPub.ExportToHtml(saveFileDialog.FileName);
}
DevExpress.XtraEditors.XtraMessageBox.Show("保存成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
return 1;
}
/// <summary>
/// WEB导出DataTable到Excel
/// </summary>
/// <param name="dtSource">源DataTable</param>
/// <param name="strHeaderText">表头文本</param>
/// <param name="strFileName">文件名</param>
/// <Author>柳永法 http://www.yongfa365.com/ 2010-5-8 22:21:41</Author>
public static void ExportByWeb(DataTable dtSource, string strHeaderText, string strFileName)
{
ExportByWeb(dtSource, strHeaderText, strFileName, "sheet");
}
/// <summary>
/// WEB导出DataTable到Excel
/// </summary>
/// <param name="dtSource">源DataTable</param>
/// <param name="strHeaderText">表头文本</param>
/// <param name="strFileName">输出文件名,包含扩展名</param>
/// <param name="oldColumnNames">要导出的DataTable列数组</param>
/// <param name="newColumnNames">导出后的对应列名</param>
public static void ExportByWeb(DataTable dtSource, string strHeaderText, string strFileName, string[] oldColumnNames, string[] newColumnNames)
{
ExportByWeb(dtSource, strHeaderText, strFileName, "sheet", oldColumnNames, newColumnNames);
}
/// <summary>
/// WEB导出DataTable到Excel
/// </summary>
/// <param name="dtSource">源DataTable</param>
/// <param name="strHeaderText">表头文本</param>
/// <param name="strFileName">输出文件名</param>
/// <param name="strSheetName">工作表名称</param>
public static void ExportByWeb(DataTable dtSource, string strHeaderText, string strFileName, string strSheetName)
{
HttpContext curContext = HttpContext.Current;
// 设置编码和附件格式
curContext.Response.ContentType = "application/vnd.ms-excel";
curContext.Response.ContentEncoding = Encoding.UTF8;
curContext.Response.Charset = "";
curContext.Response.AppendHeader("Content-Disposition",
"attachment;filename=" + HttpUtility.UrlEncode(strFileName, Encoding.UTF8));
//生成列
string columns = "";
for (int i = 0; i < dtSource.Columns.Count; i++)
{
if (i > 0)
{
columns += ",";
}
columns += dtSource.Columns[i].ColumnName;
}
curContext.Response.BinaryWrite(Export(dtSource, strHeaderText, strSheetName, columns.Split(','), columns.Split(',')).GetBuffer());
curContext.Response.End();
}
/// <summary>
/// 导出DataTable到Excel
/// </summary>
/// <param name="dtSource">要导出的DataTable</param>
/// <param name="strHeaderText">标题文字</param>
/// <param name="strFileName">文件名,包含扩展名</param>
/// <param name="strSheetName">工作表名</param>
/// <param name="oldColumnNames">要导出的DataTable列数组</param>
/// <param name="newColumnNames">导出后的对应列名</param>
public static void ExportByWeb(DataTable dtSource, string strHeaderText, string strFileName, string strSheetName, string[] oldColumnNames, string[] newColumnNames)
{
HttpContext curContext = HttpContext.Current;
// 设置编码和附件格式
curContext.Response.ContentType = "application/vnd.ms-excel";
curContext.Response.ContentEncoding = Encoding.UTF8;
curContext.Response.Charset = "";
curContext.Response.AppendHeader("Content-Disposition",
"attachment;filename=" + HttpUtility.UrlEncode(strFileName, Encoding.UTF8));
curContext.Response.BinaryWrite(Export(dtSource, strHeaderText, strSheetName, oldColumnNames, newColumnNames).GetBuffer());
curContext.Response.End();
}
/// <summary>读取excel
/// 默认第一行为表头,导入第一个工作表
/// </summary>
/// <param name="strFileName">excel文档路径</param>
/// <returns></returns>
public static DataTable Import(string strFileName)
{
DataTable dt = new DataTable();
HSSFWorkbook hssfworkbook;
using (FileStream file = new FileStream(strFileName, FileMode.Open, FileAccess.Read))
{
hssfworkbook = new HSSFWorkbook(file);
}
ISheet sheet = hssfworkbook.GetSheetAt(0);
System.Collections.IEnumerator rows = sheet.GetRowEnumerator();
IRow headerRow = sheet.GetRow(0);
int cellCount = headerRow.LastCellNum;
for (int j = 0; j < cellCount; j++)
{
ICell cell = headerRow.GetCell(j);
dt.Columns.Add(cell.ToString());
}
for (int i = (sheet.FirstRowNum + 1); i <= sheet.LastRowNum; i++)
{
IRow row = sheet.GetRow(i);
DataRow dataRow = dt.NewRow();
for (int j = row.FirstCellNum; j < cellCount; j++)
{
if (row.GetCell(j) != null)
{
if (row.GetCell(j).CellType == CellType.Numeric)
dataRow[j] = row.GetCell(j).NumericCellValue;
else
dataRow[j] = row.GetCell(j).ToString();
}
}
dt.Rows.Add(dataRow);
}
return dt;
}
public static void Import(string strFileName, DataTable dtDest)
{
if (dtDest == null)
{
dtDest = new DataTable();
}
int existColCount = dtDest.Columns.Count;
HSSFWorkbook hssfworkbook;
using (FileStream file = new FileStream(strFileName, FileMode.Open, FileAccess.Read))
{
hssfworkbook = new HSSFWorkbook(file);
}
ISheet sheet = hssfworkbook.GetSheetAt(0);
System.Collections.IEnumerator rows = sheet.GetRowEnumerator();
IRow headerRow = sheet.GetRow(0);
int cellCount = headerRow.LastCellNum;
for (int j = 0; j < cellCount; j++)
{
ICell cell = headerRow.GetCell(j);
dtDest.Columns.Add(cell.ToString());
}
for (int i = (sheet.FirstRowNum + 1); i <= sheet.LastRowNum; i++)
{
IRow row = sheet.GetRow(i);
DataRow dataRow = dtDest.NewRow();
for (int j = row.FirstCellNum; j < cellCount; j++)
{
if (row.GetCell(j) != null)
{
if (row.GetCell(j).CellType == CellType.Numeric)
dataRow[j + existColCount] = row.GetCell(j).NumericCellValue;
else
dataRow[j + existColCount] = row.GetCell(j).ToString();
}
}
dtDest.Rows.Add(dataRow);
}
}
/// <summary>
/// 从Excel中获取数据到DataTable
/// </summary>
/// <param name="strFileName">Excel文件全路径</param>
/// <param name="table">要保存的实体表名</param>
/// <param name="apply">是否需要提交到数据库</param>
/// <param name="grid">需要导入的表格</param>
/// <returns></returns>
public static DataTable ImportToGrid(string strFileName, string table, bool apply, GridControl grid)
{
DataTable dtDest = (DataTable)grid.DataSource;
GridView gridV = (GridView)grid.FocusedView;
string fields = "";
if (dtDest == null)
{
dtDest = new DataTable();
foreach (GridColumn gc in gridV.Columns)
{
if (gc.FieldName.Trim() != "")
{
fields = fields + gc.FieldName + ",";
dtDest.Columns.Add(gc.FieldName);
}
}
fields = fields.Substring(0, fields.Length - 1);
}
DataTable dtSource = Import(strFileName);
if (dtSource.Rows.Count < 1)
{
MessageBox.Show("指定文件没有数据可导入", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return dtDest;
}
foreach (DataRow dr in dtSource.Rows)
{
DataRow dstRow = dtDest.NewRow();
foreach (GridColumn gc in gridV.Columns)
{
try
{
dstRow[gc.FieldName] = dr[gc.Caption];
}
catch (Exception ex)
{
}
}
dtDest.Rows.Add(dstRow);
}
//是否提交数据库
if (apply == true)
{
try
{
string sql = "select " + fields + " from " + table + " where 1<>1";
DbDataAdapter dat = SqlHelper.ExecuteAdapter(CommandType.Text, sql);
SqlCommandBuilder scb = new SqlCommandBuilder((SqlDataAdapter)dat);
DataTable datatb = new DataTable();
dat.Fill(datatb);
dat.Update(dtDest);
dtDest.AcceptChanges();
}
catch (Exception ex)
{
MessageBox.Show("数据提交错误:\n" + ex.Message, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
grid.DataSource = dtDest;
return dtDest;
}
/// <summary>
/// 从Excel中获取数据到DataTable
/// </summary>
/// <param name="strFileName">Excel文件全路径(服务器路径)</param>
/// <param name="SheetName">要获取数据的工作表名称</param>
/// <param name="HeaderRowIndex">工作表标题行所在行号(从0开始)</param>
/// <returns></returns>
public static DataTable RenderDataTableFromExcel(string strFileName, string SheetName, int HeaderRowIndex)
{
using (FileStream file = new FileStream(strFileName, FileMode.Open, FileAccess.Read))
{
IWorkbook workbook = new HSSFWorkbook(file);
return RenderDataTableFromExcel(workbook, SheetName, HeaderRowIndex);
}
}
/// <summary>
/// 从Excel中获取数据到DataTable
/// </summary>
/// <param name="strFileName">Excel文件全路径(服务器路径)</param>
/// <param name="SheetIndex">要获取数据的工作表序号(从0开始)</param>
/// <param name="HeaderRowIndex">工作表标题行所在行号(从0开始)</param>
/// <returns></returns>
public static DataTable RenderDataTableFromExcel(string strFileName, int SheetIndex, int HeaderRowIndex)
{
using (FileStream file = new FileStream(strFileName, FileMode.Open, FileAccess.Read))
{
IWorkbook workbook = new HSSFWorkbook(file);
string SheetName = workbook.GetSheetName(SheetIndex);
return RenderDataTableFromExcel(workbook, SheetName, HeaderRowIndex);
}
}
/// <summary>
/// 从Excel中获取数据到DataTable
/// </summary>
/// <param name="ExcelFileStream">Excel文件流</param>
/// <param name="SheetName">要获取数据的工作表名称</param>
/// <param name="HeaderRowIndex">工作表标题行所在行号(从0开始)</param>
/// <returns></returns>
public static DataTable RenderDataTableFromExcel(Stream ExcelFileStream, string SheetName, int HeaderRowIndex)
{
IWorkbook workbook = new HSSFWorkbook(ExcelFileStream);
ExcelFileStream.Close();
return RenderDataTableFromExcel(workbook, SheetName, HeaderRowIndex);
}
/// <summary>
/// 从Excel中获取数据到DataTable
/// </summary>
/// <param name="ExcelFileStream">Excel文件流</param>
/// <param name="SheetIndex">要获取数据的工作表序号(从0开始)</param>
/// <param name="HeaderRowIndex">工作表标题行所在行号(从0开始)</param>
/// <returns></returns>
public static DataTable RenderDataTableFromExcel(Stream ExcelFileStream, int SheetIndex, int HeaderRowIndex)
{
IWorkbook workbook = new HSSFWorkbook(ExcelFileStream);
ExcelFileStream.Close();
string SheetName = workbook.GetSheetName(SheetIndex);
return RenderDataTableFromExcel(workbook, SheetName, HeaderRowIndex);
}
/// <summary>
/// 从Excel中获取数据到DataTable
/// </summary>
/// <param name="workbook">要处理的工作薄</param>
/// <param name="SheetName">要获取数据的工作表名称</param>
/// <param name="HeaderRowIndex">工作表标题行所在行号(从0开始)</param>
/// <returns></returns>
public static DataTable RenderDataTableFromExcel(IWorkbook workbook, string SheetName, int HeaderRowIndex)
{
ISheet sheet = workbook.GetSheet(SheetName);
DataTable table = new DataTable();
try
{
IRow headerRow = sheet.GetRow(HeaderRowIndex);
int cellCount = headerRow.LastCellNum;
for (int i = headerRow.FirstCellNum; i < cellCount; i++)
{
DataColumn column = new DataColumn(headerRow.GetCell(i).StringCellValue);
table.Columns.Add(column);
}
int rowCount = sheet.LastRowNum;
#region ,DataTable
for (int i = (sheet.FirstRowNum + 1); i < sheet.LastRowNum; i++)
{
IRow row = sheet.GetRow(i);
DataRow dataRow = table.NewRow();
for (int j = row.FirstCellNum; j < cellCount; j++)
{
ICell cell = row.GetCell(j);
if (cell == null)
{
dataRow[j] = null;
}
else
{
//dataRow[j] = cell.ToString();
switch (cell.CellType)
{
case CellType.Blank:
dataRow[j] = null;
break;
case CellType.Boolean:
dataRow[j] = cell.BooleanCellValue;
break;
case CellType.Numeric:
dataRow[j] = cell.ToString();
break;
case CellType.String:
dataRow[j] = cell.StringCellValue;
break;
case CellType.Error:
dataRow[j] = cell.ErrorCellValue;
break;
case CellType.Formula:
default:
dataRow[j] = "=" + cell.CellFormula;
break;
}
}
}
table.Rows.Add(dataRow);
//dataRow[j] = row.GetCell(j).ToString();
}
#endregion
}
catch (System.Exception ex)
{
table.Clear();
table.Columns.Clear();
table.Columns.Add("出错了");
DataRow dr = table.NewRow();
dr[0] = ex.Message;
table.Rows.Add(dr);
return table;
}
finally
{
//sheet.Dispose();
workbook = null;
sheet = null;
}
#region
for (int i = table.Rows.Count - 1; i > 0; i--)
{
bool isnull = true;
for (int j = 0; j < table.Columns.Count; j++)
{
if (table.Rows[i][j] != null)
{
if (table.Rows[i][j].ToString() != "")
{
isnull = false;
break;
}
}
}
if (isnull)
{
table.Rows[i].Delete();
}
}
#endregion
return table;
}
#region Excel
/// <summary>
/// 导出Excel
/// </summary>
/// <param name="GridControlPub"></param>
/// <returns></returns>
public static int SaveXls(DevExpress.XtraGrid.GridControl GridControlPub)
{
SaveFileDialog saveFileDialog = new SaveFileDialog();
saveFileDialog.Title = "导出Excel";
saveFileDialog.Filter = "Excel文件(*.xls)|*.xls|Excel2007|*.xlsx|PDF文件|*.PDF|RTF文件|*.RTF|HTML文件|*.html";
DialogResult dialogResult = saveFileDialog.ShowDialog();
if (dialogResult == DialogResult.OK)
{
DevExpress.XtraPrinting.XlsExportOptions options = new DevExpress.XtraPrinting.XlsExportOptions();
if (saveFileDialog.FilterIndex == 1)
{
GridControlPub.ExportToXls(saveFileDialog.FileName);
}
if (saveFileDialog.FilterIndex == 2)
{
GridControlPub.ExportToXlsx(saveFileDialog.FileName);
}
if (saveFileDialog.FilterIndex == 3)
{
GridControlPub.ExportToPdf(saveFileDialog.FileName);
}
if (saveFileDialog.FilterIndex == 4)
{
GridControlPub.ExportToRtf(saveFileDialog.FileName);
}
if (saveFileDialog.FilterIndex == 5)
{
GridControlPub.ExportToHtml(saveFileDialog.FileName);
}
XtraMessageBox.Show("保存成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
return 1;
}
#endregion
}
}
+117
View File
@@ -0,0 +1,117 @@
namespace Lskj.Common
{
partial class FrmProject
{
/// <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()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmProject));
this.simpleButton2 = new DevExpress.XtraEditors.SimpleButton();
this.panel1 = new System.Windows.Forms.Panel();
this.simpleButton1 = new DevExpress.XtraEditors.SimpleButton();
this.panel2 = new System.Windows.Forms.Panel();
this.listBoxControl1 = new DevExpress.XtraEditors.ListBoxControl();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.listBoxControl1)).BeginInit();
this.SuspendLayout();
//
// simpleButton2
//
this.simpleButton2.Location = new System.Drawing.Point(205, 6);
this.simpleButton2.Name = "simpleButton2";
this.simpleButton2.Size = new System.Drawing.Size(75, 23);
this.simpleButton2.TabIndex = 4;
this.simpleButton2.Text = "关闭";
this.simpleButton2.Click += new System.EventHandler(this.simpleButton2_Click);
//
// panel1
//
this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(207)))), ((int)(((byte)(221)))), ((int)(((byte)(238)))));
this.panel1.Controls.Add(this.simpleButton2);
this.panel1.Controls.Add(this.simpleButton1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panel1.Location = new System.Drawing.Point(0, 227);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(284, 35);
this.panel1.TabIndex = 3;
//
// simpleButton1
//
this.simpleButton1.Location = new System.Drawing.Point(117, 6);
this.simpleButton1.Name = "simpleButton1";
this.simpleButton1.Size = new System.Drawing.Size(75, 23);
this.simpleButton1.TabIndex = 3;
this.simpleButton1.Text = "删除";
this.simpleButton1.Click += new System.EventHandler(this.simpleButton1_Click);
//
// panel2
//
this.panel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(207)))), ((int)(((byte)(221)))), ((int)(((byte)(238)))));
this.panel2.Controls.Add(this.listBoxControl1);
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel2.Location = new System.Drawing.Point(0, 0);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(284, 262);
this.panel2.TabIndex = 4;
//
// listBoxControl1
//
this.listBoxControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.listBoxControl1.Location = new System.Drawing.Point(0, 0);
this.listBoxControl1.Name = "listBoxControl1";
this.listBoxControl1.Size = new System.Drawing.Size(284, 262);
this.listBoxControl1.TabIndex = 1;
//
// FrmProject
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(284, 262);
this.Controls.Add(this.panel1);
this.Controls.Add(this.panel2);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "FrmProject";
this.Text = "方案管理";
this.Load += new System.EventHandler(this.FrmProject_Load);
this.panel1.ResumeLayout(false);
this.panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.listBoxControl1)).EndInit();
this.ResumeLayout(false);
}
#endregion
private DevExpress.XtraEditors.SimpleButton simpleButton2;
private System.Windows.Forms.Panel panel1;
private DevExpress.XtraEditors.SimpleButton simpleButton1;
private System.Windows.Forms.Panel panel2;
private DevExpress.XtraEditors.ListBoxControl listBoxControl1;
}
}
+64
View File
@@ -0,0 +1,64 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CommonLib;
using DevExpress.XtraEditors;
namespace Lskj.Common
{
public partial class FrmProject : Form
{
public string ModuleId;
public string OperatorId;
public DataTable PejectTable = new DataTable();
public FrmProject()
{
InitializeComponent();
}
private void FrmProject_Load(object sender, EventArgs e)
{
try
{
listBoxControl1.Items.Clear();
foreach (DataRow item in PejectTable.Rows)
{
listBoxControl1.Items.Add(item["ProjectName"] + "");
}
}
catch (Exception)
{
}
}
private void simpleButton1_Click(object sender, EventArgs e)
{
string projectName = listBoxControl1.SelectedItem + "";
if (!string.IsNullOrEmpty(projectName))
{
string sqlValue = string.Format("delete P_SystemReportProjectTab where ModuleId='{0}' and OperatorId='{1}' and ProjectName='{2}'", ModuleId, OperatorId, projectName);
int result = SqlHelper.ExecuteNonQuery(sqlValue);
if (result > 0)
{
XtraMessageBox.Show("删除成功.");
listBoxControl1.Items.Remove(projectName);
}
}
else
{
XtraMessageBox.Show("请选择一项删除.");
}
}
private void simpleButton2_Click(object sender, EventArgs e)
{
this.Close();
}
}
}
File diff suppressed because it is too large Load Diff
+101
View File
@@ -0,0 +1,101 @@
namespace Lskj.Common
{
partial class FrmPrompt
{
/// <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()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmPrompt));
this.label1 = new System.Windows.Forms.Label();
this.simpleButton2 = new DevExpress.XtraEditors.SimpleButton();
this.simpleButton1 = new DevExpress.XtraEditors.SimpleButton();
this.textBox1 = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(15, 10);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(89, 12);
this.label1.TabIndex = 7;
this.label1.Text = "请输入方案名称";
//
// simpleButton2
//
this.simpleButton2.Location = new System.Drawing.Point(148, 71);
this.simpleButton2.Name = "simpleButton2";
this.simpleButton2.Size = new System.Drawing.Size(75, 23);
this.simpleButton2.TabIndex = 6;
this.simpleButton2.Text = "取消";
this.simpleButton2.Click += new System.EventHandler(this.simpleButton2_Click);
//
// simpleButton1
//
this.simpleButton1.Location = new System.Drawing.Point(58, 71);
this.simpleButton1.Name = "simpleButton1";
this.simpleButton1.Size = new System.Drawing.Size(75, 23);
this.simpleButton1.TabIndex = 5;
this.simpleButton1.Text = "保存";
this.simpleButton1.Click += new System.EventHandler(this.simpleButton1_Click);
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(15, 34);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(208, 21);
this.textBox1.TabIndex = 4;
//
// FrmPrompt
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(207)))), ((int)(((byte)(221)))), ((int)(((byte)(238)))));
this.ClientSize = new System.Drawing.Size(238, 105);
this.Controls.Add(this.label1);
this.Controls.Add(this.simpleButton2);
this.Controls.Add(this.simpleButton1);
this.Controls.Add(this.textBox1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "FrmPrompt";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "方案设置";
this.Load += new System.EventHandler(this.FrmPrompt_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private DevExpress.XtraEditors.SimpleButton simpleButton2;
private DevExpress.XtraEditors.SimpleButton simpleButton1;
private System.Windows.Forms.TextBox textBox1;
}
}
+47
View File
@@ -0,0 +1,47 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
namespace Lskj.Common
{
public partial class FrmPrompt : Form
{
public string ProjectName;
public FrmPrompt()
{
InitializeComponent();
}
private void simpleButton1_Click(object sender, EventArgs e)
{
this.ProjectName = this.textBox1.Text.Trim();
if (!string.IsNullOrWhiteSpace(this.ProjectName))
{
this.DialogResult = DialogResult.OK;
this.Close();
}
else
{
XtraMessageBox.Show("请输入方案名称.");
}
}
private void simpleButton2_Click(object sender, EventArgs e)
{
this.Close();
this.DialogResult = DialogResult.Cancel;
}
private void FrmPrompt_Load(object sender, EventArgs e)
{
this.textBox1.Text = ProjectName;
}
}
}
File diff suppressed because it is too large Load Diff
+366
View File
@@ -0,0 +1,366 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraGrid;
using DevExpress.XtraGrid.Views.Grid;
using DevExpress.XtraGrid.Views.Grid.ViewInfo;
using CommonLib;
namespace Lskj.Common
{
public class GridDragTree
{
private string SQLDT1;
private string filedKey;
private DataRow sdkModel;
public GridDragTree(Form thisForm, GridControl grid, TreeView target, DragEventHandler Complete, DataRow sdkModel, string SQLDT1, string filedKey)
{
opForm = thisForm;
currentGridView = (GridView)grid.FocusedView;
dragComplete = Complete;
grid.FocusedView.MouseDown += new MouseEventHandler(gridMouseDown);
grid.FocusedView.MouseMove += new MouseEventHandler(gridMouseMove);
target.HideSelection = false;
target.DragOver += new DragEventHandler(objDragOver);
target.DragDrop += new DragEventHandler(objDragDrop);
target.AllowDrop = true;
this.sdkModel = sdkModel;
this.SQLDT1 = SQLDT1;
this.filedKey = filedKey;
}
private GridHitInfo downHitInfo = null;
private GridView currentGridView = null;
Form opForm = null;
DragEventHandler dragComplete = null;
private void gridMouseDown(object sender, MouseEventArgs e)
{
GridView view = sender as GridView;
downHitInfo = null;
GridHitInfo hitInfo = view.CalcHitInfo(new Point(e.X, e.Y));
if (Control.ModifierKeys != Keys.None) return;
if (e.Button == MouseButtons.Left && hitInfo.RowHandle >= 0)
downHitInfo = hitInfo;
}
private void gridMouseMove(object sender, MouseEventArgs e)
{
GridView view = sender as GridView;
if (e.Button == MouseButtons.Left && downHitInfo != null)
{
Size dragSize = SystemInformation.DragSize;
Rectangle dragRect = new Rectangle(new Point(downHitInfo.HitPoint.X - dragSize.Width / 2,
downHitInfo.HitPoint.Y - dragSize.Height / 2), dragSize);
if (!dragRect.Contains(new Point(e.X, e.Y)))
{
object row = view.GetRow(downHitInfo.RowHandle);
view.GridControl.DoDragDrop(row, DragDropEffects.Move);
downHitInfo = null;
DevExpress.Utils.DXMouseEventArgs.GetMouseArgs(e).Handled = true;
}
}
}
private void objDragOver(object sender, DragEventArgs e)
{
(sender as TreeView).Select();
e.Effect = DragDropEffects.Move;
TreeNode tn = null;
Point pt = new Point();
pt.X = e.X;
pt.Y = e.Y;
tn = (sender as TreeView).GetNodeAt((sender as TreeView).PointToClient(pt));
if (tn == null)
return;
(sender as TreeView).SelectedNode = tn;
if (tn.GetNodeCount(true) > 0)
tn.Expand();
}
private void objDragDrop(object sender, DragEventArgs e)
{
//这里处理拖放后的操作,比如更改选中数据属性
TreeNode tn = null;
Point pt = new Point();
pt.X = e.X;
pt.Y = e.Y;
tn = (sender as TreeView).GetNodeAt((sender as TreeView).PointToClient(pt));
if (tn == null)
return;
if (tn.GetNodeCount(true) > 0)
{
MessageBox.Show("【" + tn.Text + "】不是最后一级不能拖拽");
return;
}
if (MessageBox.Show("确定将所选档案信息转移到[" + tn.Text + "]", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
{
return;
}
//选中行操作,修改或者删除
int[] rowid = currentGridView.GetSelectedRows();
foreach (int rid in rowid)
{
DataRow dr = currentGridView.GetDataRow(rid);
SqlHelper.ExecuteNonQuery("update " + SQLDT1 + " set " + sdkModel["fieldname"] + "='" + tn.Name + "' where " + filedKey + "='" + dr[filedKey] + "'");
}
dragComplete(sender, e);
}
}
public class GridDrag2Grid
{
private GridHitInfo downHitInfo;
GridView sourceView = null;
GridView targetView = null;
public callBack internal_func { get; set; }
private bool dragIng = false;
public delegate void callBack(object sender);
public GridDrag2Grid(GridControl source, GridControl target, callBack callFunc)
{
internal_func = callFunc;
sourceView = (source.FocusedView as GridView);
targetView = (target.FocusedView as GridView);
(source.FocusedView as GridView).OptionsSelection.MultiSelect = true;
source.FocusedView.MouseDown += new MouseEventHandler(gridViewMouseDown);
source.FocusedView.MouseMove += new MouseEventHandler(gridViewMouseMove);
source.FocusedView.MouseUp += new MouseEventHandler(gridViewMouseUp);
target.AllowDrop = true;
target.DragEnter += new DragEventHandler(gridDragEnter);
target.DragDrop += new DragEventHandler(gridDragDrop);
}
private void gridMouseDown(object sender, MouseEventArgs e)
{
downHitInfo = sourceView.CalcHitInfo(new Point(e.X, e.Y));
dragIng = true;
}
private void gridMouseMove(object sender, MouseEventArgs e)
{
if (downHitInfo == null) return;
if (e.Button != MouseButtons.Left) return;
Rectangle dragRect = new Rectangle(new Point(
downHitInfo.HitPoint.X - SystemInformation.DragSize.Width / 2,
downHitInfo.HitPoint.Y - SystemInformation.DragSize.Height / 2), SystemInformation.DragSize);
if (!dragRect.Contains(new Point(e.X, e.Y)))
{
DataRow data = sourceView.GetDataRow(downHitInfo.RowHandle);
int[] rows = sourceView.GetSelectedRows();
List<DataRow> row = new List<DataRow>();
for (int i = 0; i < rows.Length; i++)
row.Add(sourceView.GetDataRow((int)rows[i]));
(sender as GridControl).DoDragDrop(row, DragDropEffects.Move);
}
}
private void gridViewMouseDown(object sender, MouseEventArgs e)
{
targetView.Tag = "1";
dragIng = true;
GridView view = sender as GridView;
downHitInfo = null;
GridHitInfo hitInfo = view.CalcHitInfo(new Point(e.X, e.Y));
if (Control.ModifierKeys != Keys.None) return;
if (e.Button == MouseButtons.Left && hitInfo.RowHandle >= 0)
downHitInfo = hitInfo;
}
private void gridViewMouseUp(object sender, MouseEventArgs e)
{
dragIng = false;
targetView.Tag = "0";
}
private void gridViewMouseMove(object sender, MouseEventArgs e)
{
GridView view = sender as GridView;
if (e.Button == MouseButtons.Left && downHitInfo != null)
{
Size dragSize = SystemInformation.DragSize;
Rectangle dragRect = new Rectangle(new Point(downHitInfo.HitPoint.X - dragSize.Width / 2,
downHitInfo.HitPoint.Y - dragSize.Height / 2), dragSize);
if (!dragRect.Contains(new Point(e.X, e.Y)))
{
object row = view.GetRow(downHitInfo.RowHandle);
view.GridControl.DoDragDrop(row, DragDropEffects.Move);
downHitInfo = null;
DevExpress.Utils.DXMouseEventArgs.GetMouseArgs(e).Handled = true;
}
}
}
private void gridDragEnter(object sender, DragEventArgs e)
{
e.Effect = DragDropEffects.Move;
targetView.Tag = "1";
}
private void gridDragDrop(object sender, DragEventArgs e)
{
if (internal_func != null)
{
if (dragIng == true)
{
internal_func(sender);
dragIng = false;
}
return;
}
GridControl grid = sender as GridControl;
DataTable table = grid.DataSource as DataTable;
List<DataRow> row = e.Data.GetData(typeof(List<DataRow>)) as List<DataRow>;
if (row != null && table != null)
{
if (row.Count > 0)
{
for (int i = 0; i < row.Count; i++)
{
table.ImportRow(row[i]);
row[i].Delete(); // 把原有的数据行删除。
}
}
}
dragIng = false;
targetView.Tag = "0";
}
}
public class GridDrag2GridUpdate
{
private GridHitInfo downHitInfo;
GridView sourceView = null;
GridView targetView = null;
public callBack internal_func { get; set; }
private bool dragIng = false;
public delegate void callBack(object sender);
public GridDrag2GridUpdate(GridControl source, GridControl target, callBack callFunc)
{
internal_func = callFunc;
sourceView = (source.FocusedView as GridView);
targetView = (target.FocusedView as GridView);
source.FocusedView.MouseDown += new MouseEventHandler(gridViewMouseDown);
source.FocusedView.MouseMove += new MouseEventHandler(gridViewMouseMove);
source.FocusedView.MouseUp += new MouseEventHandler(gridViewMouseUp);
target.AllowDrop = true;
target.DragOver += new DragEventHandler(target_DragOver);
target.DragEnter += new DragEventHandler(gridDragEnter);
target.DragDrop += new DragEventHandler(gridDragDrop);
}
private void gridMouseDown(object sender, MouseEventArgs e)
{
downHitInfo = sourceView.CalcHitInfo(new Point(e.X, e.Y));
dragIng = true;
targetView.Tag = "1";
}
private void gridMouseMove(object sender, MouseEventArgs e)
{
if (downHitInfo == null) return;
if (e.Button != MouseButtons.Left) return;
Rectangle dragRect = new Rectangle(new Point(
downHitInfo.HitPoint.X - SystemInformation.DragSize.Width / 2,
downHitInfo.HitPoint.Y - SystemInformation.DragSize.Height / 2), SystemInformation.DragSize);
if (!dragRect.Contains(new Point(e.X, e.Y)))
{
DataRow data = sourceView.GetDataRow(downHitInfo.RowHandle);
int[] rows = sourceView.GetSelectedRows();
List<DataRow> row = new List<DataRow>();
for (int i = 0; i < rows.Length; i++)
row.Add(sourceView.GetDataRow((int)rows[i]));
(sender as GridControl).DoDragDrop(row, DragDropEffects.Move);
}
}
private void gridViewMouseDown(object sender, MouseEventArgs e)
{
targetView.Tag = "1";
dragIng = true;
GridView view = sender as GridView;
downHitInfo = null;
GridHitInfo hitInfo = view.CalcHitInfo(new Point(e.X, e.Y));
if (Control.ModifierKeys != Keys.None) return;
if (e.Button == MouseButtons.Left && hitInfo.RowHandle >= 0)
downHitInfo = hitInfo;
}
private void gridViewMouseMove(object sender, MouseEventArgs e)
{
GridView view = sender as GridView;
if (e.Button == MouseButtons.Left && downHitInfo != null)
{
Size dragSize = SystemInformation.DragSize;
Rectangle dragRect = new Rectangle(new Point(downHitInfo.HitPoint.X - dragSize.Width / 2,
downHitInfo.HitPoint.Y - dragSize.Height / 2), dragSize);
if (!dragRect.Contains(new Point(e.X, e.Y)))
{
object row = view.GetRow(downHitInfo.RowHandle);
view.GridControl.DoDragDrop(row, DragDropEffects.Move);
downHitInfo = null;
DevExpress.Utils.DXMouseEventArgs.GetMouseArgs(e).Handled = true;
}
}
}
private void gridViewMouseUp(object sender, MouseEventArgs e)
{
dragIng = false;
targetView.Tag = "0";
}
private void target_DragOver(object sender, DragEventArgs e)
{
GridControl targetControl = (sender as GridControl);
GridView targetGrid = targetControl.FocusedView as GridView;
Point gcPoint = targetControl.PointToScreen((sender as GridControl).Location);
Point pt = new Point(e.X - gcPoint.X, e.Y - gcPoint.Y);
downHitInfo = targetGrid.CalcHitInfo(pt);
if (downHitInfo == null || downHitInfo.RowHandle < 0) return;
targetGrid.SelectRow(downHitInfo.RowHandle);
targetGrid.FocusedRowHandle = downHitInfo.RowHandle;
}
private void gridDragEnter(object sender, DragEventArgs e)
{
e.Effect = DragDropEffects.Move;
targetView.Tag = "1";
}
private void gridDragDrop(object sender, DragEventArgs e)
{
if (internal_func != null)
{
if (dragIng == true)
{
internal_func(sender);
dragIng = false;
}
targetView.Tag = "0";
return;
}
GridControl grid = sender as GridControl;
DataTable table = grid.DataSource as DataTable;
List<DataRow> row = e.Data.GetData(typeof(List<DataRow>)) as List<DataRow>;
if (row != null && table != null)
{
if (row.Count > 0)
{
for (int i = 0; i < row.Count; i++)
{
table.ImportRow(row[i]);
row[i].Delete(); // 把原有的数据行删除。
}
}
}
targetView.Tag = "0";
}
}
}
File diff suppressed because it is too large Load Diff
+204
View File
@@ -0,0 +1,204 @@
<?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)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{DE7EFD7F-2DFE-4D50-A578-452A2DBFD088}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Lskj.Common</RootNamespace>
<AssemblyName>Lskj.Common</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\引用DLL\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Accessibility">
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
<Reference Include="DevExpress.Charts.v13.1.Core, Version=13.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\publish\DevExpress.Charts.v13.1.Core.dll</HintPath>
</Reference>
<Reference Include="DevExpress.Data.v13.1, Version=13.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.Printing.v13.1.Core, Version=13.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.Utils.v13.1, Version=13.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.XtraBars.v13.1, Version=13.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\publish\DevExpress.XtraBars.v13.1.dll</HintPath>
</Reference>
<Reference Include="DevExpress.XtraCharts.v13.1, Version=13.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\publish\DevExpress.XtraCharts.v13.1.dll</HintPath>
</Reference>
<Reference Include="DevExpress.XtraCharts.v13.1.UI, Version=13.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\publish\DevExpress.XtraCharts.v13.1.UI.dll</HintPath>
</Reference>
<Reference Include="DevExpress.XtraEditors.v13.1, Version=13.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.XtraGrid.v13.1, Version=13.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraLayout.v13.1, Version=13.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.XtraPrinting.v13.1, Version=13.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.XtraTreeList.v13.1, Version=13.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\publish\DevExpress.XtraTreeList.v13.1.dll</HintPath>
</Reference>
<Reference Include="EvalCall, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\引用DLL\EvalCall.dll</HintPath>
</Reference>
<Reference Include="itextsharp, Version=5.5.8.0, Culture=neutral, PublicKeyToken=8354ae6d2174ddca, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\引用DLL\itextsharp.dll</HintPath>
</Reference>
<Reference Include="Lskj.PubJPush, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\引用DLL\Lskj.PubJPush.dll</HintPath>
</Reference>
<Reference Include="Microsoft.JScript" />
<Reference Include="NPOI, Version=2.0.6.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\引用DLL\NPOI.dll</HintPath>
</Reference>
<Reference Include="O2S.Components.PDFView4NET, Version=4.7.4.0, Culture=neutral, PublicKeyToken=bdf0cc7afcc23208, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\引用DLL\O2S.Components.PDFView4NET.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="ComfirmDialog\ComfirmDialog.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="ComfirmDialog\ComfirmDialog.Designer.cs">
<DependentUpon>ComfirmDialog.cs</DependentUpon>
</Compile>
<Compile Include="ControlModel.cs" />
<Compile Include="ctr\ControlModelTag_Bak.cs" />
<Compile Include="ctr\CreateControlModel2.cs" />
<Compile Include="ctr\MyControlText.cs" />
<Compile Include="ctr\MyCreateControl.cs" />
<Compile Include="ctr\CreateControlModel.cs" />
<Compile Include="ctr\MySearchCreateControl.cs" />
<Compile Include="DLLType.cs" />
<Compile Include="Evaluator.cs" />
<Compile Include="FrmProject.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmProject.Designer.cs">
<DependentUpon>FrmProject.cs</DependentUpon>
</Compile>
<Compile Include="FrmPrompt.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmPrompt.Designer.cs">
<DependentUpon>FrmPrompt.cs</DependentUpon>
</Compile>
<Compile Include="GridMenu.cs" />
<Compile Include="PubControl.cs" />
<Compile Include="GridDrag.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="PubClass.cs" />
<Compile Include="PushHelper.cs">
<SubType>Code</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="ComfirmDialog\ComfirmDialog.resx">
<DependentUpon>ComfirmDialog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmProject.resx">
<DependentUpon>FrmProject.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmPrompt.resx">
<DependentUpon>FrmPrompt.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="Resources\qq.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\run.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\www.png" />
</ItemGroup>
<ItemGroup>
<COMReference Include="MSScriptControl">
<Guid>{0E59F1D2-1FBE-11D0-8FF2-00A0D10038BC}</Guid>
<VersionMajor>1</VersionMajor>
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>tlbimp</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference>
</ItemGroup>
<ItemGroup>
<WCFMetadata Include="Service References\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\CommonLib\CommonLib.csproj">
<Project>{3E8E6529-5D8A-4F17-8C41-27CD7380178D}</Project>
<Name>CommonLib</Name>
</ProjectReference>
<ProjectReference Include="..\ControlLib\ControlLib.csproj">
<Project>{73C024E7-D9DC-44C3-BABC-2AA1544ECCF9}</Project>
<Name>ControlLib</Name>
</ProjectReference>
<ProjectReference Include="..\Lskj.MyControl\Lskj.MyControl.csproj">
<Project>{F6502012-9A7C-44AE-AAC6-DE2AD02F5C11}</Project>
<Name>Lskj.MyControl</Name>
</ProjectReference>
<ProjectReference Include="..\Lskj.PubUtils\Lskj.PubUtils.csproj">
<Project>{752386CB-FD63-4565-980F-E8F72A520F77}</Project>
<Name>Lskj.PubUtils</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,182 @@
using System;
using Lskj.DevFx.Data;
using Lskj.DevFx.Core;
namespace Lskj.Model
{
/// <summary>
/// 实体类P_BaseMixInfoTab 。(属性说明自动提取数据库字段的描述信息)
/// </summary>
[Serializable]
public class P_BaseMixInfoTab : BaseModel
{
public P_BaseMixInfoTab()
{
TableName = "P_BaseMixInfoTab";
PrimaryFields.Add("ID");
IdentityName = "ID";
AddField("ID", FieldType.Int32,4, "", false, true,default(int));
AddField("Mix_NO", FieldType.VarChar,50, "", false,default(string));
AddField("Mix_apellation", FieldType.VarChar,100, "", false,default(string));
AddField("Mix_bak", FieldType.VarChar,200, "", false,default(string));
AddField("Tag", FieldType.Int32,4, "", false,default(int));
AddField("Ban", FieldType.Boolean,1, "", false,default(bool));
AddField("tmp1", FieldType.VarChar,50, "", false,default(string));
AddField("tmp2", FieldType.VarChar,50, "", false,default(string));
AddField("Delid", FieldType.Int32,4, "", false,default(int));
AddField("otherid", FieldType.Int32,4, "", false,default(int));
AddField("orderid", FieldType.Int32,4, "", false,default(int));
AddField("bit1", FieldType.Int32,4, "", false,default(int));
AddField("bases1", FieldType.VarChar,500, "", false,default(string));
AddField("bases2", FieldType.VarChar,500, "", false,default(string));
AddField("bases3", FieldType.VarChar,500, "", false,default(string));
AddField("bases4", FieldType.VarChar,500, "", false,default(string));
}
/// <summary>
///
/// </summary>
//[Description("")]
public int ID
{
set{ SetValue("ID",value);}
get{return GetInt32("ID");}
}
/// <summary>
///
/// </summary>
//[Description("")]
public string Mix_NO
{
set{ SetValue("Mix_NO",value);}
get{return GetString("Mix_NO");}
}
/// <summary>
///
/// </summary>
//[Description("")]
public string Mix_apellation
{
set{ SetValue("Mix_apellation",value);}
get{return GetString("Mix_apellation");}
}
/// <summary>
///
/// </summary>
//[Description("")]
public string Mix_bak
{
set{ SetValue("Mix_bak",value);}
get{return GetString("Mix_bak");}
}
/// <summary>
///
/// </summary>
//[Description("")]
public int Tag
{
set{ SetValue("Tag",value);}
get{return GetInt32("Tag");}
}
/// <summary>
///
/// </summary>
//[Description("")]
public bool Ban
{
set{ SetValue("Ban",value);}
get{return GetBoolean("Ban");}
}
/// <summary>
///
/// </summary>
//[Description("")]
public string tmp1
{
set{ SetValue("tmp1",value);}
get{return GetString("tmp1");}
}
/// <summary>
///
/// </summary>
//[Description("")]
public string tmp2
{
set{ SetValue("tmp2",value);}
get{return GetString("tmp2");}
}
/// <summary>
///
/// </summary>
//[Description("")]
public int Delid
{
set{ SetValue("Delid",value);}
get{return GetInt32("Delid");}
}
/// <summary>
///
/// </summary>
//[Description("")]
public int otherid
{
set{ SetValue("otherid",value);}
get{return GetInt32("otherid");}
}
/// <summary>
///
/// </summary>
//[Description("")]
public int orderid
{
set{ SetValue("orderid",value);}
get{return GetInt32("orderid");}
}
/// <summary>
///
/// </summary>
//[Description("")]
public int bit1
{
set{ SetValue("bit1",value);}
get{return GetInt32("bit1");}
}
/// <summary>
///
/// </summary>
//[Description("")]
public string bases1
{
set{ SetValue("bases1",value);}
get{return GetString("bases1");}
}
/// <summary>
///
/// </summary>
//[Description("")]
public string bases2
{
set{ SetValue("bases2",value);}
get{return GetString("bases2");}
}
/// <summary>
///
/// </summary>
//[Description("")]
public string bases3
{
set{ SetValue("bases3",value);}
get{return GetString("bases3");}
}
/// <summary>
///
/// </summary>
//[Description("")]
public string bases4
{
set{ SetValue("bases4",value);}
get{return GetString("bases4");}
}
}
}
@@ -0,0 +1,102 @@
using System;
using Lskj.DevFx.Data;
using Lskj.DevFx.Core;
namespace Lskj.Model
{
/// <summary>
/// 实体类P_BaseMixInfoTypeTab 。(属性说明自动提取数据库字段的描述信息)
/// </summary>
[Serializable]
public class P_BaseMixInfoTypeTab : BaseModel
{
public P_BaseMixInfoTypeTab()
{
TableName = "P_BaseMixInfoTypeTab";
IdentityName = "id";
AddField("id", FieldType.Int32,4, "", false,default(int));
AddField("SoftID", FieldType.Int32,4, "", false,default(int));
AddField("SoftModule", FieldType.VarChar,50, "", false,default(string));
PrimaryFields.Add("tagid");
AddField("tagid", FieldType.Int32,4, "", false, true,default(int));
AddField("TagName", FieldType.VarChar,50, "", false,default(string));
AddField("bak", FieldType.VarChar,200, "", true);
AddField("UseEd", FieldType.VarChar,50, "", true);
AddField("Orderid", FieldType.Int32,4, "", false,default(int));
}
/// <summary>
///
/// </summary>
//[Description("")]
public int id
{
set{ SetValue("id",value);}
get{return GetInt32("id");}
}
/// <summary>
///
/// </summary>
//[Description("")]
public int SoftID
{
set{ SetValue("SoftID",value);}
get{return GetInt32("SoftID");}
}
/// <summary>
///
/// </summary>
//[Description("")]
public string SoftModule
{
set{ SetValue("SoftModule",value);}
get{return GetString("SoftModule");}
}
/// <summary>
///
/// </summary>
//[Description("")]
public int tagid
{
set{ SetValue("tagid",value);}
get{return GetInt32("tagid");}
}
/// <summary>
///
/// </summary>
//[Description("")]
public string TagName
{
set{ SetValue("TagName",value);}
get{return GetString("TagName");}
}
/// <summary>
///
/// </summary>
//[Description("")]
public string bak
{
set{ SetValue("bak",value);}
get{return GetString("bak");}
}
/// <summary>
///
/// </summary>
//[Description("")]
public string UseEd
{
set{ SetValue("UseEd",value);}
get{return GetString("UseEd");}
}
/// <summary>
///
/// </summary>
//[Description("")]
public int Orderid
{
set{ SetValue("Orderid",value);}
get{return GetInt32("Orderid");}
}
}
}
@@ -0,0 +1,80 @@
using System;
using Lskj.DevFx.Data;
using Lskj.DevFx.Core;
namespace Lskj.Model
{
/// <summary>
/// 实体类P_ProductExplainTab 。(属性说明自动提取数据库字段的描述信息)
/// </summary>
[Serializable]
public class P_ProductExplainTab : BaseModel
{
public P_ProductExplainTab()
{
TableName = "P_ProductExplainTab";
AddField("ID", FieldType.Int32,4, "", false,default(int));
AddField("Source", FieldType.VarChar,100, "", true);
AddField("StrSource", FieldType.VarChar,100, "", true);
AddField("Explain", FieldType.VarChar,100, "", true);
AddField("StrExplain", FieldType.VarChar,100, "", true);
AddField("MaxCount", FieldType.Int32,4, "", true);
}
/// <summary>
///
/// </summary>
//[Description("")]
public int ID
{
set{ SetValue("ID",value);}
get{return GetInt32("ID");}
}
/// <summary>
///
/// </summary>
//[Description("")]
public string Source
{
set{ SetValue("Source",value);}
get{return GetString("Source");}
}
/// <summary>
///
/// </summary>
//[Description("")]
public string StrSource
{
set{ SetValue("StrSource",value);}
get{return GetString("StrSource");}
}
/// <summary>
///
/// </summary>
//[Description("")]
public string Explain
{
set{ SetValue("Explain",value);}
get{return GetString("Explain");}
}
/// <summary>
///
/// </summary>
//[Description("")]
public string StrExplain
{
set{ SetValue("StrExplain",value);}
get{return GetString("StrExplain");}
}
/// <summary>
///
/// </summary>
//[Description("")]
public int MaxCount
{
set{ SetValue("MaxCount",value);}
get{return GetInt32("MaxCount");}
}
}
}
@@ -0,0 +1,218 @@
using System;
using Lskj.DevFx.Data;
using Lskj.DevFx.Core;
namespace Lskj.Model
{
/// <summary>
/// 实体类P_systemDlltab 。(属性说明自动提取数据库字段的描述信息)
/// </summary>
[Serializable]
public class P_systemDlltab : BaseModel
{
public P_systemDlltab()
{
TableName = "P_systemDlltab";
PrimaryFields.Add("DllID");
IdentityName = "DllID";
AddField("DllID", FieldType.Int32, 4, "", false, true, default(int));
AddField("DllCoid", FieldType.VarChar, 50, "", false, default(string));
AddField("DllName", FieldType.VarChar, 50, "", false, default(string));
AddField("ToolsName", FieldType.VarChar, 50, "", false, default(string));
AddField("TAGID", FieldType.Int32, 4, "", false, default(int));
AddField("SQL", FieldType.VarChar, 5000, "", false, default(string));
AddField("SQLDT1", FieldType.VarChar, 5000, "", false, default(string));
AddField("SQLDT2", FieldType.DateTime, "", false);
AddField("Purview1", FieldType.VarChar, 500, "", false, default(string));
AddField("Purview2", FieldType.VarChar, 500, "", false, default(string));
AddField("Purview3", FieldType.VarChar, 500, "", false, default(string));
AddField("Purview4", FieldType.VarChar, 500, "", false, default(string));
AddField("Purviewtag", FieldType.Int32, 4, "", false, default(int));
AddField("ModuleId", FieldType.Int32, 4, "模块ID", false, default(int));
AddField("OrderId", FieldType.Int32, 4, "排序", false, default(int));
AddField("CtrNum", FieldType.Int32, 4, "控件数量", false, default(int));
AddField("AddDllName", FieldType.VarChar, 500, "", false, default(string));
AddField("selfEdit", FieldType.VarChar, 500, "", false, default(string));
AddField("dirid", FieldType.Int32, 4, "", false, default(int));
AddField("dllType", FieldType.Int32, 4, "", false, default(int));
}
/// <summary>
///
/// </summary>
//[Description("")]
public int DllID
{
set { SetValue("DllID", value); }
get { return GetInt32("DllID"); }
}
/// <summary>
///
/// </summary>
//[Description("")]
public string DllCoid
{
set { SetValue("DllCoid", value); }
get { return GetString("DllCoid"); }
}
/// <summary>
///
/// </summary>
//[Description("")]
public string DllName
{
set { SetValue("DllName", value); }
get { return GetString("DllName"); }
}
/// <summary>
///
/// </summary>
//[Description("")]
public string ToolsName
{
set { SetValue("ToolsName", value); }
get { return GetString("ToolsName"); }
}
/// <summary>
///
/// </summary>
//[Description("")]
public int TAGID
{
set { SetValue("TAGID", value); }
get { return GetInt32("TAGID"); }
}
/// <summary>
///
/// </summary>
//[Description("")]
public string SQL
{
set { SetValue("SQL", value); }
get { return GetString("SQL"); }
}
/// <summary>
///
/// </summary>
//[Description("")]
public String SQLDT1
{
set { SetValue("SQLDT1", value); }
get { return GetString("SQLDT1"); }
}
/// <summary>
///
/// </summary>
//[Description("")]
public DateTime? SQLDT2
{
set { SetValue("SQLDT2", value); }
get { return (DateTime?)GetValue("SQLDT2"); }
}
/// <summary>
///
/// </summary>
//[Description("")]
public string Purview1
{
set { SetValue("Purview1", value); }
get { return GetString("Purview1"); }
}
/// <summary>
///
/// </summary>
//[Description("")]
public string Purview2
{
set { SetValue("Purview2", value); }
get { return GetString("Purview2"); }
}
/// <summary>
///
/// </summary>
//[Description("")]
public string Purview3
{
set { SetValue("Purview3", value); }
get { return GetString("Purview3"); }
}
/// <summary>
///
/// </summary>
//[Description("")]
public string Purview4
{
set { SetValue("Purview4", value); }
get { return GetString("Purview4"); }
}
/// <summary>
///
/// </summary>
//[Description("")]
public int Purviewtag
{
set { SetValue("Purviewtag", value); }
get { return GetInt32("Purviewtag"); }
}
/// <summary>
///
/// </summary>
//[Description("")]
public int ModuleId
{
set { SetValue("ModuleId", value); }
get { return GetInt32("ModuleId"); }
}
/// <summary>
///
/// </summary>
//[Description("")]
public int OrderId
{
set { SetValue("OrderId", value); }
get { return GetInt32("OrderId"); }
}
/// <summary>
///
/// </summary>
//[Description("")]
public int CtrNum
{
set { SetValue("CtrNum", value); }
get { return GetInt32("CtrNum"); }
}
/// <summary>
/// 添加动态库
/// </summary>
//[Description("")]
public string AddDllName
{
set { SetValue("AddDllName", value); }
get { return GetString("AddDllName"); }
}
public string selfEdit
{
set { SetValue("selfEdit", value); }
get { return GetString("selfEdit"); }
}
/// <summary>
/// 附件目录
/// </summary>
public int dirid
{
set { SetValue("dirid", value); }
get { return GetInt32("dirid"); }
}
/// <summary>
/// dll类型
/// </summary>
public int dllType
{
set { SetValue("dllType", value); }
get { return GetInt32("dllType"); }
}
}
}
@@ -0,0 +1,246 @@
using System;
using Lskj.DevFx.Data;
using Lskj.DevFx.Core;
namespace lskj.Model
{
/// <summary>
/// 实体类P_systempopupmenu 。(属性说明自动提取数据库字段的描述信息)
/// </summary>
[Serializable]
public class P_systempopupmenu : BaseModel
{
public P_systempopupmenu()
{
TableName = "P_systempopupmenu";
PrimaryFields.Add("id");
IdentityName = "id";
AddField("id", FieldType.Int32,4, "", false, true,default(int));
AddField("tab", FieldType.VarChar,20, "模块tab标识", true);
AddField("menuname", FieldType.VarChar,50, "菜单名字", true);
AddField("dllname", FieldType.VarChar,30, "", true);
AddField("dllpar1", FieldType.VarChar,200, "", true);
AddField("dllpar2", FieldType.VarChar,200, "", true);
AddField("dllpar3", FieldType.VarChar,200, "", true);
AddField("visible", FieldType.Int32,4, "0=显示,1=不显示", false,default(int));
AddField("action", FieldType.VarChar,500, "菜单执行动作sql语句或者存储过程", true);
AddField("actiontype", FieldType.Int32,4, "0=sql,1=存储过程", false,default(int));
AddField("orderid", FieldType.Int32,4, "菜单排序号", true);
AddField("beforeMsg", FieldType.VarChar,150, "", true);
AddField("msgSuccess", FieldType.VarChar,150, "", true);
AddField("msgError", FieldType.VarChar,150, "", true);
AddField("dllpar4", FieldType.VarChar,200, "", true);
AddField("dllpar5", FieldType.VarChar,200, "", true);
AddField("dllpar6", FieldType.VarChar,200, "", true);
AddField("dllpar7", FieldType.VarChar,200, "", true);
AddField("dllpar8", FieldType.VarChar,200, "", true);
AddField("dllpar9", FieldType.VarChar,200, "", true);
AddField("dllpar10", FieldType.VarChar,200, "", true);
AddField("menuid", FieldType.Int32,4, "", true);
AddField("menuCond", FieldType.VarChar, 200, "右键菜单是否能用", true);
}
/// <summary>
///
/// </summary>
//[Description("")]
public int id
{
set{ SetValue("id",value);}
get{return GetInt32("id");}
}
/// <summary>
/// 模块tab标识
/// </summary>
//[Description("模块tab标识")]
public string tab
{
set{ SetValue("tab",value);}
get{return GetString("tab");}
}
/// <summary>
/// 菜单名字
/// </summary>
//[Description("菜单名字")]
public string menuname
{
set{ SetValue("menuname",value);}
get{return GetString("menuname");}
}
/// <summary>
///
/// </summary>
//[Description("")]
public string dllname
{
set{ SetValue("dllname",value);}
get{return GetString("dllname");}
}
/// <summary>
///
/// </summary>
//[Description("")]
public string dllpar1
{
set{ SetValue("dllpar1",value);}
get{return GetString("dllpar1");}
}
/// <summary>
///
/// </summary>
//[Description("")]
public string dllpar2
{
set{ SetValue("dllpar2",value);}
get{return GetString("dllpar2");}
}
/// <summary>
///
/// </summary>
//[Description("")]
public string dllpar3
{
set{ SetValue("dllpar3",value);}
get{return GetString("dllpar3");}
}
/// <summary>
/// 0=显示,1=不显示
/// </summary>
//[Description("0=显示,1=不显示")]
public int visible
{
set{ SetValue("visible",value);}
get{return GetInt32("visible");}
}
/// <summary>
/// 菜单执行动作sql语句或者存储过程
/// </summary>
//[Description("菜单执行动作sql语句或者存储过程")]
public string action
{
set{ SetValue("action",value);}
get{return GetString("action");}
}
/// <summary>
/// 0=sql,1=存储过程
/// </summary>
//[Description("0=sql,1=存储过程")]
public int actiontype
{
set{ SetValue("actiontype",value);}
get{return GetInt32("actiontype");}
}
/// <summary>
/// 菜单排序号
/// </summary>
//[Description("菜单排序号")]
public int orderid
{
set{ SetValue("orderid",value);}
get{return GetInt32("orderid");}
}
/// <summary>
///
/// </summary>
//[Description("")]
public string beforeMsg
{
set{ SetValue("beforeMsg",value);}
get{return GetString("beforeMsg");}
}
/// <summary>
///
/// </summary>
//[Description("")]
public string msgSuccess
{
set{ SetValue("msgSuccess",value);}
get{return GetString("msgSuccess");}
}
/// <summary>
///
/// </summary>
//[Description("")]
public string msgError
{
set{ SetValue("msgError",value);}
get{return GetString("msgError");}
}
/// <summary>
///
/// </summary>
//[Description("")]
public string dllpar4
{
set{ SetValue("dllpar4",value);}
get{return GetString("dllpar4");}
}
/// <summary>
///
/// </summary>
//[Description("")]
public string dllpar5
{
set{ SetValue("dllpar5",value);}
get{return GetString("dllpar5");}
}
/// <summary>
///
/// </summary>
//[Description("")]
public string dllpar6
{
set{ SetValue("dllpar6",value);}
get{return GetString("dllpar6");}
}
/// <summary>
///
/// </summary>
//[Description("")]
public string dllpar7
{
set{ SetValue("dllpar7",value);}
get{return GetString("dllpar7");}
}
/// <summary>
///
/// </summary>
//[Description("")]
public string dllpar8
{
set{ SetValue("dllpar8",value);}
get{return GetString("dllpar8");}
}
/// <summary>
///
/// </summary>
//[Description("")]
public string dllpar9
{
set{ SetValue("dllpar9",value);}
get{return GetString("dllpar9");}
}
/// <summary>
///
/// </summary>
//[Description("")]
public string dllpar10
{
set{ SetValue("dllpar10",value);}
get{return GetString("dllpar10");}
}
/// <summary>
///
/// </summary>
//[Description("")]
public int menuid
{
set{ SetValue("menuid",value);}
get{return GetInt32("menuid");}
}
public string menuCond
{
set { SetValue("menuCond", value); }
get { return GetString("menuCond"); }
}
}
}
@@ -0,0 +1,92 @@
using System;
using Lskj.DevFx.Data;
using Lskj.DevFx.Core;
namespace Lskj.Model
{
/// <summary>
/// 实体类P_systemwordbookcolor 。(属性说明自动提取数据库字段的描述信息)
/// </summary>
[Serializable]
public class P_systemwordbookcolor : BaseModel
{
public P_systemwordbookcolor()
{
TableName = "P_systemwordbookcolor";
PrimaryFields.Add("id");
IdentityName = "id";
AddField("id", FieldType.Int32,4, "", false, true,default(int));
AddField("tab", FieldType.VarChar,20, "模块tab编号", true);
AddField("condition", FieldType.VarChar,100, "颜色条件", true);
AddField("forcecolor", FieldType.VarChar,20, "前景色(为空不设置)", true);
AddField("backcolor", FieldType.VarChar,20, "背景色(为空不设置)", true);
AddField("orderid", FieldType.Int32,4, "顺序号", true);
AddField("useflag", FieldType.Int32,4, "", true);
}
/// <summary>
///
/// </summary>
//[Description("")]
public int id
{
set{ SetValue("id",value);}
get{return GetInt32("id");}
}
/// <summary>
/// 模块tab编号
/// </summary>
//[Description("模块tab编号")]
public string tab
{
set{ SetValue("tab",value);}
get{return GetString("tab");}
}
/// <summary>
/// 颜色条件
/// </summary>
//[Description("颜色条件")]
public string condition
{
set{ SetValue("condition",value);}
get{return GetString("condition");}
}
/// <summary>
/// 前景色(为空不设置)
/// </summary>
//[Description("前景色(为空不设置)")]
public string forcecolor
{
set{ SetValue("forcecolor",value);}
get{return GetString("forcecolor");}
}
/// <summary>
/// 背景色(为空不设置)
/// </summary>
//[Description("背景色(为空不设置)")]
public string backcolor
{
set{ SetValue("backcolor",value);}
get{return GetString("backcolor");}
}
/// <summary>
/// 顺序号
/// </summary>
//[Description("顺序号")]
public int orderid
{
set{ SetValue("orderid",value);}
get{return GetInt32("orderid");}
}
/// <summary>
///
/// </summary>
//[Description("")]
public int useflag
{
set{ SetValue("useflag",value);}
get{return GetInt32("useflag");}
}
}
}
@@ -0,0 +1,332 @@
using System;
using Lskj.DevFx.Data;
using Lskj.DevFx.Core;
namespace Lskj.Model
{
/// <summary>
/// 实体类P_systemwordbooktab 。(属性说明自动提取数据库字段的描述信息)
/// </summary>
[Serializable]
public class P_systemwordbooktab : BaseModel
{
public P_systemwordbooktab()
{
TableName = "P_systemwordbooktab";
PrimaryFields.Add("id");
IdentityName = "id";
AddField("id", FieldType.Int32, 4, "", false, true, default(int));
AddField("tab", FieldType.VarChar, 50, "", false, default(string));
AddField("orderid", FieldType.Int32, 4, "", false, default(int));
AddField("fieldname", FieldType.VarChar, 20, "", false, default(string));
AddField("sysname", FieldType.VarChar, 20, "", false, default(string));
AddField("username1", FieldType.VarChar, 20, "", false, default(string));
AddField("vislble", FieldType.Int32, 4, "", false, default(int));
AddField("oid1", FieldType.Int32, 4, "", false, default(int));
AddField("vislble1", FieldType.Int32, 4, "", false, default(int));
AddField("oid2", FieldType.Int32, 4, "", false, default(int));
AddField("vislble2", FieldType.Int32, 4, "", false, default(int));
AddField("oid3", FieldType.Int32, 4, "", false, default(int));
AddField("vislble3", FieldType.Int32, 4, "", false, default(int));
AddField("oid4", FieldType.Int32, 4, "", false, default(int));
AddField("vislble4", FieldType.Int32, 4, "", false, default(int));
AddField("width", FieldType.Int32, 4, "", false, default(int));
AddField("Count", FieldType.Int32, 4, "", false, default(int));
AddField("edit", FieldType.Int32, 4, "", false, default(int));
AddField("defaultdate", FieldType.VarChar, 50, "", false, default(string));
AddField("bak", FieldType.VarChar, 500, "", false, default(string));
AddField("tagid", FieldType.Int32, 4, "", false, default(int));
AddField("Dllid", FieldType.Int32, 4, "", false, default(int));
AddField("rpname", FieldType.VarChar, 50, "", false, default(string));
AddField("fieldsql", FieldType.VarChar, 1000, "", false, default(string));
AddField("fieldsqlid", FieldType.VarChar, 20, "", false, default(string));
AddField("fieldsqlname", FieldType.VarChar, 20, "", false, default(string));
AddField("fieldsqlTag", FieldType.Int32, 4, "", false, default(int));
AddField("ifSearch", FieldType.Int32, 4, "", false, default(int));
AddField("addVisible", FieldType.Int32, 4, "", false, default(int));
AddField("controlWidth", FieldType.Int32, 4, "", false, default(int));
AddField("isRow", FieldType.Int32, 4, "", false, default(int));
}
/// <summary>
///
/// </summary>
//[Description("")]
public int isRow
{
set { SetValue("isRow", value); }
get { return GetInt32("isRow"); }
}
/// <summary>
///
/// </summary>
//[Description("")]
public int controlWidth
{
set { SetValue("controlWidth", value); }
get { return GetInt32("controlWidth"); }
}
/// <summary>
///
/// </summary>
//[Description("")]
public int id
{
set { SetValue("id", value); }
get { return GetInt32("id"); }
}
/// <summary>
///
/// </summary>
//[Description("")]
public string tab
{
set { SetValue("tab", value); }
get { return GetString("tab"); }
}
/// <summary>
///
/// </summary>
//[Description("")]
public int orderid
{
set { SetValue("orderid", value); }
get { return GetInt32("orderid"); }
}
/// <summary>
///
/// </summary>
//[Description("")]
public string fieldname
{
set { SetValue("fieldname", value); }
get { return GetString("fieldname"); }
}
/// <summary>
///
/// </summary>
//[Description("")]
public string sysname
{
set { SetValue("sysname", value); }
get { return GetString("sysname"); }
}
/// <summary>
///
/// </summary>
//[Description("")]
public string username1
{
set { SetValue("username1", value); }
get { return GetString("username1"); }
}
/// <summary>
///
/// </summary>
//[Description("")]
public int vislble
{
set { SetValue("vislble", value); }
get { return GetInt32("vislble"); }
}
/// <summary>
///
/// </summary>
//[Description("")]
public int oid1
{
set { SetValue("oid1", value); }
get { return GetInt32("oid1"); }
}
/// <summary>
///
/// </summary>
//[Description("")]
public int vislble1
{
set { SetValue("vislble1", value); }
get { return GetInt32("vislble1"); }
}
/// <summary>
///
/// </summary>
//[Description("")]
public int oid2
{
set { SetValue("oid2", value); }
get { return GetInt32("oid2"); }
}
/// <summary>
///
/// </summary>
//[Description("")]
public int vislble2
{
set { SetValue("vislble2", value); }
get { return GetInt32("vislble2"); }
}
/// <summary>
///
/// </summary>
//[Description("")]
public int oid3
{
set { SetValue("oid3", value); }
get { return GetInt32("oid3"); }
}
/// <summary>
///
/// </summary>
//[Description("")]
public int vislble3
{
set { SetValue("vislble3", value); }
get { return GetInt32("vislble3"); }
}
/// <summary>
///
/// </summary>
//[Description("")]
public int oid4
{
set { SetValue("oid4", value); }
get { return GetInt32("oid4"); }
}
/// <summary>
///
/// </summary>
//[Description("")]
public int vislble4
{
set { SetValue("vislble4", value); }
get { return GetInt32("vislble4"); }
}
/// <summary>
///
/// </summary>
//[Description("")]
public int width
{
set { SetValue("width", value); }
get { return GetInt32("width"); }
}
/// <summary>
///
/// </summary>
//[Description("")]
public int Count
{
set { SetValue("Count", value); }
get { return GetInt32("Count"); }
}
/// <summary>
///
/// </summary>
//[Description("")]
public int edit
{
set { SetValue("edit", value); }
get { return GetInt32("edit"); }
}
/// <summary>
///
/// </summary>
//[Description("")]
public string defaultdate
{
set { SetValue("defaultdate", value); }
get { return GetString("defaultdate"); }
}
/// <summary>
///
/// </summary>
//[Description("")]
public string bak
{
set { SetValue("bak", value); }
get { return GetString("bak"); }
}
/// <summary>
///
/// </summary>
//[Description("")]
public int tagid
{
set { SetValue("tagid", value); }
get { return GetInt32("tagid"); }
}
/// <summary>
///
/// </summary>
//[Description("")]
public int Dllid
{
set { SetValue("Dllid", value); }
get { return GetInt32("Dllid"); }
}
/// <summary>
///
/// </summary>
//[Description("")]
public string rpname
{
set { SetValue("rpname", value); }
get { return GetString("rpname"); }
}
/// <summary>
///
/// </summary>
//[Description("")]
public string fieldsql
{
set { SetValue("fieldsql", value); }
get { return GetString("fieldsql"); }
}
/// <summary>
///
/// </summary>
//[Description("")]
public string fieldsqlid
{
set { SetValue("fieldsqlid", value); }
get { return GetString("fieldsqlid"); }
}
/// <summary>
///
/// </summary>
//[Description("")]
public string fieldsqlname
{
set { SetValue("fieldsqlname", value); }
get { return GetString("fieldsqlname"); }
}
/// <summary>
///
/// </summary>
//[Description("")]
public int fieldsqlTag
{
set { SetValue("fieldsqlTag", value); }
get { return GetInt32("fieldsqlTag"); }
}
/// <summary>
///
/// </summary>
//[Description("")]
public int ifSearch
{
set { SetValue("ifSearch", value); }
get { return GetInt32("ifSearch"); }
}
/// <summary>
///
/// </summary>
//[Description("")]
public int addVisible
{
set { SetValue("addVisible", value); }
get { return GetInt32("addVisible"); }
}
}
}
@@ -0,0 +1,32 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的常规信息通过以下
// 特性集控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("Lskj.Common")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("Lskj.Common")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 使此程序集中的类型
// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型,
// 则将该类型上的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("a68a64ee-cfe2-4f3f-89ff-bd2ed0f4ea2d")]
// 程序集的版本信息由下面四个值组成:
//
// 主版本
// 次版本
// 内部版本号
// 修订号
//
// 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.23")]
+84
View File
@@ -0,0 +1,84 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.1
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace Lskj.Common.Properties {
using System;
/// <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() {
}
/// <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.Common.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;
}
}
internal static System.Drawing.Bitmap qq {
get {
object obj = ResourceManager.GetObject("qq", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap run {
get {
object obj = ResourceManager.GetObject("run", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap www {
get {
object obj = ResourceManager.GetObject("www", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}
@@ -0,0 +1,130 @@
<?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>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="qq" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\qq.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="run" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\run.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="www" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\www.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
@@ -0,0 +1,2 @@
DevExpress.Patch.InMemoryPatch, DevExpress.Patch.Common, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7fc7bfca2443de66
DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v13.1, Version=13.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+347
View File
@@ -0,0 +1,347 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using CommonLib;
using Lskj.PubJPush;
using Lskj.PubJPush.Push.Mode;
using Lskj.PubJPush.Push;
using System.Windows.Forms;
using System.Threading;
namespace Lskj.Common
{
/// <summary>
/// 消息推送类
/// </summary>
public class PushHelper
{
private string billid;
private string stepcode;
private string menuid;
private string beforeusers;
private string beforemenuname;
private int beforeid;
private Dictionary<string, PushMessage> pushMessages = new Dictionary<string, PushMessage>();
public PushHelper(string billid, string stepcode, string menuid, string beforeusers, string beforemenuname, int beforeid)
{
this.billid = billid;
this.menuid = menuid;
this.stepcode = stepcode;
this.beforeusers = beforeusers;
this.beforemenuname = beforemenuname;
this.beforeid = beforeid;
}
/// <summary>
/// 推送单据审核确认消息
/// </summary>
public void push_bill_comfirm_message()
{
}
/// <summary>
/// 推送单据审核消息
/// </summary>
public void push_bill_oper_message()
{
try
{
pushMessages.Clear();
// 极光推送key
DataTable dtSystemTab = SqlHelper.ExecuteDataSet("select * from p_systemtab").Tables[0];
string appKey = dtSystemTab.Rows[0]["JPushAppKey"] + "";
string master_secret = dtSystemTab.Rows[0]["JPushMaster_Secret"] + "";
string clict_code = dtSystemTab.Rows[0]["ClientCode"] + "";
if (string.IsNullOrEmpty(appKey))
return;
string sqlValue = string.Format("select operators,typeName menuname,'2'+CAST(b.id as varchar(10)) id from wms_billflowOper a,p_systembilltype b where a.modid=b.typeCode and keyvalue='{0}' and a.stepover=0", billid);
DataTable dtTable = SqlHelper.ExecuteDataSet(sqlValue).Tables[0];
// 清空上一步人员消息
if (!string.IsNullOrEmpty(beforeusers) && !string.IsNullOrEmpty(beforemenuname) && beforeid > 0)
{
DataTable dtUsers = SqlHelper.ExecuteDataSet(string.Format("select employeeid userid,employeename username from P_employeeTab where employeename in ({0})",
"'" + beforeusers.Replace(",", "','") + "'")).Tables[0];
foreach (DataRow item in dtUsers.Rows)
{
string uid = item["userid"] + "";
string username = item["username"] + "";
addPushSource(appKey, master_secret, clict_code, beforeid, 0, beforemenuname, menuid, uid);
}
}
else
{
// 单据提交处理
sqlValue = string.Format("select operators,typeName menuname,'2'+CAST(b.id as varchar(10)) id from wms_billflowOper a,p_systembilltype b where a.modid=b.typeCode and keyvalue='{0}' and a.stepover=0", billid);
DataTable dtUsers = SqlHelper.ExecuteDataSet(sqlValue).Tables[0];
if (dtUsers.Rows.Count > 0)
{
beforeusers = dtUsers.Rows[0]["operators"] + "";
beforemenuname = dtUsers.Rows[0]["menuname"] + "";
beforeid = Convert.ToInt32(dtUsers.Rows[0]["id"] + "");
}
}
// 推送本次人员消息
if (dtTable != null && dtTable.Rows.Count > 0)
{
string operators = dtTable.Rows[0]["operators"] + "";
string menuname = dtTable.Rows[0]["menuname"] + "";
int id = Convert.ToInt32(dtTable.Rows[0]["id"] + "");
dtTable = SqlHelper.ExecuteDataSet(string.Format("select employeeid userid,employeename username from P_employeeTab where employeename in ({0})",
"'" + operators.Replace(",", "','") + "'")).Tables[0];
foreach (DataRow item in dtTable.Rows)
{
string uid = item["userid"] + "";
string username = item["username"] + "";
sqlValue = string.Format(string.Format("select COUNT(1) total from wms_BillflowOper where stepOver=0 and modid='{0}' and CHARINDEX(',{1},',','+operators+',')>0", menuid, username));
int total = Convert.ToInt32(SqlHelper.ExecuteDataSet(sqlValue).Tables[0].Rows[0]["total"] + "");
addPushSource(appKey, master_secret, clict_code, beforeid, total, beforemenuname, menuid, uid);
}
}
else
{
// 重新计算人员消息
if (!string.IsNullOrEmpty(beforeusers) && !string.IsNullOrEmpty(beforemenuname) && beforeid > 0)
{
DataTable dtUsers = SqlHelper.ExecuteDataSet(string.Format("select employeeid userid,employeename username from P_employeeTab where employeename in ({0})",
"'" + beforeusers.Replace(",", "','") + "'")).Tables[0];
foreach (DataRow item in dtUsers.Rows)
{
string uid = item["userid"] + "";
string username = item["username"] + "";
sqlValue = string.Format(string.Format("select COUNT(1) total from wms_BillflowOper where stepOver=0 and modid='{0}' and CHARINDEX(',{1},',','+operators+',')>0", menuid, username));
int total = Convert.ToInt32(SqlHelper.ExecuteDataSet(sqlValue).Tables[0].Rows[0]["total"] + "");
addPushSource(appKey, master_secret, clict_code, beforeid, total, beforemenuname, menuid, uid);
}
}
}
}
catch (Exception e)
{
}
new Thread(new ThreadStart(push_all_message)).Start();
}
/// <summary>
/// 推送基础档案审核确认消息
/// </summary>
public void push_base_comfirm_message()
{
}
/// <summary>
/// 推送基础档案审核消息
/// </summary>
public void push_base_oper_message()
{
try
{
pushMessages.Clear();
// 极光推送key
DataTable dtSystemTab = SqlHelper.ExecuteDataSet("select * from p_systemtab").Tables[0];
string appKey = dtSystemTab.Rows[0]["JPushAppKey"] + "";
string master_secret = dtSystemTab.Rows[0]["JPushMaster_Secret"] + "";
string clict_code = dtSystemTab.Rows[0]["ClientCode"] + "";
if (string.IsNullOrEmpty(appKey))
return;
string sqlValue = string.Format("select operators,ToolsName menuname,'1'+CAST(b.dllid as varchar(10)) id from P_baseflowOper a,P_systemdlltab b where a.modid=b.DllCoid and keyvalue='{0}' and stepcode='{1}' and a.stepover=0", billid, stepcode);
DataTable dtTable = SqlHelper.ExecuteDataSet(sqlValue).Tables[0];
// 清空上一步人员消息
if (!string.IsNullOrEmpty(beforeusers) && !string.IsNullOrEmpty(beforemenuname) && beforeid > 0)
{
DataTable dtUsers = SqlHelper.ExecuteDataSet(string.Format("select employeeid userid,employeename username from P_employeeTab where employeename in ({0})",
"'" + beforeusers.Replace(",", "','") + "'")).Tables[0];
foreach (DataRow item in dtUsers.Rows)
{
string uid = item["userid"] + "";
string username = item["username"] + "";
addPushSource(appKey, master_secret, clict_code, beforeid, 0, beforemenuname, menuid, uid);
}
}
else
{
// 单据提交处理
sqlValue = string.Format("select operators,ToolsName menuname,'1'+CAST(b.dllid as varchar(10)) id from P_baseflowOper a,P_systemdlltab b where a.modid=b.DllCoid and keyvalue='{0}' and a.stepover=0", billid);
DataTable dtUsers = SqlHelper.ExecuteDataSet(sqlValue).Tables[0];
if (dtUsers.Rows.Count > 0)
{
beforeusers = dtUsers.Rows[0]["operators"] + "";
beforemenuname = dtUsers.Rows[0]["menuname"] + "";
beforeid = Convert.ToInt32(dtUsers.Rows[0]["id"] + "");
}
}
// 推送本次人员消息
if (dtTable != null && dtTable.Rows.Count > 0)
{
string operators = dtTable.Rows[0]["operators"] + "";
string menuname = dtTable.Rows[0]["menuname"] + "";
int id = Convert.ToInt32(dtTable.Rows[0]["id"] + "");
dtTable = SqlHelper.ExecuteDataSet(string.Format("select employeeid userid,employeename username from P_employeeTab where employeename in ({0})",
"'" + operators.Replace(",", "','") + "'")).Tables[0];
foreach (DataRow item in dtTable.Rows)
{
string uid = item["userid"] + "";
string username = item["username"] + "";
sqlValue = string.Format(string.Format("select COUNT(1) total from P_baseflowOper where stepOver=0 and modid='{0}' and CHARINDEX(',{1},',','+operators+',')>0", menuid, username));
int total = Convert.ToInt32(SqlHelper.ExecuteDataSet(sqlValue).Tables[0].Rows[0]["total"] + "");
addPushSource(appKey, master_secret, clict_code, beforeid, total, beforemenuname, menuid, uid);
}
}
else
{
// 终审重新计算人员
if (!string.IsNullOrEmpty(beforeusers) && !string.IsNullOrEmpty(beforemenuname) && beforeid > 0)
{
DataTable dtUsers = SqlHelper.ExecuteDataSet(string.Format("select employeeid userid,employeename username from P_employeeTab where employeename in ({0})",
"'" + beforeusers.Replace(",", "','") + "'")).Tables[0];
foreach (DataRow item in dtUsers.Rows)
{
string uid = item["userid"] + "";
string username = item["username"] + "";
sqlValue = string.Format(string.Format("select COUNT(1) total from P_baseflowOper where stepOver=0 and modid='{0}' and CHARINDEX(',{1},',','+operators+',')>0", menuid, username));
int total = Convert.ToInt32(SqlHelper.ExecuteDataSet(sqlValue).Tables[0].Rows[0]["total"] + "");
addPushSource(appKey, master_secret, clict_code, beforeid, total, beforemenuname, menuid, uid);
}
}
}
}
catch (Exception ex)
{
}
new Thread(new ThreadStart(push_all_message)).Start();
}
/// <summary>
/// 去除重复消息通知
/// </summary>
/// <param name="appkey"></param>
/// <param name="appsecret"></param>
/// <param name="appclict"></param>
/// <param name="id"></param>
/// <param name="total"></param>
/// <param name="menuname"></param>
/// <param name="menuid"></param>
/// <param name="uid"></param>
private void addPushSource(string appkey, string appsecret, string appclict, int id, int total,string menuname,string menuid,string uid)
{
if (pushMessages.ContainsKey(uid))
{
PushMessage push = pushMessages[uid];
if (push.total == 0)
{
push.total = total;
}
}
else
{
pushMessages.Add(uid, new PushMessage()
{
appkey = appkey,
appsecret = appsecret,
appclict = appclict,
id = beforeid,
total = total,
menuname = beforemenuname,
menuid = menuid,
uid = uid
});
}
}
/// <summary>
/// 推送消息
/// </summary>
/// <param name="appkey"></param>
/// <param name="appsecret"></param>
/// <param name="appclict"></param>
/// <param name="id"></param>
/// <param name="total"></param>
/// <param name="menuname"></param>
/// <param name="menuid"></param>
/// <param name="uid"></param>
private void push_all_message()
{
foreach (PushMessage item in pushMessages.Values)
{
// 推送android、ios消息
JPushClient jPushClient = new JPushClient(item.appkey, item.appsecret);
Dictionary<string, object> dicExtras = new Dictionary<string, object>();
dicExtras.Add("id", item.id); // 1.基础档案审批通知,2.单据审核通知
dicExtras.Add("title", item.menuname);
dicExtras.Add("total", item.total);
dicExtras.Add("desc", string.Format("您有{0}条数据需要审批.", item.total));
dicExtras.Add("menuid", menuid);
// 发送android消息
try
{
PushPayload android = JPushApi.PushObject_Android_Message("1002", item.appclict + "_" + item.uid + "", dicExtras);
MessageResult androidResult = jPushClient.SendPush(android);
}
catch (Exception ex)
{
}
try
{
// 发送ios消息
PushPayload ios = JPushApi.PushObject_Ios_Message("1002", item.appclict + "_" + item.uid + "", dicExtras);
MessageResult iosResult = jPushClient.SendPush(ios);
}
catch (Exception ex)
{
}
}
}
}
public class PushMessage
{
public string appkey;
public string appsecret;
public string appclict;
public int id;
public int total;
public string menuname;
public string menuid;
public string uid;
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

@@ -0,0 +1,84 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Lskj.Common
{
public class ControlModelTag_Bak
{
public ControlModelTag_Bak()
{
}
public ControlModelTag_Bak(bool IsSave, bool IsEmpt, string TipMsg, int filedTypeid, bool IsClear, string DefaultValue,
string DefaultText, object Tag)
{
this.IsSave = IsSave;
this.IsEmpt = IsEmpt;
this.TipMsg = TipMsg;
this.fieldTypeId = filedTypeid;
this.IsClear = IsClear;
this.DefaultValue = DefaultValue;
this.DefaultText = DefaultText;
this.Tag = Tag;
}
/// <summary>
/// 是否保存
/// </summary>
public bool IsSave { get; set; }
/// <summary>
/// 是否为空
/// </summary>
public bool IsEmpt { get; set; }
/// <summary>
/// 提示信息
/// </summary>
public string TipMsg { get; set; }
/// <summary>
/// 控件类型
/// </summary>
public int fieldTypeId { get; set; }
/// <summary>
/// 控件字段
/// </summary>
public string fieldName { get; set; }
/// <summary>
/// 是否清除
/// </summary>
public bool IsClear { get; set; }
/// <summary>
///默认Vlaue值
/// </summary>
public string DefaultValue { get; set; }
/// <summary>
/// 默认Text
/// </summary>
public string DefaultText { get; set; }
/// <summary>
/// 关联字段
/// </summary>
public string unionFields { get; set; }
/// <summary>
/// 关联值
/// </summary>
public string unionValue { get; set; }
/// <summary>
/// 扩展字段
/// </summary>
public object Tag { get; set; }
/// <summary>
/// 赋值
/// </summary>
public bool isSetText { get; set; }
/// <summary>
/// 时间格式化
/// </summary>
public string DateFormat { get; set; }
///<summary>
///下拉sql
///</summary>
public string lookupSql { get; set; }
}
}
+41
View File
@@ -0,0 +1,41 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Lskj.Common
{
public class ControlType
{
public const int LabText = 0;//文本框
public const int LabComboxValue = 1;//下拉框 获取Value值
public const int LabTreeType = 3;//树
public const int LabComboxText = 2;//下拉框 获取Text值
public const int LabDate = 4;//日期(年-月-日)
public const int LabDateTime = 44;//日期和时间(年-月-日 时-分-秒)
public const int LabDateTimeShort = 444; // 日期短时间(年-月-日 时-分)
public const int LabTime = 4444; // 时间(时-分-秒)
public const int LabShortTime = 44444; // 短时间(时-分)
public const int LabAutoSeacherValue = 5;//自动搜索 获取Value值
public const int LabAutoSeacherText = 6;//自动搜索 获取Text值
public const int LabTextInt = 7;//数字控件
public const int LabRemark = 9;//备注
public const int LabWWW = 10;//网址
public const int LabQQ = 11;//QQ
public const int LabMultiSelectValue = 13;//多选,获取Value
public const int LabMultiSelectText = 14;//多选,获取Text
public const int LabPic = 99;//图片
public const int LabCheckComboxValue = 21;
public const int LabCheckComboxText = 22;
public const int LabCheckAutoSeacherValue = 25;
public const int LabCheckAutoSeacherText = 26;
public const int LabCheckDateEx = 24;
public const int LabCheckDateTimeEx = 244;
public const int LabCheckDateTimeShort = 2444;
public const int LabCheckTime = 24444;
public const int LabCheckShortTime = 244444;
}
}
@@ -0,0 +1,55 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data;
namespace Lskj.Common
{
public class CreateControlModel
{
public CreateControlModel()
{
}
public CreateControlModel(Control ctr, string sql,string loginid, string loginname, DataTable dt)
{
this.ctr = ctr;
this.sql = sql;
this.loginid = loginid;
this.loginname = loginname;
this.dt = dt;
}
/// <summary>
/// 填充数据控件
/// </summary>
public Control ctr { get; set; }
/// <summary>
/// 填充Sql
/// </summary>
public string sql { get; set; }
/// <summary>
/// 登录Id
/// </summary>
public string loginid { get; set; }
/// <summary>
/// 登录用户名
/// </summary>
public string loginname { get; set; }
/// <summary>
/// 关联GUID
/// </summary>
public string formKey { get; set; }
/// <summary>
/// 数据
/// </summary>
public DataTable dt { get; set; }
/// <summary>
/// 搜索Sql
/// </summary>
public string SearchSql { get; set; }
public string[] otherParams { get; set; }
}
}
@@ -0,0 +1,72 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data;
namespace Lskj.Common
{
public class CreateControlModel2
{
/// <summary>
/// 开始坐标
/// </summary>
public int StartX { get; set; }
/// <summary>
/// 结束坐标
/// </summary>
public int StartY { get; set; }
/// <summary>
/// 添加控件容器
/// </summary>
public Control ctr { get; set; }
/// <summary>
/// 添加控件容器
/// </summary>
public Control ctr1 { get; set; }
/// <summary>
/// 添加控件容器
/// </summary>
public Control ctr2 { get; set; }
// /// <summary>
/// 添加控件容器
/// </summary>
public Control ctr3 { get; set; }
/// <summary>
/// 数据集
/// </summary>
public DataTable dt { get; set; }
/// <summary>
/// sql
/// </summary>
public string sql { get; set; }
/// <summary>
/// 登录Id
/// </summary>
public string loginid { get; set; }
/// <summary>
/// 容器存放控件数量
/// </summary>
public int ctrNum { get; set; }
/// <summary>
/// 登录用户名
/// </summary>
public string loginname { get; set; }
/// <summary>
/// 查看视图
/// </summary>
public int isView { get; set; }
/// <summary>
/// 操作类型
/// </summary>
public bool isUpdate { get; set; }
/// <summary>
/// 构造函数
/// </summary>
public CreateControlModel2()
{
}
}
}
@@ -0,0 +1,49 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Windows.Forms;
namespace Lskj.Common
{
public class MyControlText
{
public MyControlText() { }
/// <summary>
/// 赋值dr
/// </summary>
public DataRow dr { get; set; }
/// <summary>
/// 查询列数据
/// </summary>
public string sql { get; set; }
/// <summary>
/// 数据集合
/// </summary>
public DataTable dt { get; set; }
/// <summary>
/// 控件容器
/// </summary>
public Control ctr { get; set; }
/// <summary>
/// 表名
/// </summary>
public string TableName { get; set; }
/// <summary>
/// 修改条件
/// </summary>
public string where { get; set; }
public bool IsAdd { get; set; }
/// <summary>
/// 数据集合
/// </summary>
public string KeyFieldName { get; set; }
public string modid { get; set; }
/// <summary>
/// 数据集合
/// </summary>
public DataTable dtData { get; set; }
}
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff