增加test
parent
90abaa006a
commit
6363a5f553
Binary file not shown.
|
|
@ -17,5 +17,7 @@ namespace MES
|
|||
public virtual DbSet<sysUserInfo> sysUserInfo { get; set; }
|
||||
public virtual DbSet<sysDictDataInfo> sysDictDataInfo { get; set; }
|
||||
public virtual DbSet<sysDictTypeInfo> sysDictTypeInfo { get; set; }
|
||||
|
||||
public virtual DbSet<stockInfo> stockInfo { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
using WinformGeneralDeveloperFrame.Commons;
|
||||
|
||||
namespace MES.Entity
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Data.Entity.Spatial;
|
||||
|
||||
[Table("stock")]
|
||||
public partial class stockInfo
|
||||
{
|
||||
[Key]
|
||||
[NoEdit("txtcode")]
|
||||
[ModelBindControl("txtcode")]
|
||||
public string code{set;get;}
|
||||
[ModelBindControl("txtname")]
|
||||
public string name{set;get;}
|
||||
[ModelBindControl("txtstartPrice")]
|
||||
public decimal startPrice{set;get;}
|
||||
[ModelBindControl("txtolePrice")]
|
||||
public decimal olePrice{set;get;}
|
||||
[ModelBindControl("txtnowPrice")]
|
||||
public decimal nowPrice{set;get;}
|
||||
[ModelBindControl("txtmaxPrice")]
|
||||
public decimal maxPrice{set;get;}
|
||||
[ModelBindControl("txtminPrice")]
|
||||
public decimal minPrice{set;get;}
|
||||
[ModelBindControl("txtbidderPrice")]
|
||||
public decimal bidderPrice{set;get;}
|
||||
[ModelBindControl("txtauctionPrice")]
|
||||
public decimal auctionPrice{set;get;}
|
||||
[ModelBindControl("txtturnover")]
|
||||
public int turnover{set;get;}
|
||||
[ModelBindControl("txtturnoverPrice")]
|
||||
public decimal turnoverPrice{set;get;}
|
||||
[ModelBindControl("txtbuyOneNum")]
|
||||
public int buyOneNum{set;get;}
|
||||
[ModelBindControl("txtbuyOnePrice")]
|
||||
public decimal buyOnePrice{set;get;}
|
||||
[ModelBindControl("txtbuyTwoNum")]
|
||||
public int buyTwoNum{set;get;}
|
||||
[ModelBindControl("txtbuyTwoPrice")]
|
||||
public decimal buyTwoPrice{set;get;}
|
||||
[ModelBindControl("txtbuyThreeNum")]
|
||||
public int buyThreeNum{set;get;}
|
||||
[ModelBindControl("txtbuyThreePrice")]
|
||||
public decimal buyThreePrice{set;get;}
|
||||
[ModelBindControl("txtbuyFourNum")]
|
||||
public int buyFourNum{set;get;}
|
||||
[ModelBindControl("txtbuyFourPrice")]
|
||||
public decimal buyFourPrice{set;get;}
|
||||
[ModelBindControl("txtbuyFiveNum")]
|
||||
public int buyFiveNum{set;get;}
|
||||
[ModelBindControl("txtbuyFivePrice")]
|
||||
public decimal buyFivePrice{set;get;}
|
||||
[ModelBindControl("txtsellOneNum")]
|
||||
public int sellOneNum{set;get;}
|
||||
[ModelBindControl("txtsellOnePrice")]
|
||||
public decimal sellOnePrice{set;get;}
|
||||
[ModelBindControl("txtsellTwoNum")]
|
||||
public int sellTwoNum{set;get;}
|
||||
[ModelBindControl("txtsellTwoPrice")]
|
||||
public decimal sellTwoPrice{set;get;}
|
||||
[ModelBindControl("txtsellThreeNum")]
|
||||
public int sellThreeNum{set;get;}
|
||||
[ModelBindControl("txtsellThreePrice")]
|
||||
public decimal sellThreePrice{set;get;}
|
||||
[ModelBindControl("txtsellFourNum")]
|
||||
public int sellFourNum{set;get;}
|
||||
[ModelBindControl("txtsellFourPrice")]
|
||||
public decimal sellFourPrice{set;get;}
|
||||
[ModelBindControl("txtsellFiveNum")]
|
||||
public int sellFiveNum{set;get;}
|
||||
[ModelBindControl("txtsellFivePrice")]
|
||||
public decimal sellFivePrice{set;get;}
|
||||
[ModelBindControl("txttimeStr")]
|
||||
public DateTime? timeStr{set;get;}=DateTime.Now;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -37,6 +37,8 @@ namespace MES.Entity
|
|||
public DateTime? editTime{set;get;}=DateTime.Now;
|
||||
[ModelBindControl("txtisForm")]
|
||||
public bool isForm{set;get;}
|
||||
|
||||
[ModelBindControl("txtisToolBtn")]
|
||||
public bool isToolBtn { set; get; }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,331 @@
|
|||
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 WinformGeneralDeveloperFrame;
|
||||
using WinformGeneralDeveloperFrame.Commons;
|
||||
using DevExpress.XtraLayout;
|
||||
using MES.Entity;
|
||||
using System.Data.Entity.Migrations;
|
||||
using System.Data.Entity;
|
||||
namespace MES.Form
|
||||
{
|
||||
public partial class Frmstock : FrmBaseForm
|
||||
{
|
||||
private Dictionary<string, string> fieldDictionary = new Dictionary<string, string>();
|
||||
public Frmstock()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
private void Frmstock_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
InitFrom(xtraTabControl1,grdList,grdListView,new LayoutControlGroup[]{layoutControlGroup1},new stockInfo());
|
||||
InitSearchDicData();
|
||||
}
|
||||
/// <summary>
|
||||
/// 数据源初始化
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private void Init()
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 搜索字段
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private void InitSearchDicData()
|
||||
{
|
||||
fieldDictionary.Add("代码","code");
|
||||
fieldDictionary.Add("名称","name");
|
||||
fieldDictionary.Add("时间","timeStr");
|
||||
}
|
||||
/// <summary>
|
||||
/// 保存
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override bool SaveFunction()
|
||||
{
|
||||
try
|
||||
{
|
||||
stockInfo info= (stockInfo)this.ControlDataToModel(new stockInfo());
|
||||
using (var db = new MESDB())
|
||||
{
|
||||
db.stockInfo.AddOrUpdate(info);
|
||||
db.SaveChanges();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ex.Message.ShowError();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public override void InitgrdListDataSource()
|
||||
{
|
||||
using (var con=new MESDB())///
|
||||
{
|
||||
grdList.DataSource=con.stockInfo.ToList();
|
||||
}
|
||||
Init();
|
||||
}
|
||||
/// <summary>
|
||||
/// 字段为空校验
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override bool CheckInput()
|
||||
{
|
||||
if(string.IsNullOrEmpty(txtname.EditValue.ToString()))
|
||||
{
|
||||
"名称不能为空".ShowWarning();
|
||||
txtname.Focus();
|
||||
return false;
|
||||
}
|
||||
if(string.IsNullOrEmpty(txtstartPrice.EditValue.ToString()))
|
||||
{
|
||||
"今日开盘价不能为空".ShowWarning();
|
||||
txtstartPrice.Focus();
|
||||
return false;
|
||||
}
|
||||
if(string.IsNullOrEmpty(txtolePrice.EditValue.ToString()))
|
||||
{
|
||||
"昨日收盘价不能为空".ShowWarning();
|
||||
txtolePrice.Focus();
|
||||
return false;
|
||||
}
|
||||
if(string.IsNullOrEmpty(txtnowPrice.EditValue.ToString()))
|
||||
{
|
||||
"当前价格不能为空".ShowWarning();
|
||||
txtnowPrice.Focus();
|
||||
return false;
|
||||
}
|
||||
if(string.IsNullOrEmpty(txtmaxPrice.EditValue.ToString()))
|
||||
{
|
||||
"今日最高价不能为空".ShowWarning();
|
||||
txtmaxPrice.Focus();
|
||||
return false;
|
||||
}
|
||||
if(string.IsNullOrEmpty(txtminPrice.EditValue.ToString()))
|
||||
{
|
||||
"今日最低价不能为空".ShowWarning();
|
||||
txtminPrice.Focus();
|
||||
return false;
|
||||
}
|
||||
if(string.IsNullOrEmpty(txtbidderPrice.EditValue.ToString()))
|
||||
{
|
||||
"竞买价不能为空".ShowWarning();
|
||||
txtbidderPrice.Focus();
|
||||
return false;
|
||||
}
|
||||
if(string.IsNullOrEmpty(txtauctionPrice.EditValue.ToString()))
|
||||
{
|
||||
"竞卖价不能为空".ShowWarning();
|
||||
txtauctionPrice.Focus();
|
||||
return false;
|
||||
}
|
||||
if(string.IsNullOrEmpty(txtturnover.EditValue.ToString()))
|
||||
{
|
||||
"成交股票数不能为空".ShowWarning();
|
||||
txtturnover.Focus();
|
||||
return false;
|
||||
}
|
||||
if(string.IsNullOrEmpty(txtturnoverPrice.EditValue.ToString()))
|
||||
{
|
||||
"成交金额不能为空".ShowWarning();
|
||||
txtturnoverPrice.Focus();
|
||||
return false;
|
||||
}
|
||||
if(string.IsNullOrEmpty(txtbuyOneNum.EditValue.ToString()))
|
||||
{
|
||||
"买1数量不能为空".ShowWarning();
|
||||
txtbuyOneNum.Focus();
|
||||
return false;
|
||||
}
|
||||
if(string.IsNullOrEmpty(txtbuyOnePrice.EditValue.ToString()))
|
||||
{
|
||||
"买1价格不能为空".ShowWarning();
|
||||
txtbuyOnePrice.Focus();
|
||||
return false;
|
||||
}
|
||||
if(string.IsNullOrEmpty(txtbuyTwoNum.EditValue.ToString()))
|
||||
{
|
||||
"买2数量不能为空".ShowWarning();
|
||||
txtbuyTwoNum.Focus();
|
||||
return false;
|
||||
}
|
||||
if(string.IsNullOrEmpty(txtbuyTwoPrice.EditValue.ToString()))
|
||||
{
|
||||
"买2价格不能为空".ShowWarning();
|
||||
txtbuyTwoPrice.Focus();
|
||||
return false;
|
||||
}
|
||||
if(string.IsNullOrEmpty(txtbuyThreeNum.EditValue.ToString()))
|
||||
{
|
||||
"买3数量不能为空".ShowWarning();
|
||||
txtbuyThreeNum.Focus();
|
||||
return false;
|
||||
}
|
||||
if(string.IsNullOrEmpty(txtbuyThreePrice.EditValue.ToString()))
|
||||
{
|
||||
"买3价格不能为空".ShowWarning();
|
||||
txtbuyThreePrice.Focus();
|
||||
return false;
|
||||
}
|
||||
if(string.IsNullOrEmpty(txtbuyFourNum.EditValue.ToString()))
|
||||
{
|
||||
"买4数量不能为空".ShowWarning();
|
||||
txtbuyFourNum.Focus();
|
||||
return false;
|
||||
}
|
||||
if(string.IsNullOrEmpty(txtbuyFourPrice.EditValue.ToString()))
|
||||
{
|
||||
"买4价格不能为空".ShowWarning();
|
||||
txtbuyFourPrice.Focus();
|
||||
return false;
|
||||
}
|
||||
if(string.IsNullOrEmpty(txtbuyFiveNum.EditValue.ToString()))
|
||||
{
|
||||
"买5数量不能为空".ShowWarning();
|
||||
txtbuyFiveNum.Focus();
|
||||
return false;
|
||||
}
|
||||
if(string.IsNullOrEmpty(txtbuyFivePrice.EditValue.ToString()))
|
||||
{
|
||||
"买5价格不能为空".ShowWarning();
|
||||
txtbuyFivePrice.Focus();
|
||||
return false;
|
||||
}
|
||||
if(string.IsNullOrEmpty(txtsellOneNum.EditValue.ToString()))
|
||||
{
|
||||
"卖1数量不能为空".ShowWarning();
|
||||
txtsellOneNum.Focus();
|
||||
return false;
|
||||
}
|
||||
if(string.IsNullOrEmpty(txtsellOnePrice.EditValue.ToString()))
|
||||
{
|
||||
"卖1价格不能为空".ShowWarning();
|
||||
txtsellOnePrice.Focus();
|
||||
return false;
|
||||
}
|
||||
if(string.IsNullOrEmpty(txtsellTwoNum.EditValue.ToString()))
|
||||
{
|
||||
"卖2数量不能为空".ShowWarning();
|
||||
txtsellTwoNum.Focus();
|
||||
return false;
|
||||
}
|
||||
if(string.IsNullOrEmpty(txtsellTwoPrice.EditValue.ToString()))
|
||||
{
|
||||
"卖2价格不能为空".ShowWarning();
|
||||
txtsellTwoPrice.Focus();
|
||||
return false;
|
||||
}
|
||||
if(string.IsNullOrEmpty(txtsellThreeNum.EditValue.ToString()))
|
||||
{
|
||||
"卖3数量不能为空".ShowWarning();
|
||||
txtsellThreeNum.Focus();
|
||||
return false;
|
||||
}
|
||||
if(string.IsNullOrEmpty(txtsellThreePrice.EditValue.ToString()))
|
||||
{
|
||||
"卖3价格不能为空".ShowWarning();
|
||||
txtsellThreePrice.Focus();
|
||||
return false;
|
||||
}
|
||||
if(string.IsNullOrEmpty(txtsellFourNum.EditValue.ToString()))
|
||||
{
|
||||
"卖4数量不能为空".ShowWarning();
|
||||
txtsellFourNum.Focus();
|
||||
return false;
|
||||
}
|
||||
if(string.IsNullOrEmpty(txtsellFourPrice.EditValue.ToString()))
|
||||
{
|
||||
"卖4价格不能为空".ShowWarning();
|
||||
txtsellFourPrice.Focus();
|
||||
return false;
|
||||
}
|
||||
if(string.IsNullOrEmpty(txtsellFiveNum.EditValue.ToString()))
|
||||
{
|
||||
"卖5数量不能为空".ShowWarning();
|
||||
txtsellFiveNum.Focus();
|
||||
return false;
|
||||
}
|
||||
if(string.IsNullOrEmpty(txtsellFivePrice.EditValue.ToString()))
|
||||
{
|
||||
"卖5价格不能为空".ShowWarning();
|
||||
txtsellFivePrice.Focus();
|
||||
return false;
|
||||
}
|
||||
if(string.IsNullOrEmpty(txttimeStr.EditValue.ToString()))
|
||||
{
|
||||
"时间不能为空".ShowWarning();
|
||||
txttimeStr.Focus();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override bool DelFunction()
|
||||
{
|
||||
try
|
||||
{
|
||||
stockInfo info = (stockInfo)this.ControlDataToModel(new stockInfo());
|
||||
using (var db = new MESDB())
|
||||
{
|
||||
db.Entry(info).State=EntityState.Deleted;
|
||||
db.SaveChanges();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ex.Message.ShowError();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
/// <summary>
|
||||
/// 搜索
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override void SearchFunction()
|
||||
{
|
||||
FrmSearch frm = new FrmSearch(fieldDictionary);
|
||||
if (frm.ShowDialog()==DialogResult.OK)
|
||||
{
|
||||
string sql = frm.sql;
|
||||
using (var db = new MESDB())
|
||||
{
|
||||
if (string.IsNullOrEmpty(sql))
|
||||
{
|
||||
grdList.DataSource = db.stockInfo.SqlQuery("select * from stock").ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
grdList.DataSource = db.stockInfo.SqlQuery($"select * from stock where {sql}").ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void timer1_Tick(object sender, EventArgs e)
|
||||
{
|
||||
using (var con = new MESDB())
|
||||
{
|
||||
grdList.DataSource = con.stockInfo.ToList().OrderByDescending(p=>p.turnoverPrice);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,123 @@
|
|||
<?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>
|
||||
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
|
|
@ -90,6 +90,10 @@ namespace MES.Form
|
|||
this.layoutControlItem14 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.xtraOpenFileDialog1 = new DevExpress.XtraEditors.XtraOpenFileDialog(this.components);
|
||||
this.gridColumn14 = new DevExpress.XtraGrid.Columns.GridColumn();
|
||||
this.repositoryItemCheckEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemCheckEdit();
|
||||
this.txtisToolBtn = new DevExpress.XtraEditors.CheckEdit();
|
||||
this.layoutControlItem15 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
((System.ComponentModel.ISupportInitialize)(this.repositoryItemTreeListtxtpid)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.repositoryItemTreeListtxtpidTreeList)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtcreatorId)).BeginInit();
|
||||
|
|
@ -136,6 +140,9 @@ namespace MES.Form
|
|||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem14)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.repositoryItemCheckEdit1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.txtisToolBtn.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem15)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// gridColumn1
|
||||
|
|
@ -234,7 +241,7 @@ namespace MES.Form
|
|||
this.gridColumn9.FieldName = "creatorId";
|
||||
this.gridColumn9.Name = "gridColumn9";
|
||||
this.gridColumn9.Visible = true;
|
||||
this.gridColumn9.VisibleIndex = 7;
|
||||
this.gridColumn9.VisibleIndex = 9;
|
||||
this.gridColumn9.Width = 201;
|
||||
//
|
||||
// repositoryItemtxtcreatorId
|
||||
|
|
@ -254,7 +261,7 @@ namespace MES.Form
|
|||
this.gridColumn10.FieldName = "createTime";
|
||||
this.gridColumn10.Name = "gridColumn10";
|
||||
this.gridColumn10.Visible = true;
|
||||
this.gridColumn10.VisibleIndex = 8;
|
||||
this.gridColumn10.VisibleIndex = 10;
|
||||
this.gridColumn10.Width = 201;
|
||||
//
|
||||
// gridColumn11
|
||||
|
|
@ -264,7 +271,7 @@ namespace MES.Form
|
|||
this.gridColumn11.FieldName = "editorId";
|
||||
this.gridColumn11.Name = "gridColumn11";
|
||||
this.gridColumn11.Visible = true;
|
||||
this.gridColumn11.VisibleIndex = 9;
|
||||
this.gridColumn11.VisibleIndex = 11;
|
||||
this.gridColumn11.Width = 201;
|
||||
//
|
||||
// repositoryItemtxteditorId
|
||||
|
|
@ -282,7 +289,7 @@ namespace MES.Form
|
|||
this.gridColumn12.FieldName = "editTime";
|
||||
this.gridColumn12.Name = "gridColumn12";
|
||||
this.gridColumn12.Visible = true;
|
||||
this.gridColumn12.VisibleIndex = 10;
|
||||
this.gridColumn12.VisibleIndex = 12;
|
||||
this.gridColumn12.Width = 201;
|
||||
//
|
||||
// gridColumn13
|
||||
|
|
@ -291,7 +298,7 @@ namespace MES.Form
|
|||
this.gridColumn13.FieldName = "isForm";
|
||||
this.gridColumn13.Name = "gridColumn13";
|
||||
this.gridColumn13.Visible = true;
|
||||
this.gridColumn13.VisibleIndex = 11;
|
||||
this.gridColumn13.VisibleIndex = 7;
|
||||
this.gridColumn13.Width = 201;
|
||||
//
|
||||
// xtraTabControl1
|
||||
|
|
@ -319,6 +326,8 @@ namespace MES.Form
|
|||
this.grdList.Location = new System.Drawing.Point(0, 0);
|
||||
this.grdList.MainView = this.grdListView;
|
||||
this.grdList.Name = "grdList";
|
||||
this.grdList.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] {
|
||||
this.repositoryItemCheckEdit1});
|
||||
this.grdList.Size = new System.Drawing.Size(881, 479);
|
||||
this.grdList.TabIndex = 0;
|
||||
this.grdList.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
|
||||
|
|
@ -339,7 +348,8 @@ namespace MES.Form
|
|||
this.gridColumn10,
|
||||
this.gridColumn11,
|
||||
this.gridColumn12,
|
||||
this.gridColumn13});
|
||||
this.gridColumn13,
|
||||
this.gridColumn14});
|
||||
this.grdListView.GridControl = this.grdList;
|
||||
this.grdListView.Name = "grdListView";
|
||||
this.grdListView.OptionsBehavior.Editable = false;
|
||||
|
|
@ -365,6 +375,7 @@ namespace MES.Form
|
|||
//
|
||||
// layoutControl1
|
||||
//
|
||||
this.layoutControl1.Controls.Add(this.txtisToolBtn);
|
||||
this.layoutControl1.Controls.Add(this.txtname);
|
||||
this.layoutControl1.Controls.Add(this.txtid);
|
||||
this.layoutControl1.Controls.Add(this.simpleButton1);
|
||||
|
|
@ -469,7 +480,7 @@ namespace MES.Form
|
|||
this.txtisEnabled.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Default;
|
||||
this.txtisEnabled.Properties.Caption = "有效";
|
||||
this.txtisEnabled.Properties.NullStyle = DevExpress.XtraEditors.Controls.StyleIndeterminate.Unchecked;
|
||||
this.txtisEnabled.Size = new System.Drawing.Size(210, 19);
|
||||
this.txtisEnabled.Size = new System.Drawing.Size(142, 19);
|
||||
this.txtisEnabled.StyleController = this.layoutControl1;
|
||||
this.txtisEnabled.TabIndex = 6;
|
||||
//
|
||||
|
|
@ -549,12 +560,12 @@ namespace MES.Form
|
|||
// txtisForm
|
||||
//
|
||||
this.txtisForm.EditValue = null;
|
||||
this.txtisForm.Location = new System.Drawing.Point(654, 62);
|
||||
this.txtisForm.Location = new System.Drawing.Point(586, 62);
|
||||
this.txtisForm.Name = "txtisForm";
|
||||
this.txtisForm.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Default;
|
||||
this.txtisForm.Properties.Caption = "是否界面";
|
||||
this.txtisForm.Properties.NullStyle = DevExpress.XtraEditors.Controls.StyleIndeterminate.Unchecked;
|
||||
this.txtisForm.Size = new System.Drawing.Size(211, 19);
|
||||
this.txtisForm.Size = new System.Drawing.Size(147, 19);
|
||||
this.txtisForm.StyleController = this.layoutControl1;
|
||||
this.txtisForm.TabIndex = 12;
|
||||
//
|
||||
|
|
@ -577,7 +588,8 @@ namespace MES.Form
|
|||
this.layoutControlItem11,
|
||||
this.layoutControlItem13,
|
||||
this.layoutControlItem14,
|
||||
this.layoutControlItem2});
|
||||
this.layoutControlItem2,
|
||||
this.layoutControlItem15});
|
||||
this.layoutControlGroup1.Name = "layoutControlGroup1";
|
||||
this.layoutControlGroup1.Size = new System.Drawing.Size(877, 475);
|
||||
this.layoutControlGroup1.TextVisible = false;
|
||||
|
|
@ -658,7 +670,7 @@ namespace MES.Form
|
|||
this.layoutControlItem6.CustomizationFormText = "有效";
|
||||
this.layoutControlItem6.Location = new System.Drawing.Point(428, 50);
|
||||
this.layoutControlItem6.Name = "layoutControlItem6";
|
||||
this.layoutControlItem6.Size = new System.Drawing.Size(214, 24);
|
||||
this.layoutControlItem6.Size = new System.Drawing.Size(146, 24);
|
||||
this.layoutControlItem6.Text = "有效";
|
||||
this.layoutControlItem6.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem6.TextVisible = false;
|
||||
|
|
@ -667,9 +679,9 @@ namespace MES.Form
|
|||
//
|
||||
this.layoutControlItem12.Control = this.txtisForm;
|
||||
this.layoutControlItem12.CustomizationFormText = "是否界面";
|
||||
this.layoutControlItem12.Location = new System.Drawing.Point(642, 50);
|
||||
this.layoutControlItem12.Location = new System.Drawing.Point(574, 50);
|
||||
this.layoutControlItem12.Name = "layoutControlItem12";
|
||||
this.layoutControlItem12.Size = new System.Drawing.Size(215, 24);
|
||||
this.layoutControlItem12.Size = new System.Drawing.Size(151, 24);
|
||||
this.layoutControlItem12.Text = "是否界面";
|
||||
this.layoutControlItem12.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem12.TextVisible = false;
|
||||
|
|
@ -733,6 +745,38 @@ namespace MES.Form
|
|||
//
|
||||
this.xtraOpenFileDialog1.FileName = "xtraOpenFileDialog1";
|
||||
//
|
||||
// gridColumn14
|
||||
//
|
||||
this.gridColumn14.Caption = "是否功能按钮";
|
||||
this.gridColumn14.ColumnEdit = this.repositoryItemCheckEdit1;
|
||||
this.gridColumn14.FieldName = "isToolBtn";
|
||||
this.gridColumn14.Name = "gridColumn14";
|
||||
this.gridColumn14.Visible = true;
|
||||
this.gridColumn14.VisibleIndex = 8;
|
||||
//
|
||||
// repositoryItemCheckEdit1
|
||||
//
|
||||
this.repositoryItemCheckEdit1.AutoHeight = false;
|
||||
this.repositoryItemCheckEdit1.Name = "repositoryItemCheckEdit1";
|
||||
//
|
||||
// txtisToolBtn
|
||||
//
|
||||
this.txtisToolBtn.Location = new System.Drawing.Point(737, 62);
|
||||
this.txtisToolBtn.Name = "txtisToolBtn";
|
||||
this.txtisToolBtn.Properties.Caption = "是否功能按钮";
|
||||
this.txtisToolBtn.Size = new System.Drawing.Size(128, 19);
|
||||
this.txtisToolBtn.StyleController = this.layoutControl1;
|
||||
this.txtisToolBtn.TabIndex = 16;
|
||||
//
|
||||
// layoutControlItem15
|
||||
//
|
||||
this.layoutControlItem15.Control = this.txtisToolBtn;
|
||||
this.layoutControlItem15.Location = new System.Drawing.Point(725, 50);
|
||||
this.layoutControlItem15.Name = "layoutControlItem15";
|
||||
this.layoutControlItem15.Size = new System.Drawing.Size(132, 24);
|
||||
this.layoutControlItem15.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem15.TextVisible = false;
|
||||
//
|
||||
// FrmsysMenu
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
|
||||
|
|
@ -740,7 +784,7 @@ namespace MES.Form
|
|||
this.ClientSize = new System.Drawing.Size(887, 542);
|
||||
this.Controls.Add(this.xtraTabControl1);
|
||||
this.Name = "FrmsysMenu";
|
||||
this.Text = "FrmsysMenu";
|
||||
this.Text = "菜单维护";
|
||||
this.Load += new System.EventHandler(this.FrmsysMenu_Load);
|
||||
this.Controls.SetChildIndex(this.xtraTabControl1, 0);
|
||||
((System.ComponentModel.ISupportInitialize)(this.repositoryItemTreeListtxtpid)).EndInit();
|
||||
|
|
@ -789,6 +833,9 @@ namespace MES.Form
|
|||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem14)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.repositoryItemCheckEdit1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.txtisToolBtn.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem15)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
|
@ -863,5 +910,9 @@ namespace MES.Form
|
|||
private LayoutControlItem layoutControlItem14;
|
||||
private TextEdit txtname;
|
||||
private LayoutControlItem layoutControlItem2;
|
||||
private DevExpress.XtraGrid.Columns.GridColumn gridColumn14;
|
||||
private DevExpress.XtraEditors.Repository.RepositoryItemCheckEdit repositoryItemCheckEdit1;
|
||||
private CheckEdit txtisToolBtn;
|
||||
private LayoutControlItem layoutControlItem15;
|
||||
}
|
||||
}
|
||||
|
|
@ -17,13 +17,14 @@ namespace MES.Form
|
|||
{
|
||||
public partial class FrmsysUser : FrmBaseForm
|
||||
{
|
||||
public FrmsysUser()
|
||||
private Dictionary<string, string> fieldDictionary = new Dictionary<string, string>();
|
||||
public FrmsysUser()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
private void FrmsysUser_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
{
|
||||
InitSearchDicData();
|
||||
InitFrom(xtraTabControl1, grdList, grdListView, new LayoutControlGroup[] { layoutControlGroup1 }, new sysUserInfo());
|
||||
}
|
||||
private void Init()
|
||||
|
|
@ -37,7 +38,11 @@ namespace MES.Form
|
|||
repositoryItemtxteditorId.DataSource = GetDataTableUtils.SqlTable("用户");
|
||||
|
||||
}
|
||||
|
||||
private void InitSearchDicData()
|
||||
{
|
||||
fieldDictionary.Add("用户名", "username");
|
||||
fieldDictionary.Add("工号", "account");
|
||||
}
|
||||
public override bool SaveFunction()
|
||||
{
|
||||
try
|
||||
|
|
@ -135,5 +140,39 @@ namespace MES.Form
|
|||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
public override void SearchFunction()
|
||||
{
|
||||
FrmSearch frm = new FrmSearch(fieldDictionary);
|
||||
if (frm.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
string sql = frm.sql;
|
||||
using (var db = new MESDB())
|
||||
{
|
||||
if (string.IsNullOrEmpty(sql))
|
||||
{
|
||||
grdList.DataSource = db.sysUserInfo.SqlQuery("select * from sysUser").ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
grdList.DataSource = db.sysUserInfo.SqlQuery($"select * from sysUser where {sql}").ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void txtaccount_Leave(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(txtid.Text))
|
||||
{
|
||||
using (var con = new MESDB())
|
||||
{
|
||||
if (con.sysUserInfo.Where(p => p.account.Equals(txtaccount.Text)).Count() > 0)
|
||||
{
|
||||
txtaccount.Focus();
|
||||
"工号已存在!".ShowWarning();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -366,6 +366,7 @@ namespace MES.Form
|
|||
this.txtaccount.Size = new System.Drawing.Size(224, 20);
|
||||
this.txtaccount.StyleController = this.layoutControl1;
|
||||
this.txtaccount.TabIndex = 2;
|
||||
this.txtaccount.Leave += new System.EventHandler(this.txtaccount_Leave);
|
||||
//
|
||||
// txtusername
|
||||
//
|
||||
|
|
@ -646,7 +647,7 @@ namespace MES.Form
|
|||
this.ClientSize = new System.Drawing.Size(587, 500);
|
||||
this.Controls.Add(this.xtraTabControl1);
|
||||
this.Name = "FrmsysUser";
|
||||
this.Text = "FrmsysUser";
|
||||
this.Text = "用户维护";
|
||||
this.Load += new System.EventHandler(this.FrmsysUser_Load);
|
||||
this.Controls.SetChildIndex(this.xtraTabControl1, 0);
|
||||
((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtdeptId)).EndInit();
|
||||
|
|
|
|||
|
|
@ -75,13 +75,17 @@ namespace WinformGeneralDeveloperFrame
|
|||
xtraTab.TabPages[0].PageEnabled = false;
|
||||
ClearScreen();
|
||||
DateEdit dt = (DateEdit)this.getControl("txtcreateTime");
|
||||
dt.DateTime = DateTime.Now;
|
||||
if (dt != null)
|
||||
dt.DateTime = DateTime.Now;
|
||||
LookUpEditBase look= (LookUpEditBase)this.getControl("txtcreatorId");
|
||||
DateEdit dt1 = (DateEdit)this.getControl("txteditTime");
|
||||
dt1.DateTime = DateTime.Now;
|
||||
if (dt1 != null)
|
||||
dt1.DateTime = DateTime.Now;
|
||||
LookUpEditBase look1 = (LookUpEditBase)this.getControl("txteditorId");
|
||||
look1.EditValue = AppInfo.LoginUserInfo.id;
|
||||
look.EditValue = AppInfo.LoginUserInfo.id;
|
||||
if (look1 != null)
|
||||
look1.EditValue = AppInfo.LoginUserInfo.id;
|
||||
if (look != null)
|
||||
look.EditValue = AppInfo.LoginUserInfo.id;
|
||||
SetControlStatus(controlGroups, false);
|
||||
InitToolBtntatus(EFormStatus.eAdd);
|
||||
AddFunction();
|
||||
|
|
@ -94,9 +98,11 @@ namespace WinformGeneralDeveloperFrame
|
|||
{
|
||||
xtraTab.TabPages[0].PageEnabled = false;
|
||||
DateEdit dt =(DateEdit) this.getControl("txteditTime");
|
||||
dt.DateTime=DateTime.Now;
|
||||
if(dt!=null)
|
||||
dt.DateTime=DateTime.Now;
|
||||
LookUpEditBase look = (LookUpEditBase)this.getControl("txteditorId");
|
||||
look.EditValue = AppInfo.LoginUserInfo.id;
|
||||
if (look != null)
|
||||
look.EditValue = AppInfo.LoginUserInfo.id;
|
||||
SetControlStatus(controlGroups, false);
|
||||
InitToolBtntatus(EFormStatus.eEdit);
|
||||
EditFunction();
|
||||
|
|
|
|||
|
|
@ -30,48 +30,43 @@ namespace WinformGeneralDeveloperFrame
|
|||
private void InitializeComponent()
|
||||
{
|
||||
this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
|
||||
this.btncanel = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.btnok = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.txtvalue = new DevExpress.XtraEditors.TextEdit();
|
||||
this.txtrelation = new DevExpress.XtraEditors.ComboBoxEdit();
|
||||
this.txtSql = new DevExpress.XtraEditors.MemoEdit();
|
||||
this.btnadd = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.txtoperator = new DevExpress.XtraEditors.ComboBoxEdit();
|
||||
this.txtField = new DevExpress.XtraEditors.ComboBoxEdit();
|
||||
this.Root = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.txtoperator = new DevExpress.XtraEditors.ComboBoxEdit();
|
||||
this.txtrelation = new DevExpress.XtraEditors.ComboBoxEdit();
|
||||
this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.txtvalue = new DevExpress.XtraEditors.TextEdit();
|
||||
this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.btnok = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.btncanel = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.txtsort = new DevExpress.XtraEditors.CheckEdit();
|
||||
this.layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
|
||||
this.layoutControl1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.txtvalue.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.txtrelation.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.txtSql.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.txtoperator.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.txtField.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.txtoperator.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.txtrelation.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.txtvalue.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.txtsort.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// layoutControl1
|
||||
//
|
||||
this.layoutControl1.Controls.Add(this.txtsort);
|
||||
this.layoutControl1.Controls.Add(this.btncanel);
|
||||
this.layoutControl1.Controls.Add(this.btnok);
|
||||
this.layoutControl1.Controls.Add(this.txtvalue);
|
||||
|
|
@ -84,28 +79,88 @@ namespace WinformGeneralDeveloperFrame
|
|||
this.layoutControl1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControl1.Name = "layoutControl1";
|
||||
this.layoutControl1.Root = this.Root;
|
||||
this.layoutControl1.Size = new System.Drawing.Size(737, 430);
|
||||
this.layoutControl1.Size = new System.Drawing.Size(536, 299);
|
||||
this.layoutControl1.TabIndex = 0;
|
||||
this.layoutControl1.Text = "layoutControl1";
|
||||
//
|
||||
// btncanel
|
||||
//
|
||||
this.btncanel.Location = new System.Drawing.Point(270, 265);
|
||||
this.btncanel.Name = "btncanel";
|
||||
this.btncanel.Size = new System.Drawing.Size(254, 22);
|
||||
this.btncanel.StyleController = this.layoutControl1;
|
||||
this.btncanel.TabIndex = 13;
|
||||
this.btncanel.Text = "取消";
|
||||
this.btncanel.Click += new System.EventHandler(this.btncanel_Click);
|
||||
//
|
||||
// btnok
|
||||
//
|
||||
this.btnok.Location = new System.Drawing.Point(12, 265);
|
||||
this.btnok.Name = "btnok";
|
||||
this.btnok.Size = new System.Drawing.Size(254, 22);
|
||||
this.btnok.StyleController = this.layoutControl1;
|
||||
this.btnok.TabIndex = 12;
|
||||
this.btnok.Text = "确定";
|
||||
this.btnok.Click += new System.EventHandler(this.btnok_Click);
|
||||
//
|
||||
// txtvalue
|
||||
//
|
||||
this.txtvalue.Location = new System.Drawing.Point(222, 12);
|
||||
this.txtvalue.Name = "txtvalue";
|
||||
this.txtvalue.Size = new System.Drawing.Size(97, 20);
|
||||
this.txtvalue.StyleController = this.layoutControl1;
|
||||
this.txtvalue.TabIndex = 11;
|
||||
//
|
||||
// txtrelation
|
||||
//
|
||||
this.txtrelation.EditValue = "与-and";
|
||||
this.txtrelation.Location = new System.Drawing.Point(364, 12);
|
||||
this.txtrelation.Name = "txtrelation";
|
||||
this.txtrelation.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
|
||||
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
|
||||
this.txtrelation.Properties.Items.AddRange(new object[] {
|
||||
"与-and",
|
||||
"或-or"});
|
||||
this.txtrelation.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
|
||||
this.txtrelation.Size = new System.Drawing.Size(71, 20);
|
||||
this.txtrelation.StyleController = this.layoutControl1;
|
||||
this.txtrelation.TabIndex = 10;
|
||||
//
|
||||
// txtSql
|
||||
//
|
||||
this.txtSql.Location = new System.Drawing.Point(12, 38);
|
||||
this.txtSql.Name = "txtSql";
|
||||
this.txtSql.Size = new System.Drawing.Size(713, 354);
|
||||
this.txtSql.Size = new System.Drawing.Size(512, 223);
|
||||
this.txtSql.StyleController = this.layoutControl1;
|
||||
this.txtSql.TabIndex = 8;
|
||||
//
|
||||
// btnadd
|
||||
//
|
||||
this.btnadd.Location = new System.Drawing.Point(657, 12);
|
||||
this.btnadd.Location = new System.Drawing.Point(439, 12);
|
||||
this.btnadd.Name = "btnadd";
|
||||
this.btnadd.Size = new System.Drawing.Size(68, 22);
|
||||
this.btnadd.Size = new System.Drawing.Size(85, 22);
|
||||
this.btnadd.StyleController = this.layoutControl1;
|
||||
this.btnadd.TabIndex = 7;
|
||||
this.btnadd.Text = "增加";
|
||||
this.btnadd.Click += new System.EventHandler(this.btnadd_Click);
|
||||
//
|
||||
// txtoperator
|
||||
//
|
||||
this.txtoperator.EditValue = "等于-=";
|
||||
this.txtoperator.Location = new System.Drawing.Point(136, 12);
|
||||
this.txtoperator.Name = "txtoperator";
|
||||
this.txtoperator.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
|
||||
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
|
||||
this.txtoperator.Properties.Items.AddRange(new object[] {
|
||||
"等于-=",
|
||||
"大于->",
|
||||
"小于-<",
|
||||
"包含-like"});
|
||||
this.txtoperator.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
|
||||
this.txtoperator.Size = new System.Drawing.Size(67, 20);
|
||||
this.txtoperator.StyleController = this.layoutControl1;
|
||||
this.txtoperator.TabIndex = 5;
|
||||
//
|
||||
// txtField
|
||||
//
|
||||
this.txtField.Location = new System.Drawing.Point(41, 12);
|
||||
|
|
@ -113,7 +168,7 @@ namespace WinformGeneralDeveloperFrame
|
|||
this.txtField.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
|
||||
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
|
||||
this.txtField.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
|
||||
this.txtField.Size = new System.Drawing.Size(140, 20);
|
||||
this.txtField.Size = new System.Drawing.Size(91, 20);
|
||||
this.txtField.StyleController = this.layoutControl1;
|
||||
this.txtField.TabIndex = 4;
|
||||
//
|
||||
|
|
@ -129,10 +184,9 @@ namespace WinformGeneralDeveloperFrame
|
|||
this.layoutControlItem6,
|
||||
this.layoutControlItem3,
|
||||
this.layoutControlItem7,
|
||||
this.layoutControlItem8,
|
||||
this.layoutControlItem9});
|
||||
this.layoutControlItem8});
|
||||
this.Root.Name = "Root";
|
||||
this.Root.Size = new System.Drawing.Size(737, 430);
|
||||
this.Root.Size = new System.Drawing.Size(536, 299);
|
||||
this.Root.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem1
|
||||
|
|
@ -140,18 +194,27 @@ namespace WinformGeneralDeveloperFrame
|
|||
this.layoutControlItem1.Control = this.txtField;
|
||||
this.layoutControlItem1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlItem1.Name = "layoutControlItem1";
|
||||
this.layoutControlItem1.Size = new System.Drawing.Size(173, 26);
|
||||
this.layoutControlItem1.Size = new System.Drawing.Size(124, 26);
|
||||
this.layoutControlItem1.Text = "字段";
|
||||
this.layoutControlItem1.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.AutoSize;
|
||||
this.layoutControlItem1.TextSize = new System.Drawing.Size(24, 14);
|
||||
this.layoutControlItem1.TextToControlDistance = 5;
|
||||
//
|
||||
// layoutControlItem2
|
||||
//
|
||||
this.layoutControlItem2.Control = this.txtoperator;
|
||||
this.layoutControlItem2.Location = new System.Drawing.Point(124, 0);
|
||||
this.layoutControlItem2.Name = "layoutControlItem2";
|
||||
this.layoutControlItem2.Size = new System.Drawing.Size(71, 26);
|
||||
this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem2.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem4
|
||||
//
|
||||
this.layoutControlItem4.Control = this.btnadd;
|
||||
this.layoutControlItem4.Location = new System.Drawing.Point(645, 0);
|
||||
this.layoutControlItem4.Location = new System.Drawing.Point(427, 0);
|
||||
this.layoutControlItem4.Name = "layoutControlItem4";
|
||||
this.layoutControlItem4.Size = new System.Drawing.Size(72, 26);
|
||||
this.layoutControlItem4.Size = new System.Drawing.Size(89, 26);
|
||||
this.layoutControlItem4.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem4.TextVisible = false;
|
||||
//
|
||||
|
|
@ -160,164 +223,74 @@ namespace WinformGeneralDeveloperFrame
|
|||
this.layoutControlItem5.Control = this.txtSql;
|
||||
this.layoutControlItem5.Location = new System.Drawing.Point(0, 26);
|
||||
this.layoutControlItem5.Name = "layoutControlItem5";
|
||||
this.layoutControlItem5.Size = new System.Drawing.Size(717, 358);
|
||||
this.layoutControlItem5.Size = new System.Drawing.Size(516, 227);
|
||||
this.layoutControlItem5.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem5.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem2
|
||||
//
|
||||
this.layoutControlItem2.Control = this.txtoperator;
|
||||
this.layoutControlItem2.Location = new System.Drawing.Point(173, 0);
|
||||
this.layoutControlItem2.Name = "layoutControlItem2";
|
||||
this.layoutControlItem2.Size = new System.Drawing.Size(99, 26);
|
||||
this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem2.TextVisible = false;
|
||||
//
|
||||
// txtoperator
|
||||
//
|
||||
this.txtoperator.EditValue = "等于-=";
|
||||
this.txtoperator.Location = new System.Drawing.Point(185, 12);
|
||||
this.txtoperator.Name = "txtoperator";
|
||||
this.txtoperator.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
|
||||
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
|
||||
this.txtoperator.Properties.Items.AddRange(new object[] {
|
||||
"等于-=",
|
||||
"大于->",
|
||||
"小于-<",
|
||||
"包含-like"});
|
||||
this.txtoperator.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
|
||||
this.txtoperator.Size = new System.Drawing.Size(95, 20);
|
||||
this.txtoperator.StyleController = this.layoutControl1;
|
||||
this.txtoperator.TabIndex = 5;
|
||||
//
|
||||
// txtrelation
|
||||
//
|
||||
this.txtrelation.EditValue = "与-and";
|
||||
this.txtrelation.Location = new System.Drawing.Point(486, 12);
|
||||
this.txtrelation.Name = "txtrelation";
|
||||
this.txtrelation.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
|
||||
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
|
||||
this.txtrelation.Properties.Items.AddRange(new object[] {
|
||||
"与-and",
|
||||
"或-or"});
|
||||
this.txtrelation.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
|
||||
this.txtrelation.Size = new System.Drawing.Size(116, 20);
|
||||
this.txtrelation.StyleController = this.layoutControl1;
|
||||
this.txtrelation.TabIndex = 10;
|
||||
//
|
||||
// layoutControlItem6
|
||||
//
|
||||
this.layoutControlItem6.Control = this.txtrelation;
|
||||
this.layoutControlItem6.Location = new System.Drawing.Point(433, 0);
|
||||
this.layoutControlItem6.Location = new System.Drawing.Point(311, 0);
|
||||
this.layoutControlItem6.Name = "layoutControlItem6";
|
||||
this.layoutControlItem6.Size = new System.Drawing.Size(161, 26);
|
||||
this.layoutControlItem6.Size = new System.Drawing.Size(116, 26);
|
||||
this.layoutControlItem6.Text = "关系符";
|
||||
this.layoutControlItem6.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.AutoSize;
|
||||
this.layoutControlItem6.TextSize = new System.Drawing.Size(36, 14);
|
||||
this.layoutControlItem6.TextToControlDistance = 5;
|
||||
//
|
||||
// txtvalue
|
||||
//
|
||||
this.txtvalue.Location = new System.Drawing.Point(299, 12);
|
||||
this.txtvalue.Name = "txtvalue";
|
||||
this.txtvalue.Size = new System.Drawing.Size(142, 20);
|
||||
this.txtvalue.StyleController = this.layoutControl1;
|
||||
this.txtvalue.TabIndex = 11;
|
||||
//
|
||||
// layoutControlItem3
|
||||
//
|
||||
this.layoutControlItem3.Control = this.txtvalue;
|
||||
this.layoutControlItem3.Location = new System.Drawing.Point(272, 0);
|
||||
this.layoutControlItem3.Location = new System.Drawing.Point(195, 0);
|
||||
this.layoutControlItem3.Name = "layoutControlItem3";
|
||||
this.layoutControlItem3.Size = new System.Drawing.Size(161, 26);
|
||||
this.layoutControlItem3.Size = new System.Drawing.Size(116, 26);
|
||||
this.layoutControlItem3.Text = "值";
|
||||
this.layoutControlItem3.TextSize = new System.Drawing.Size(12, 14);
|
||||
//
|
||||
// btnok
|
||||
//
|
||||
this.btnok.Location = new System.Drawing.Point(12, 396);
|
||||
this.btnok.Name = "btnok";
|
||||
this.btnok.Size = new System.Drawing.Size(354, 22);
|
||||
this.btnok.StyleController = this.layoutControl1;
|
||||
this.btnok.TabIndex = 12;
|
||||
this.btnok.Text = "确定";
|
||||
this.btnok.Click += new System.EventHandler(this.btnok_Click);
|
||||
//
|
||||
// layoutControlItem7
|
||||
//
|
||||
this.layoutControlItem7.Control = this.btnok;
|
||||
this.layoutControlItem7.Location = new System.Drawing.Point(0, 384);
|
||||
this.layoutControlItem7.Location = new System.Drawing.Point(0, 253);
|
||||
this.layoutControlItem7.Name = "layoutControlItem7";
|
||||
this.layoutControlItem7.Size = new System.Drawing.Size(358, 26);
|
||||
this.layoutControlItem7.Size = new System.Drawing.Size(258, 26);
|
||||
this.layoutControlItem7.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem7.TextVisible = false;
|
||||
//
|
||||
// btncanel
|
||||
//
|
||||
this.btncanel.Location = new System.Drawing.Point(370, 396);
|
||||
this.btncanel.Name = "btncanel";
|
||||
this.btncanel.Size = new System.Drawing.Size(355, 22);
|
||||
this.btncanel.StyleController = this.layoutControl1;
|
||||
this.btncanel.TabIndex = 13;
|
||||
this.btncanel.Text = "取消";
|
||||
this.btncanel.Click += new System.EventHandler(this.btncanel_Click);
|
||||
//
|
||||
// layoutControlItem8
|
||||
//
|
||||
this.layoutControlItem8.Control = this.btncanel;
|
||||
this.layoutControlItem8.Location = new System.Drawing.Point(358, 384);
|
||||
this.layoutControlItem8.Location = new System.Drawing.Point(258, 253);
|
||||
this.layoutControlItem8.Name = "layoutControlItem8";
|
||||
this.layoutControlItem8.Size = new System.Drawing.Size(359, 26);
|
||||
this.layoutControlItem8.Size = new System.Drawing.Size(258, 26);
|
||||
this.layoutControlItem8.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem8.TextVisible = false;
|
||||
//
|
||||
// txtsort
|
||||
//
|
||||
this.txtsort.Location = new System.Drawing.Point(606, 12);
|
||||
this.txtsort.Name = "txtsort";
|
||||
this.txtsort.Properties.Caption = "排序";
|
||||
this.txtsort.Size = new System.Drawing.Size(47, 19);
|
||||
this.txtsort.StyleController = this.layoutControl1;
|
||||
this.txtsort.TabIndex = 14;
|
||||
//
|
||||
// layoutControlItem9
|
||||
//
|
||||
this.layoutControlItem9.Control = this.txtsort;
|
||||
this.layoutControlItem9.Location = new System.Drawing.Point(594, 0);
|
||||
this.layoutControlItem9.Name = "layoutControlItem9";
|
||||
this.layoutControlItem9.Size = new System.Drawing.Size(51, 26);
|
||||
this.layoutControlItem9.Text = "排序";
|
||||
this.layoutControlItem9.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem9.TextVisible = false;
|
||||
//
|
||||
// FrmSearch
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(737, 430);
|
||||
this.ClientSize = new System.Drawing.Size(536, 299);
|
||||
this.Controls.Add(this.layoutControl1);
|
||||
this.Name = "FrmSearch";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "FrmSearch";
|
||||
this.Text = "搜索";
|
||||
this.Load += new System.EventHandler(this.FrmSearch_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
|
||||
this.layoutControl1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.txtvalue.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.txtrelation.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.txtSql.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.txtoperator.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.txtField.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.txtoperator.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.txtrelation.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.txtvalue.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.txtsort.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
|
@ -342,7 +315,5 @@ namespace WinformGeneralDeveloperFrame
|
|||
private DevExpress.XtraEditors.SimpleButton btnok;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8;
|
||||
private DevExpress.XtraEditors.CheckEdit txtsort;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9;
|
||||
}
|
||||
}
|
||||
|
|
@ -434,7 +434,7 @@ namespace MES.Form
|
|||
this.ClientSize = new System.Drawing.Size(1300, 800);
|
||||
this.Controls.Add(this.xtraTabControl1);
|
||||
this.Name = "FrmsysDataBase";
|
||||
this.Text = "数据源";
|
||||
this.Text = "数据源维护";
|
||||
this.Load += new System.EventHandler(this.FrmsysDataBase_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).EndInit();
|
||||
this.xtraTabControl1.ResumeLayout(false);
|
||||
|
|
|
|||
|
|
@ -116,10 +116,10 @@ namespace MES.Form
|
|||
// xtraTabControl1
|
||||
//
|
||||
this.xtraTabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.xtraTabControl1.Location = new System.Drawing.Point(0, 34);
|
||||
this.xtraTabControl1.Location = new System.Drawing.Point(0, 0);
|
||||
this.xtraTabControl1.Name = "xtraTabControl1";
|
||||
this.xtraTabControl1.SelectedTabPage = this.tabDataList;
|
||||
this.xtraTabControl1.Size = new System.Drawing.Size(1300, 766);
|
||||
this.xtraTabControl1.Size = new System.Drawing.Size(1300, 800);
|
||||
this.xtraTabControl1.TabIndex = 1;
|
||||
this.xtraTabControl1.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] {
|
||||
this.tabDataList,
|
||||
|
|
@ -129,7 +129,7 @@ namespace MES.Form
|
|||
//
|
||||
this.tabDataList.Controls.Add(this.grdList);
|
||||
this.tabDataList.Name = "tabDataList";
|
||||
this.tabDataList.Size = new System.Drawing.Size(1294, 737);
|
||||
this.tabDataList.Size = new System.Drawing.Size(1294, 771);
|
||||
this.tabDataList.Text = "数据列表";
|
||||
//
|
||||
// grdList
|
||||
|
|
@ -138,7 +138,7 @@ namespace MES.Form
|
|||
this.grdList.Location = new System.Drawing.Point(0, 0);
|
||||
this.grdList.MainView = this.grdListView;
|
||||
this.grdList.Name = "grdList";
|
||||
this.grdList.Size = new System.Drawing.Size(1294, 737);
|
||||
this.grdList.Size = new System.Drawing.Size(1294, 771);
|
||||
this.grdList.TabIndex = 0;
|
||||
this.grdList.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
|
||||
this.grdListView});
|
||||
|
|
@ -355,9 +355,8 @@ namespace MES.Form
|
|||
this.ClientSize = new System.Drawing.Size(1300, 800);
|
||||
this.Controls.Add(this.xtraTabControl1);
|
||||
this.Name = "FrmsysDataTable";
|
||||
this.Text = "数据集";
|
||||
this.Text = "数据集维护";
|
||||
this.Load += new System.EventHandler(this.FrmsysDataTable_Load);
|
||||
this.Controls.SetChildIndex(this.xtraTabControl1, 0);
|
||||
((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).EndInit();
|
||||
this.xtraTabControl1.ResumeLayout(false);
|
||||
this.tabDataList.ResumeLayout(false);
|
||||
|
|
|
|||
|
|
@ -40,6 +40,8 @@ namespace WinformGeneralDeveloperFrame
|
|||
this.barListItem1 = new DevExpress.XtraBars.BarListItem();
|
||||
this.barUserName = new DevExpress.XtraBars.BarStaticItem();
|
||||
this.barStaticItem3 = new DevExpress.XtraBars.BarStaticItem();
|
||||
this.btnabout = new DevExpress.XtraBars.BarButtonItem();
|
||||
this.barButtonItem1 = new DevExpress.XtraBars.BarButtonItem();
|
||||
this.ribbonPage1 = new DevExpress.XtraBars.Ribbon.RibbonPage();
|
||||
this.ribbonPageGroup1 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
|
||||
this.ribbonStatusBar1 = new DevExpress.XtraBars.Ribbon.RibbonStatusBar();
|
||||
|
|
@ -48,6 +50,7 @@ namespace WinformGeneralDeveloperFrame
|
|||
this.timer1 = new System.Windows.Forms.Timer(this.components);
|
||||
this.bsi_UserName = new DevExpress.XtraBars.BarStaticItem();
|
||||
this.barStaticItem1 = new DevExpress.XtraBars.BarStaticItem();
|
||||
this.barButtonItem2 = new DevExpress.XtraBars.BarButtonItem();
|
||||
((System.ComponentModel.ISupportInitialize)(this.ribbonControl1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.repositoryItemTimeEdit1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xtraTabbedMdiManager1)).BeginInit();
|
||||
|
|
@ -66,9 +69,12 @@ namespace WinformGeneralDeveloperFrame
|
|||
this.bsi_Date,
|
||||
this.barListItem1,
|
||||
this.barUserName,
|
||||
this.barStaticItem3});
|
||||
this.barStaticItem3,
|
||||
this.btnabout,
|
||||
this.barButtonItem1,
|
||||
this.barButtonItem2});
|
||||
this.ribbonControl1.Location = new System.Drawing.Point(0, 0);
|
||||
this.ribbonControl1.MaxItemId = 8;
|
||||
this.ribbonControl1.MaxItemId = 11;
|
||||
this.ribbonControl1.Name = "ribbonControl1";
|
||||
this.ribbonControl1.Pages.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPage[] {
|
||||
this.ribbonPage1});
|
||||
|
|
@ -138,17 +144,35 @@ namespace WinformGeneralDeveloperFrame
|
|||
this.barStaticItem3.Id = 7;
|
||||
this.barStaticItem3.Name = "barStaticItem3";
|
||||
//
|
||||
// btnabout
|
||||
//
|
||||
this.btnabout.Caption = "关于";
|
||||
this.btnabout.Id = 8;
|
||||
this.btnabout.ImageOptions.Image = global::WinformGeneralDeveloperFrame.Properties.Resources.operatingsystem_16x16;
|
||||
this.btnabout.ImageOptions.LargeImage = global::WinformGeneralDeveloperFrame.Properties.Resources.operatingsystem_32x32;
|
||||
this.btnabout.Name = "btnabout";
|
||||
this.btnabout.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonItemStyles.Large;
|
||||
//
|
||||
// barButtonItem1
|
||||
//
|
||||
this.barButtonItem1.Caption = "bug反馈 ";
|
||||
this.barButtonItem1.Id = 9;
|
||||
this.barButtonItem1.ImageOptions.Image = global::WinformGeneralDeveloperFrame.Properties.Resources.mail_16x16;
|
||||
this.barButtonItem1.ImageOptions.LargeImage = global::WinformGeneralDeveloperFrame.Properties.Resources.mail_32x32;
|
||||
this.barButtonItem1.Name = "barButtonItem1";
|
||||
//
|
||||
// ribbonPage1
|
||||
//
|
||||
this.ribbonPage1.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] {
|
||||
this.ribbonPageGroup1});
|
||||
this.ribbonPage1.Name = "ribbonPage1";
|
||||
this.ribbonPage1.Text = "ribbonPage1";
|
||||
this.ribbonPage1.Text = "帮助";
|
||||
//
|
||||
// ribbonPageGroup1
|
||||
//
|
||||
this.ribbonPageGroup1.ItemLinks.Add(this.barButtonItem1);
|
||||
this.ribbonPageGroup1.ItemLinks.Add(this.btnabout);
|
||||
this.ribbonPageGroup1.Name = "ribbonPageGroup1";
|
||||
this.ribbonPageGroup1.Text = "ribbonPageGroup1";
|
||||
//
|
||||
// ribbonStatusBar1
|
||||
//
|
||||
|
|
@ -198,6 +222,12 @@ namespace WinformGeneralDeveloperFrame
|
|||
this.barStaticItem1.Name = "barStaticItem1";
|
||||
this.barStaticItem1.PaintStyle = DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph;
|
||||
//
|
||||
// barButtonItem2
|
||||
//
|
||||
this.barButtonItem2.Caption = "barButtonItem2";
|
||||
this.barButtonItem2.Id = 10;
|
||||
this.barButtonItem2.Name = "barButtonItem2";
|
||||
//
|
||||
// MainForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
|
||||
|
|
@ -211,7 +241,7 @@ namespace WinformGeneralDeveloperFrame
|
|||
this.Ribbon = this.ribbonControl1;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.StatusBar = this.ribbonStatusBar1;
|
||||
this.Text = "Form1";
|
||||
this.Text = "主界面";
|
||||
this.Load += new System.EventHandler(this.MainForm_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.ribbonControl1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.repositoryItemTimeEdit1)).EndInit();
|
||||
|
|
@ -241,6 +271,9 @@ namespace WinformGeneralDeveloperFrame
|
|||
private DevExpress.XtraBars.BarStaticItem barStaticItem3;
|
||||
private DevExpress.XtraBars.BarStaticItem bsi_UserName;
|
||||
private DevExpress.XtraBars.BarStaticItem barStaticItem1;
|
||||
private DevExpress.XtraBars.BarButtonItem btnabout;
|
||||
private DevExpress.XtraBars.BarButtonItem barButtonItem1;
|
||||
private DevExpress.XtraBars.BarButtonItem barButtonItem2;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -220,6 +220,46 @@ namespace WinformGeneralDeveloperFrame.Properties {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap mail_16x16 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("mail_16x16", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap mail_32x32 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("mail_32x32", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap operatingsystem_16x16 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("operatingsystem_16x16", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap operatingsystem_32x32 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("operatingsystem_32x32", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -142,6 +142,9 @@
|
|||
<data name="bosaleitem_32x32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\bosaleitem_32x32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="operatingsystem_32x32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\operatingsystem_32x32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="bosaleitem_32x321" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\bosaleitem_32x321.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
|
|
@ -157,17 +160,26 @@
|
|||
<data name="database_32x321" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\database_32x321.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="boscheduler_32x32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\boscheduler_32x32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="bocustomer_16x16" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\bocustomer_16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="team_32x32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\team_32x32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="folderpanel_32x32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\folderpanel_32x32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="build_32x32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\build_32x32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="boscheduler_32x32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\boscheduler_32x32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="mail_32x32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\mail_32x32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="operatingsystem_16x16" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\operatingsystem_16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="boreport_32x32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\boreport_32x32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
|
|
@ -178,7 +190,7 @@
|
|||
<data name="bocustomer_32x321" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\bocustomer_32x321.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="team_32x32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\team_32x32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="mail_16x16" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\mail_16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 706 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 975 B |
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
|
|
@ -74,7 +74,7 @@ namespace ${NameSpace}.Form
|
|||
{
|
||||
#foreach($info in $EntityList)
|
||||
#if(${info.isSearch})
|
||||
fieldDictionary.Add("${info.controlLabelName}","${info.dataBaseFieldName");
|
||||
fieldDictionary.Add("${info.controlLabelName}","${info.dataBaseFieldName}");
|
||||
#end
|
||||
#end
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,85 @@
|
|||
|
||||
namespace WinformGeneralDeveloperFrame
|
||||
{
|
||||
partial class Test
|
||||
{
|
||||
/// <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.memoEdit1 = new DevExpress.XtraEditors.MemoEdit();
|
||||
this.simpleButton1 = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.simpleButton2 = new DevExpress.XtraEditors.SimpleButton();
|
||||
((System.ComponentModel.ISupportInitialize)(this.memoEdit1.Properties)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// memoEdit1
|
||||
//
|
||||
this.memoEdit1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.memoEdit1.Location = new System.Drawing.Point(0, 0);
|
||||
this.memoEdit1.Name = "memoEdit1";
|
||||
this.memoEdit1.Size = new System.Drawing.Size(865, 298);
|
||||
this.memoEdit1.TabIndex = 0;
|
||||
//
|
||||
// simpleButton1
|
||||
//
|
||||
this.simpleButton1.Location = new System.Drawing.Point(203, 304);
|
||||
this.simpleButton1.Name = "simpleButton1";
|
||||
this.simpleButton1.Size = new System.Drawing.Size(139, 48);
|
||||
this.simpleButton1.TabIndex = 1;
|
||||
this.simpleButton1.Text = "转化";
|
||||
this.simpleButton1.Click += new System.EventHandler(this.simpleButton1_Click);
|
||||
//
|
||||
// simpleButton2
|
||||
//
|
||||
this.simpleButton2.Location = new System.Drawing.Point(383, 304);
|
||||
this.simpleButton2.Name = "simpleButton2";
|
||||
this.simpleButton2.Size = new System.Drawing.Size(127, 48);
|
||||
this.simpleButton2.TabIndex = 2;
|
||||
this.simpleButton2.Text = "采集数据";
|
||||
this.simpleButton2.Click += new System.EventHandler(this.simpleButton2_Click);
|
||||
//
|
||||
// Test
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(865, 489);
|
||||
this.Controls.Add(this.simpleButton2);
|
||||
this.Controls.Add(this.simpleButton1);
|
||||
this.Controls.Add(this.memoEdit1);
|
||||
this.Name = "Test";
|
||||
this.Text = "Test";
|
||||
((System.ComponentModel.ISupportInitialize)(this.memoEdit1.Properties)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private DevExpress.XtraEditors.MemoEdit memoEdit1;
|
||||
private DevExpress.XtraEditors.SimpleButton simpleButton1;
|
||||
private DevExpress.XtraEditors.SimpleButton simpleButton2;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,769 @@
|
|||
using DevExpress.XtraEditors;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Data.Entity.Migrations;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using DevExpress.Data.Helpers;
|
||||
using MES;
|
||||
using MES.Entity;
|
||||
using WinformGeneralDeveloperFrame.Commons;
|
||||
|
||||
namespace WinformGeneralDeveloperFrame
|
||||
{
|
||||
public partial class Test : DevExpress.XtraEditors.XtraForm
|
||||
{
|
||||
private bool flag = false;
|
||||
public Test()
|
||||
{
|
||||
InitializeComponent();
|
||||
GetData();
|
||||
}
|
||||
|
||||
private void simpleButton1_Click(object sender, EventArgs e)
|
||||
{
|
||||
var data = memoEdit1.Text.Split(")".ToCharArray());
|
||||
List<stockInfo> list = new List<stockInfo>();
|
||||
foreach (var item in data)
|
||||
{
|
||||
var dd = item.Split("(".ToCharArray());
|
||||
if(dd.Length!=2)continue;
|
||||
stockInfo info = new stockInfo() { name = dd[0].Replace("\"",""), code = "sz" + dd[1] };
|
||||
list.Add(info);
|
||||
}
|
||||
using (var db = new MESDB())
|
||||
{
|
||||
db.stockInfo.AddRange(list);
|
||||
db.SaveChanges();
|
||||
}
|
||||
}
|
||||
|
||||
private void GetData()
|
||||
{
|
||||
Task.Factory.StartNew(() =>
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
if (flag)
|
||||
{
|
||||
var t1 = Task.Factory.StartNew(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
string url = "http://hq.sinajs.cn/list={0}";
|
||||
var list = new MESDB().stockInfo.ToList().Skip(0).Take(200);
|
||||
string code = "";
|
||||
foreach (var stockInfo in list)
|
||||
{
|
||||
code += stockInfo.code + ",";
|
||||
}
|
||||
url = string.Format(url, code);
|
||||
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
|
||||
request.Method = "GET";
|
||||
request.ContentType = "text/html;charset=UTF-8";
|
||||
request.UserAgent = null;
|
||||
request.Timeout = 6000;
|
||||
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
|
||||
Stream myResponseStream = response.GetResponseStream();
|
||||
StreamReader myStreamReader = new StreamReader(myResponseStream, System.Text.Encoding.Default);
|
||||
string retString = myStreamReader.ReadToEnd();
|
||||
string[] ResData = retString.Split(';');
|
||||
List<stockInfo> list1 = new List<stockInfo>();
|
||||
foreach (var item in ResData)
|
||||
{
|
||||
var data = item.Split('=');
|
||||
if (data.Length == 2)
|
||||
{
|
||||
var dd = data[1].Split(',');
|
||||
if (dd.Length >= 33)
|
||||
{
|
||||
stockInfo info = new stockInfo()
|
||||
{
|
||||
code = data[0].Split('_')[2],
|
||||
name = dd[0].Replace("\"", ""),
|
||||
startPrice = decimal.Parse(dd[1]),
|
||||
olePrice = decimal.Parse(dd[2]),
|
||||
nowPrice = decimal.Parse(dd[3]),
|
||||
maxPrice = decimal.Parse(dd[4]),
|
||||
minPrice = decimal.Parse(dd[5]),
|
||||
bidderPrice = decimal.Parse(dd[6]),
|
||||
auctionPrice = decimal.Parse(dd[7]),
|
||||
turnover = int.Parse(dd[8]),
|
||||
turnoverPrice = decimal.Parse(dd[9]),
|
||||
buyOneNum = int.Parse(dd[10]),
|
||||
buyOnePrice = decimal.Parse(dd[11]),
|
||||
buyTwoNum = int.Parse(dd[12]),
|
||||
buyTwoPrice = decimal.Parse(dd[13]),
|
||||
buyThreeNum = int.Parse(dd[14]),
|
||||
buyThreePrice = decimal.Parse(dd[15]),
|
||||
buyFourNum = int.Parse(dd[16]),
|
||||
buyFourPrice = decimal.Parse(dd[17]),
|
||||
buyFiveNum = int.Parse(dd[18]),
|
||||
buyFivePrice = decimal.Parse(dd[19]),
|
||||
sellOneNum = int.Parse(dd[20]),
|
||||
sellOnePrice = decimal.Parse(dd[21]),
|
||||
sellTwoNum = int.Parse(dd[22]),
|
||||
sellTwoPrice = decimal.Parse(dd[23]),
|
||||
sellThreeNum = int.Parse(dd[24]),
|
||||
sellThreePrice = decimal.Parse(dd[25]),
|
||||
sellFourNum = int.Parse(dd[26]),
|
||||
sellFourPrice = decimal.Parse(dd[27]),
|
||||
sellFiveNum = int.Parse(dd[28]),
|
||||
sellFivePrice = decimal.Parse(dd[29]),
|
||||
timeStr = DateTime.Parse(dd[30] + " " + dd[31])
|
||||
};
|
||||
list1.Add(info);
|
||||
}
|
||||
}
|
||||
}
|
||||
using (var db = new MESDB())
|
||||
{
|
||||
foreach (var info in list1)
|
||||
{
|
||||
db.stockInfo.AddOrUpdate(info);
|
||||
}
|
||||
db.SaveChanges();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ex.Message.ShowError();
|
||||
}
|
||||
});
|
||||
//var t2 = Task.Factory.StartNew(() =>
|
||||
//{
|
||||
// try
|
||||
// {
|
||||
// string url = "http://hq.sinajs.cn/list={0}";
|
||||
// var list = new MESDB().stockInfo.ToList().Skip(500).Take(500);
|
||||
// string code = "";
|
||||
// foreach (var stockInfo in list)
|
||||
// {
|
||||
// code += stockInfo.code + ",";
|
||||
// }
|
||||
// url = string.Format(url, code);
|
||||
// HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
|
||||
// request.Method = "GET";
|
||||
// request.ContentType = "text/html;charset=UTF-8";
|
||||
// request.UserAgent = null;
|
||||
// request.Timeout = 6000;
|
||||
// HttpWebResponse response = (HttpWebResponse)request.GetResponse();
|
||||
// Stream myResponseStream = response.GetResponseStream();
|
||||
// StreamReader myStreamReader = new StreamReader(myResponseStream, System.Text.Encoding.Default);
|
||||
// string retString = myStreamReader.ReadToEnd();
|
||||
// string[] ResData = retString.Split(';');
|
||||
// List<stockInfo> list1 = new List<stockInfo>();
|
||||
// foreach (var item in ResData)
|
||||
// {
|
||||
// var data = item.Split('=');
|
||||
// if (data.Length == 2)
|
||||
// {
|
||||
// var dd = data[1].Split(',');
|
||||
// if (dd.Length >= 33)
|
||||
// {
|
||||
// stockInfo info = new stockInfo()
|
||||
// {
|
||||
// code = data[0].Split('_')[2],
|
||||
// name = dd[0].Replace("\"", ""),
|
||||
// startPrice = decimal.Parse(dd[1]),
|
||||
// olePrice = decimal.Parse(dd[2]),
|
||||
// nowPrice = decimal.Parse(dd[3]),
|
||||
// maxPrice = decimal.Parse(dd[4]),
|
||||
// minPrice = decimal.Parse(dd[5]),
|
||||
// bidderPrice = decimal.Parse(dd[6]),
|
||||
// auctionPrice = decimal.Parse(dd[7]),
|
||||
// turnover = int.Parse(dd[8]),
|
||||
// turnoverPrice = decimal.Parse(dd[9]),
|
||||
// buyOneNum = int.Parse(dd[10]),
|
||||
// buyOnePrice = decimal.Parse(dd[11]),
|
||||
// buyTwoNum = int.Parse(dd[12]),
|
||||
// buyTwoPrice = decimal.Parse(dd[13]),
|
||||
// buyThreeNum = int.Parse(dd[14]),
|
||||
// buyThreePrice = decimal.Parse(dd[15]),
|
||||
// buyFourNum = int.Parse(dd[16]),
|
||||
// buyFourPrice = decimal.Parse(dd[17]),
|
||||
// buyFiveNum = int.Parse(dd[18]),
|
||||
// buyFivePrice = decimal.Parse(dd[19]),
|
||||
// sellOneNum = int.Parse(dd[20]),
|
||||
// sellOnePrice = decimal.Parse(dd[21]),
|
||||
// sellTwoNum = int.Parse(dd[22]),
|
||||
// sellTwoPrice = decimal.Parse(dd[23]),
|
||||
// sellThreeNum = int.Parse(dd[24]),
|
||||
// sellThreePrice = decimal.Parse(dd[25]),
|
||||
// sellFourNum = int.Parse(dd[26]),
|
||||
// sellFourPrice = decimal.Parse(dd[27]),
|
||||
// sellFiveNum = int.Parse(dd[28]),
|
||||
// sellFivePrice = decimal.Parse(dd[29]),
|
||||
// timeStr = DateTime.Parse(dd[30] + " " + dd[31])
|
||||
// };
|
||||
// list1.Add(info);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// using (var db = new MESDB())
|
||||
// {
|
||||
// foreach (var info in list1)
|
||||
// {
|
||||
// db.stockInfo.AddOrUpdate(info);
|
||||
// }
|
||||
// db.SaveChanges();
|
||||
// }
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// ex.Message.ShowError();
|
||||
// }
|
||||
//});
|
||||
//var t3 = Task.Factory.StartNew(() =>
|
||||
//{
|
||||
// try
|
||||
// {
|
||||
// string url = "http://hq.sinajs.cn/list={0}";
|
||||
// var list = new MESDB().stockInfo.ToList().Skip(1000).Take(500);
|
||||
// string code = "";
|
||||
// foreach (var stockInfo in list)
|
||||
// {
|
||||
// code += stockInfo.code + ",";
|
||||
// }
|
||||
// url = string.Format(url, code);
|
||||
// HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
|
||||
// request.Method = "GET";
|
||||
// request.ContentType = "text/html;charset=UTF-8";
|
||||
// request.UserAgent = null;
|
||||
// request.Timeout = 6000;
|
||||
// HttpWebResponse response = (HttpWebResponse)request.GetResponse();
|
||||
// Stream myResponseStream = response.GetResponseStream();
|
||||
// StreamReader myStreamReader = new StreamReader(myResponseStream, System.Text.Encoding.Default);
|
||||
// string retString = myStreamReader.ReadToEnd();
|
||||
// string[] ResData = retString.Split(';');
|
||||
// List<stockInfo> list1 = new List<stockInfo>();
|
||||
// foreach (var item in ResData)
|
||||
// {
|
||||
// var data = item.Split('=');
|
||||
// if (data.Length == 2)
|
||||
// {
|
||||
// var dd = data[1].Split(',');
|
||||
// if (dd.Length >= 33)
|
||||
// {
|
||||
// stockInfo info = new stockInfo()
|
||||
// {
|
||||
// code = data[0].Split('_')[2],
|
||||
// name = dd[0].Replace("\"", ""),
|
||||
// startPrice = decimal.Parse(dd[1]),
|
||||
// olePrice = decimal.Parse(dd[2]),
|
||||
// nowPrice = decimal.Parse(dd[3]),
|
||||
// maxPrice = decimal.Parse(dd[4]),
|
||||
// minPrice = decimal.Parse(dd[5]),
|
||||
// bidderPrice = decimal.Parse(dd[6]),
|
||||
// auctionPrice = decimal.Parse(dd[7]),
|
||||
// turnover = int.Parse(dd[8]),
|
||||
// turnoverPrice = decimal.Parse(dd[9]),
|
||||
// buyOneNum = int.Parse(dd[10]),
|
||||
// buyOnePrice = decimal.Parse(dd[11]),
|
||||
// buyTwoNum = int.Parse(dd[12]),
|
||||
// buyTwoPrice = decimal.Parse(dd[13]),
|
||||
// buyThreeNum = int.Parse(dd[14]),
|
||||
// buyThreePrice = decimal.Parse(dd[15]),
|
||||
// buyFourNum = int.Parse(dd[16]),
|
||||
// buyFourPrice = decimal.Parse(dd[17]),
|
||||
// buyFiveNum = int.Parse(dd[18]),
|
||||
// buyFivePrice = decimal.Parse(dd[19]),
|
||||
// sellOneNum = int.Parse(dd[20]),
|
||||
// sellOnePrice = decimal.Parse(dd[21]),
|
||||
// sellTwoNum = int.Parse(dd[22]),
|
||||
// sellTwoPrice = decimal.Parse(dd[23]),
|
||||
// sellThreeNum = int.Parse(dd[24]),
|
||||
// sellThreePrice = decimal.Parse(dd[25]),
|
||||
// sellFourNum = int.Parse(dd[26]),
|
||||
// sellFourPrice = decimal.Parse(dd[27]),
|
||||
// sellFiveNum = int.Parse(dd[28]),
|
||||
// sellFivePrice = decimal.Parse(dd[29]),
|
||||
// timeStr = DateTime.Parse(dd[30] + " " + dd[31])
|
||||
// };
|
||||
// list1.Add(info);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// using (var db = new MESDB())
|
||||
// {
|
||||
// foreach (var info in list1)
|
||||
// {
|
||||
// db.stockInfo.AddOrUpdate(info);
|
||||
// }
|
||||
// db.SaveChanges();
|
||||
// }
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// ex.Message.ShowError();
|
||||
// }
|
||||
//});
|
||||
//var t4 = Task.Factory.StartNew(() =>
|
||||
//{
|
||||
// try
|
||||
// {
|
||||
// string url = "http://hq.sinajs.cn/list={0}";
|
||||
// var list = new MESDB().stockInfo.ToList().Skip(1500).Take(500);
|
||||
// string code = "";
|
||||
// foreach (var stockInfo in list)
|
||||
// {
|
||||
// code += stockInfo.code + ",";
|
||||
// }
|
||||
// url = string.Format(url, code);
|
||||
// HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
|
||||
// request.Method = "GET";
|
||||
// request.ContentType = "text/html;charset=UTF-8";
|
||||
// request.UserAgent = null;
|
||||
// request.Timeout = 6000;
|
||||
// HttpWebResponse response = (HttpWebResponse)request.GetResponse();
|
||||
// Stream myResponseStream = response.GetResponseStream();
|
||||
// StreamReader myStreamReader = new StreamReader(myResponseStream, System.Text.Encoding.Default);
|
||||
// string retString = myStreamReader.ReadToEnd();
|
||||
// string[] ResData = retString.Split(';');
|
||||
// List<stockInfo> list1 = new List<stockInfo>();
|
||||
// foreach (var item in ResData)
|
||||
// {
|
||||
// var data = item.Split('=');
|
||||
// if (data.Length == 2)
|
||||
// {
|
||||
// var dd = data[1].Split(',');
|
||||
// if (dd.Length >= 33)
|
||||
// {
|
||||
// stockInfo info = new stockInfo()
|
||||
// {
|
||||
// code = data[0].Split('_')[2],
|
||||
// name = dd[0].Replace("\"", ""),
|
||||
// startPrice = decimal.Parse(dd[1]),
|
||||
// olePrice = decimal.Parse(dd[2]),
|
||||
// nowPrice = decimal.Parse(dd[3]),
|
||||
// maxPrice = decimal.Parse(dd[4]),
|
||||
// minPrice = decimal.Parse(dd[5]),
|
||||
// bidderPrice = decimal.Parse(dd[6]),
|
||||
// auctionPrice = decimal.Parse(dd[7]),
|
||||
// turnover = int.Parse(dd[8]),
|
||||
// turnoverPrice = decimal.Parse(dd[9]),
|
||||
// buyOneNum = int.Parse(dd[10]),
|
||||
// buyOnePrice = decimal.Parse(dd[11]),
|
||||
// buyTwoNum = int.Parse(dd[12]),
|
||||
// buyTwoPrice = decimal.Parse(dd[13]),
|
||||
// buyThreeNum = int.Parse(dd[14]),
|
||||
// buyThreePrice = decimal.Parse(dd[15]),
|
||||
// buyFourNum = int.Parse(dd[16]),
|
||||
// buyFourPrice = decimal.Parse(dd[17]),
|
||||
// buyFiveNum = int.Parse(dd[18]),
|
||||
// buyFivePrice = decimal.Parse(dd[19]),
|
||||
// sellOneNum = int.Parse(dd[20]),
|
||||
// sellOnePrice = decimal.Parse(dd[21]),
|
||||
// sellTwoNum = int.Parse(dd[22]),
|
||||
// sellTwoPrice = decimal.Parse(dd[23]),
|
||||
// sellThreeNum = int.Parse(dd[24]),
|
||||
// sellThreePrice = decimal.Parse(dd[25]),
|
||||
// sellFourNum = int.Parse(dd[26]),
|
||||
// sellFourPrice = decimal.Parse(dd[27]),
|
||||
// sellFiveNum = int.Parse(dd[28]),
|
||||
// sellFivePrice = decimal.Parse(dd[29]),
|
||||
// timeStr = DateTime.Parse(dd[30] + " " + dd[31])
|
||||
// };
|
||||
// list1.Add(info);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// using (var db = new MESDB())
|
||||
// {
|
||||
// foreach (var info in list1)
|
||||
// {
|
||||
// db.stockInfo.AddOrUpdate(info);
|
||||
// }
|
||||
// db.SaveChanges();
|
||||
// }
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// ex.Message.ShowError();
|
||||
// }
|
||||
//});
|
||||
//var t5 = Task.Factory.StartNew(() =>
|
||||
//{
|
||||
// try
|
||||
// {
|
||||
// string url = "http://hq.sinajs.cn/list={0}";
|
||||
// var list = new MESDB().stockInfo.ToList().Skip(2000).Take(500);
|
||||
// string code = "";
|
||||
// foreach (var stockInfo in list)
|
||||
// {
|
||||
// code += stockInfo.code + ",";
|
||||
// }
|
||||
// url = string.Format(url, code);
|
||||
// HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
|
||||
// request.Method = "GET";
|
||||
// request.ContentType = "text/html;charset=UTF-8";
|
||||
// request.UserAgent = null;
|
||||
// request.Timeout = 6000;
|
||||
// HttpWebResponse response = (HttpWebResponse)request.GetResponse();
|
||||
// Stream myResponseStream = response.GetResponseStream();
|
||||
// StreamReader myStreamReader = new StreamReader(myResponseStream, System.Text.Encoding.Default);
|
||||
// string retString = myStreamReader.ReadToEnd();
|
||||
// string[] ResData = retString.Split(';');
|
||||
// List<stockInfo> list1 = new List<stockInfo>();
|
||||
// foreach (var item in ResData)
|
||||
// {
|
||||
// var data = item.Split('=');
|
||||
// if (data.Length == 2)
|
||||
// {
|
||||
// var dd = data[1].Split(',');
|
||||
// if (dd.Length >= 33)
|
||||
// {
|
||||
// stockInfo info = new stockInfo()
|
||||
// {
|
||||
// code = data[0].Split('_')[2],
|
||||
// name = dd[0].Replace("\"", ""),
|
||||
// startPrice = decimal.Parse(dd[1]),
|
||||
// olePrice = decimal.Parse(dd[2]),
|
||||
// nowPrice = decimal.Parse(dd[3]),
|
||||
// maxPrice = decimal.Parse(dd[4]),
|
||||
// minPrice = decimal.Parse(dd[5]),
|
||||
// bidderPrice = decimal.Parse(dd[6]),
|
||||
// auctionPrice = decimal.Parse(dd[7]),
|
||||
// turnover = int.Parse(dd[8]),
|
||||
// turnoverPrice = decimal.Parse(dd[9]),
|
||||
// buyOneNum = int.Parse(dd[10]),
|
||||
// buyOnePrice = decimal.Parse(dd[11]),
|
||||
// buyTwoNum = int.Parse(dd[12]),
|
||||
// buyTwoPrice = decimal.Parse(dd[13]),
|
||||
// buyThreeNum = int.Parse(dd[14]),
|
||||
// buyThreePrice = decimal.Parse(dd[15]),
|
||||
// buyFourNum = int.Parse(dd[16]),
|
||||
// buyFourPrice = decimal.Parse(dd[17]),
|
||||
// buyFiveNum = int.Parse(dd[18]),
|
||||
// buyFivePrice = decimal.Parse(dd[19]),
|
||||
// sellOneNum = int.Parse(dd[20]),
|
||||
// sellOnePrice = decimal.Parse(dd[21]),
|
||||
// sellTwoNum = int.Parse(dd[22]),
|
||||
// sellTwoPrice = decimal.Parse(dd[23]),
|
||||
// sellThreeNum = int.Parse(dd[24]),
|
||||
// sellThreePrice = decimal.Parse(dd[25]),
|
||||
// sellFourNum = int.Parse(dd[26]),
|
||||
// sellFourPrice = decimal.Parse(dd[27]),
|
||||
// sellFiveNum = int.Parse(dd[28]),
|
||||
// sellFivePrice = decimal.Parse(dd[29]),
|
||||
// timeStr = DateTime.Parse(dd[30] + " " + dd[31])
|
||||
// };
|
||||
// list1.Add(info);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// using (var db = new MESDB())
|
||||
// {
|
||||
// foreach (var info in list1)
|
||||
// {
|
||||
// db.stockInfo.AddOrUpdate(info);
|
||||
// }
|
||||
// db.SaveChanges();
|
||||
// }
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// ex.Message.ShowError();
|
||||
// }
|
||||
//});
|
||||
//var t6 = Task.Factory.StartNew(() =>
|
||||
//{
|
||||
// try
|
||||
// {
|
||||
// string url = "http://hq.sinajs.cn/list={0}";
|
||||
// var list = new MESDB().stockInfo.ToList().Skip(2500).Take(500);
|
||||
// string code = "";
|
||||
// foreach (var stockInfo in list)
|
||||
// {
|
||||
// code += stockInfo.code + ",";
|
||||
// }
|
||||
// url = string.Format(url, code);
|
||||
// HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
|
||||
// request.Method = "GET";
|
||||
// request.ContentType = "text/html;charset=UTF-8";
|
||||
// request.UserAgent = null;
|
||||
// request.Timeout = 6000;
|
||||
// HttpWebResponse response = (HttpWebResponse)request.GetResponse();
|
||||
// Stream myResponseStream = response.GetResponseStream();
|
||||
// StreamReader myStreamReader = new StreamReader(myResponseStream, System.Text.Encoding.Default);
|
||||
// string retString = myStreamReader.ReadToEnd();
|
||||
// string[] ResData = retString.Split(';');
|
||||
// List<stockInfo> list1 = new List<stockInfo>();
|
||||
// foreach (var item in ResData)
|
||||
// {
|
||||
// var data = item.Split('=');
|
||||
// if (data.Length == 2)
|
||||
// {
|
||||
// var dd = data[1].Split(',');
|
||||
// if (dd.Length >= 33)
|
||||
// {
|
||||
// stockInfo info = new stockInfo()
|
||||
// {
|
||||
// code = data[0].Split('_')[2],
|
||||
// name = dd[0].Replace("\"", ""),
|
||||
// startPrice = decimal.Parse(dd[1]),
|
||||
// olePrice = decimal.Parse(dd[2]),
|
||||
// nowPrice = decimal.Parse(dd[3]),
|
||||
// maxPrice = decimal.Parse(dd[4]),
|
||||
// minPrice = decimal.Parse(dd[5]),
|
||||
// bidderPrice = decimal.Parse(dd[6]),
|
||||
// auctionPrice = decimal.Parse(dd[7]),
|
||||
// turnover = int.Parse(dd[8]),
|
||||
// turnoverPrice = decimal.Parse(dd[9]),
|
||||
// buyOneNum = int.Parse(dd[10]),
|
||||
// buyOnePrice = decimal.Parse(dd[11]),
|
||||
// buyTwoNum = int.Parse(dd[12]),
|
||||
// buyTwoPrice = decimal.Parse(dd[13]),
|
||||
// buyThreeNum = int.Parse(dd[14]),
|
||||
// buyThreePrice = decimal.Parse(dd[15]),
|
||||
// buyFourNum = int.Parse(dd[16]),
|
||||
// buyFourPrice = decimal.Parse(dd[17]),
|
||||
// buyFiveNum = int.Parse(dd[18]),
|
||||
// buyFivePrice = decimal.Parse(dd[19]),
|
||||
// sellOneNum = int.Parse(dd[20]),
|
||||
// sellOnePrice = decimal.Parse(dd[21]),
|
||||
// sellTwoNum = int.Parse(dd[22]),
|
||||
// sellTwoPrice = decimal.Parse(dd[23]),
|
||||
// sellThreeNum = int.Parse(dd[24]),
|
||||
// sellThreePrice = decimal.Parse(dd[25]),
|
||||
// sellFourNum = int.Parse(dd[26]),
|
||||
// sellFourPrice = decimal.Parse(dd[27]),
|
||||
// sellFiveNum = int.Parse(dd[28]),
|
||||
// sellFivePrice = decimal.Parse(dd[29]),
|
||||
// timeStr = DateTime.Parse(dd[30] + " " + dd[31])
|
||||
// };
|
||||
// list1.Add(info);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// using (var db = new MESDB())
|
||||
// {
|
||||
// foreach (var info in list1)
|
||||
// {
|
||||
// db.stockInfo.AddOrUpdate(info);
|
||||
// }
|
||||
// db.SaveChanges();
|
||||
// }
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// ex.Message.ShowError();
|
||||
// }
|
||||
//});
|
||||
//var t7 = Task.Factory.StartNew(() =>
|
||||
//{
|
||||
// try
|
||||
// {
|
||||
// string url = "http://hq.sinajs.cn/list={0}";
|
||||
// var list = new MESDB().stockInfo.ToList().Skip(3000).Take(500);
|
||||
// string code = "";
|
||||
// foreach (var stockInfo in list)
|
||||
// {
|
||||
// code += stockInfo.code + ",";
|
||||
// }
|
||||
// url = string.Format(url, code);
|
||||
// HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
|
||||
// request.Method = "GET";
|
||||
// request.ContentType = "text/html;charset=UTF-8";
|
||||
// request.UserAgent = null;
|
||||
// request.Timeout = 6000;
|
||||
// HttpWebResponse response = (HttpWebResponse)request.GetResponse();
|
||||
// Stream myResponseStream = response.GetResponseStream();
|
||||
// StreamReader myStreamReader = new StreamReader(myResponseStream, System.Text.Encoding.Default);
|
||||
// string retString = myStreamReader.ReadToEnd();
|
||||
// string[] ResData = retString.Split(';');
|
||||
// List<stockInfo> list1 = new List<stockInfo>();
|
||||
// foreach (var item in ResData)
|
||||
// {
|
||||
// var data = item.Split('=');
|
||||
// if (data.Length == 2)
|
||||
// {
|
||||
// var dd = data[1].Split(',');
|
||||
// if (dd.Length >= 33)
|
||||
// {
|
||||
// stockInfo info = new stockInfo()
|
||||
// {
|
||||
// code = data[0].Split('_')[2],
|
||||
// name = dd[0].Replace("\"", ""),
|
||||
// startPrice = decimal.Parse(dd[1]),
|
||||
// olePrice = decimal.Parse(dd[2]),
|
||||
// nowPrice = decimal.Parse(dd[3]),
|
||||
// maxPrice = decimal.Parse(dd[4]),
|
||||
// minPrice = decimal.Parse(dd[5]),
|
||||
// bidderPrice = decimal.Parse(dd[6]),
|
||||
// auctionPrice = decimal.Parse(dd[7]),
|
||||
// turnover = int.Parse(dd[8]),
|
||||
// turnoverPrice = decimal.Parse(dd[9]),
|
||||
// buyOneNum = int.Parse(dd[10]),
|
||||
// buyOnePrice = decimal.Parse(dd[11]),
|
||||
// buyTwoNum = int.Parse(dd[12]),
|
||||
// buyTwoPrice = decimal.Parse(dd[13]),
|
||||
// buyThreeNum = int.Parse(dd[14]),
|
||||
// buyThreePrice = decimal.Parse(dd[15]),
|
||||
// buyFourNum = int.Parse(dd[16]),
|
||||
// buyFourPrice = decimal.Parse(dd[17]),
|
||||
// buyFiveNum = int.Parse(dd[18]),
|
||||
// buyFivePrice = decimal.Parse(dd[19]),
|
||||
// sellOneNum = int.Parse(dd[20]),
|
||||
// sellOnePrice = decimal.Parse(dd[21]),
|
||||
// sellTwoNum = int.Parse(dd[22]),
|
||||
// sellTwoPrice = decimal.Parse(dd[23]),
|
||||
// sellThreeNum = int.Parse(dd[24]),
|
||||
// sellThreePrice = decimal.Parse(dd[25]),
|
||||
// sellFourNum = int.Parse(dd[26]),
|
||||
// sellFourPrice = decimal.Parse(dd[27]),
|
||||
// sellFiveNum = int.Parse(dd[28]),
|
||||
// sellFivePrice = decimal.Parse(dd[29]),
|
||||
// timeStr = DateTime.Parse(dd[30] + " " + dd[31])
|
||||
// };
|
||||
// list1.Add(info);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// using (var db = new MESDB())
|
||||
// {
|
||||
// foreach (var info in list1)
|
||||
// {
|
||||
// db.stockInfo.AddOrUpdate(info);
|
||||
// }
|
||||
// db.SaveChanges();
|
||||
// }
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// ex.Message.ShowError();
|
||||
// }
|
||||
//});
|
||||
List<Task> listtask = new List<Task>();
|
||||
for(int m = 0; m<8; m++)
|
||||
{
|
||||
int n = m;
|
||||
var t=Task.Factory.StartNew(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
string url = "http://hq.sinajs.cn/list={0}";
|
||||
var list = new MESDB().stockInfo.ToList().Skip(400*n).Take(400);
|
||||
string code = "";
|
||||
foreach (var stockInfo in list)
|
||||
{
|
||||
code += stockInfo.code + ",";
|
||||
}
|
||||
url = string.Format(url, code);
|
||||
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
|
||||
request.Method = "GET";
|
||||
request.ContentType = "text/html;charset=UTF-8";
|
||||
request.UserAgent = null;
|
||||
request.Timeout = 60000;
|
||||
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
|
||||
Stream myResponseStream = response.GetResponseStream();
|
||||
StreamReader myStreamReader = new StreamReader(myResponseStream, System.Text.Encoding.Default);
|
||||
string retString = myStreamReader.ReadToEnd();
|
||||
string[] ResData = retString.Split(';');
|
||||
List<stockInfo> list1 = new List<stockInfo>();
|
||||
foreach (var item in ResData)
|
||||
{
|
||||
var data = item.Split('=');
|
||||
if (data.Length == 2)
|
||||
{
|
||||
var dd = data[1].Split(',');
|
||||
if (dd.Length >= 33)
|
||||
{
|
||||
stockInfo info = new stockInfo()
|
||||
{
|
||||
code = data[0].Split('_')[2],
|
||||
name = dd[0].Replace("\"", ""),
|
||||
startPrice = decimal.Parse(dd[1]),
|
||||
olePrice = decimal.Parse(dd[2]),
|
||||
nowPrice = decimal.Parse(dd[3]),
|
||||
maxPrice = decimal.Parse(dd[4]),
|
||||
minPrice = decimal.Parse(dd[5]),
|
||||
bidderPrice = decimal.Parse(dd[6]),
|
||||
auctionPrice = decimal.Parse(dd[7]),
|
||||
turnover = int.Parse(dd[8]),
|
||||
turnoverPrice = decimal.Parse(dd[9]),
|
||||
buyOneNum = int.Parse(dd[10]),
|
||||
buyOnePrice = decimal.Parse(dd[11]),
|
||||
buyTwoNum = int.Parse(dd[12]),
|
||||
buyTwoPrice = decimal.Parse(dd[13]),
|
||||
buyThreeNum = int.Parse(dd[14]),
|
||||
buyThreePrice = decimal.Parse(dd[15]),
|
||||
buyFourNum = int.Parse(dd[16]),
|
||||
buyFourPrice = decimal.Parse(dd[17]),
|
||||
buyFiveNum = int.Parse(dd[18]),
|
||||
buyFivePrice = decimal.Parse(dd[19]),
|
||||
sellOneNum = int.Parse(dd[20]),
|
||||
sellOnePrice = decimal.Parse(dd[21]),
|
||||
sellTwoNum = int.Parse(dd[22]),
|
||||
sellTwoPrice = decimal.Parse(dd[23]),
|
||||
sellThreeNum = int.Parse(dd[24]),
|
||||
sellThreePrice = decimal.Parse(dd[25]),
|
||||
sellFourNum = int.Parse(dd[26]),
|
||||
sellFourPrice = decimal.Parse(dd[27]),
|
||||
sellFiveNum = int.Parse(dd[28]),
|
||||
sellFivePrice = decimal.Parse(dd[29]),
|
||||
timeStr = DateTime.Parse(dd[30] + " " + dd[31])
|
||||
};
|
||||
list1.Add(info);
|
||||
}
|
||||
}
|
||||
}
|
||||
using (var db = new MESDB())
|
||||
{
|
||||
foreach (var info in list1)
|
||||
{
|
||||
db.stockInfo.AddOrUpdate(info);
|
||||
}
|
||||
db.SaveChanges();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
var action1 = new Action(() =>
|
||||
{
|
||||
Show(DateTime.Now + ex.Message + "\r\n");
|
||||
});
|
||||
this.Invoke(action1);
|
||||
}
|
||||
});
|
||||
listtask.Add(t);
|
||||
}
|
||||
Task.WaitAll(listtask.ToArray());
|
||||
var action= new Action(() =>
|
||||
{
|
||||
Show(DateTime.Now + ":采集成功" + "\r\n");
|
||||
});
|
||||
this.Invoke(action);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void Show(string str)
|
||||
{
|
||||
memoEdit1.MaskBox.AppendText(str);
|
||||
}
|
||||
private void simpleButton2_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!flag)
|
||||
{
|
||||
flag = true;
|
||||
memoEdit1.MaskBox.AppendText(DateTime.Now+":开始采集" + "\r\n");
|
||||
simpleButton2.Text = "停止";
|
||||
}
|
||||
else
|
||||
{
|
||||
flag = false;
|
||||
memoEdit1.MaskBox.AppendText(DateTime.Now + ":停止采集" + "\r\n");
|
||||
simpleButton2.Text = "开始采集";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -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>
|
||||
|
|
@ -133,10 +133,17 @@
|
|||
<Compile Include="DBAdapter.cs" />
|
||||
<Compile Include="DB\MESDB.cs" />
|
||||
<Compile Include="EntityAdapter.cs" />
|
||||
<Compile Include="Entity\stockInfo.cs" />
|
||||
<Compile Include="Entity\sysDictDataInfo.cs" />
|
||||
<Compile Include="Entity\sysDictTypeInfo.cs" />
|
||||
<Compile Include="Entity\sysMenuInfo.cs" />
|
||||
<Compile Include="Entity\sysUserInfo.cs" />
|
||||
<Compile Include="Form\Frmstock.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Form\Frmstock.designer.cs">
|
||||
<DependentUpon>Frmstock.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Form\FrmsysDictData.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
|
|
@ -219,6 +226,12 @@
|
|||
</Compile>
|
||||
<Compile Include="sysDataBase.cs" />
|
||||
<Compile Include="sysDataTableInfo.cs" />
|
||||
<Compile Include="Test.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Test.Designer.cs">
|
||||
<DependentUpon>Test.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WaitForm1.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
|
|
@ -235,6 +248,9 @@
|
|||
<EmbeddedResource Include="BaseForm.resx">
|
||||
<DependentUpon>BaseForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Form\Frmstock.resx">
|
||||
<DependentUpon>Frmstock.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Form\FrmsysDictData.resx">
|
||||
<DependentUpon>FrmsysDictData.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
|
@ -285,6 +301,9 @@
|
|||
<EmbeddedResource Include="FrmShowForm.resx">
|
||||
<DependentUpon>FrmShowForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Test.resx">
|
||||
<DependentUpon>Test.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="WaitForm1.resx">
|
||||
<DependentUpon>WaitForm1.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
|
@ -7595,6 +7614,10 @@
|
|||
<Content Include="Images\Zoom_32x32.png">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<None Include="Resources\mail_16x16.png" />
|
||||
<None Include="Resources\mail_32x32.png" />
|
||||
<None Include="Resources\operatingsystem_16x16.png" />
|
||||
<None Include="Resources\operatingsystem_32x32.png" />
|
||||
<None Include="Resources\team_32x32.png" />
|
||||
<None Include="Resources\pagesetup_32x32.png" />
|
||||
<None Include="Resources\build_32x32.png" />
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ namespace WinformGeneralDeveloperFrame
|
|||
this.isKey = new DevExpress.XtraGrid.Columns.GridColumn();
|
||||
this.isIdentity = new DevExpress.XtraGrid.Columns.GridColumn();
|
||||
this.gridColumn2 = new DevExpress.XtraGrid.Columns.GridColumn();
|
||||
this.gridColumn3 = new DevExpress.XtraGrid.Columns.GridColumn();
|
||||
this.simpleButton1 = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.textEdit2 = new DevExpress.XtraEditors.TextEdit();
|
||||
this.textEdit1 = new DevExpress.XtraEditors.TextEdit();
|
||||
|
|
@ -73,7 +74,6 @@ namespace WinformGeneralDeveloperFrame
|
|||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.wizardControl1 = new DevExpress.XtraWizard.WizardControl();
|
||||
this.xtraFolderBrowserDialog1 = new DevExpress.XtraEditors.XtraFolderBrowserDialog(this.components);
|
||||
this.gridColumn3 = new DevExpress.XtraGrid.Columns.GridColumn();
|
||||
this.completionWizardPage1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
|
||||
this.layoutControl1.SuspendLayout();
|
||||
|
|
@ -272,7 +272,7 @@ namespace WinformGeneralDeveloperFrame
|
|||
this.gridColumn1.FieldName = "controlLabelName";
|
||||
this.gridColumn1.Name = "gridColumn1";
|
||||
this.gridColumn1.Visible = true;
|
||||
this.gridColumn1.VisibleIndex = 9;
|
||||
this.gridColumn1.VisibleIndex = 10;
|
||||
//
|
||||
// isVisible
|
||||
//
|
||||
|
|
@ -318,7 +318,7 @@ namespace WinformGeneralDeveloperFrame
|
|||
this.isIdentity.Name = "isIdentity";
|
||||
this.isIdentity.OptionsColumn.ReadOnly = true;
|
||||
this.isIdentity.Visible = true;
|
||||
this.isIdentity.VisibleIndex = 8;
|
||||
this.isIdentity.VisibleIndex = 9;
|
||||
//
|
||||
// gridColumn2
|
||||
//
|
||||
|
|
@ -326,7 +326,15 @@ namespace WinformGeneralDeveloperFrame
|
|||
this.gridColumn2.FieldName = "isSearch";
|
||||
this.gridColumn2.Name = "gridColumn2";
|
||||
this.gridColumn2.Visible = true;
|
||||
this.gridColumn2.VisibleIndex = 10;
|
||||
this.gridColumn2.VisibleIndex = 11;
|
||||
//
|
||||
// gridColumn3
|
||||
//
|
||||
this.gridColumn3.Caption = "是否为空检验";
|
||||
this.gridColumn3.FieldName = "isCheck";
|
||||
this.gridColumn3.Name = "gridColumn3";
|
||||
this.gridColumn3.Visible = true;
|
||||
this.gridColumn3.VisibleIndex = 8;
|
||||
//
|
||||
// simpleButton1
|
||||
//
|
||||
|
|
@ -528,14 +536,6 @@ namespace WinformGeneralDeveloperFrame
|
|||
//
|
||||
this.xtraFolderBrowserDialog1.SelectedPath = "xtraFolderBrowserDialog1";
|
||||
//
|
||||
// gridColumn3
|
||||
//
|
||||
this.gridColumn3.Caption = "是否为空检验";
|
||||
this.gridColumn3.FieldName = "isCheck";
|
||||
this.gridColumn3.Name = "gridColumn3";
|
||||
this.gridColumn3.Visible = true;
|
||||
this.gridColumn3.VisibleIndex = 7;
|
||||
//
|
||||
// frmSelectDataBase
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
|
||||
|
|
@ -547,7 +547,7 @@ namespace WinformGeneralDeveloperFrame
|
|||
this.MinimizeBox = false;
|
||||
this.Name = "frmSelectDataBase";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "选择数据源";
|
||||
this.Text = "代码生成";
|
||||
this.Load += new System.EventHandler(this.frmSelectDataBase_Load);
|
||||
this.completionWizardPage1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
|
||||
|
|
|
|||
Loading…
Reference in New Issue