⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmwell.cs

📁 车载GPS?今天这个就是最好的工具
💻 CS
📖 第 1 页 / 共 2 页
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlClient;
using GoldPrinter;

namespace GEROSYS
{
	/// <summary>
	/// frmWell 的摘要说明。
	/// </summary>
	public class frmWell : System.Windows.Forms.Form
	{
		//		protected const string SQL_CONNECTION_STRING  = @"Data Source=diaodushi;DataBase=gero;user id=sa;password=sasa";
		//		protected const string SQL_CONNECTION_STRING  = @"Server=(local)\PCMS;DataBase=gero;user id=sa;password=pcms;Integrated Security=SSPI";
		private string strConn= new AccessData().ConnectionString ;
		private System.Windows.Forms.ImageList imageList1;
		private System.Windows.Forms.ToolBar toolBar1;
		private System.Windows.Forms.ToolBarButton toolBarFresh;
		private System.Windows.Forms.ToolBarButton toolBarPrintV;
		private System.Windows.Forms.ToolBarButton toolBarPrint;
		private System.Windows.Forms.ToolBarButton toolBarExit;
		private System.Windows.Forms.GroupBox groupBox11;
		private System.Windows.Forms.DateTimePicker dtpAEnd;
		private System.Windows.Forms.Label label5;
		private System.Windows.Forms.Label lblAStart;
		private System.Windows.Forms.DateTimePicker dtpAStart;
		private System.ComponentModel.IContainer components;
		private frmWellGP frm;
		private AxVSFlex7.AxVSFlexGrid grdRAccept;
		private DataTable dtTable=new DataTable();
		private DataRow   myDataRow;
		public  string[,] arrstrGrd = new string[13,1];
		public frmWell()
		{
			//
			// Windows 窗体设计器支持所必需的
			//
			InitializeComponent();
			//
			// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
			//
		}

		/// <summary>
		/// 清理所有正在使用的资源。
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		[STAThread]
		static void Main() 
		{
			Application.Run(new frmWell());
		}

		#region Windows 窗体设计器生成的代码
		/// <summary>
		/// 设计器支持所需的方法 - 不要使用代码编辑器修改
		/// 此方法的内容。
		/// </summary>
		private void InitializeComponent()
		{
			this.components = new System.ComponentModel.Container();
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(frmWell));
			this.imageList1 = new System.Windows.Forms.ImageList(this.components);
			this.toolBar1 = new System.Windows.Forms.ToolBar();
			this.toolBarFresh = new System.Windows.Forms.ToolBarButton();
			this.toolBarPrintV = new System.Windows.Forms.ToolBarButton();
			this.toolBarPrint = new System.Windows.Forms.ToolBarButton();
			this.toolBarExit = new System.Windows.Forms.ToolBarButton();
			this.groupBox11 = new System.Windows.Forms.GroupBox();
			this.dtpAEnd = new System.Windows.Forms.DateTimePicker();
			this.label5 = new System.Windows.Forms.Label();
			this.lblAStart = new System.Windows.Forms.Label();
			this.dtpAStart = new System.Windows.Forms.DateTimePicker();
			this.grdRAccept = new AxVSFlex7.AxVSFlexGrid();
			this.groupBox11.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)(this.grdRAccept)).BeginInit();
			this.SuspendLayout();
			// 
			// imageList1
			// 
			this.imageList1.ImageSize = new System.Drawing.Size(16, 16);
			this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
			this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
			// 
			// toolBar1
			// 
			this.toolBar1.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {
																						this.toolBarFresh,
																						this.toolBarPrintV,
																						this.toolBarPrint,
																						this.toolBarExit});
			this.toolBar1.DropDownArrows = true;
			this.toolBar1.ImageList = this.imageList1;
			this.toolBar1.Location = new System.Drawing.Point(0, 0);
			this.toolBar1.Name = "toolBar1";
			this.toolBar1.ShowToolTips = true;
			this.toolBar1.Size = new System.Drawing.Size(712, 41);
			this.toolBar1.TabIndex = 6;
			this.toolBar1.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.toolBar1_ButtonClick);
			// 
			// toolBarFresh
			// 
			this.toolBarFresh.ImageIndex = 4;
			this.toolBarFresh.Text = "查询";
			this.toolBarFresh.ToolTipText = "查询";
			// 
			// toolBarPrintV
			// 
			this.toolBarPrintV.ImageIndex = 5;
			this.toolBarPrintV.Text = "预览";
			this.toolBarPrintV.ToolTipText = "预览";
			// 
			// toolBarPrint
			// 
			this.toolBarPrint.ImageIndex = 6;
			this.toolBarPrint.Text = "打印";
			this.toolBarPrint.ToolTipText = "打印";
			// 
			// toolBarExit
			// 
			this.toolBarExit.ImageIndex = 7;
			this.toolBarExit.Text = "退出";
			this.toolBarExit.ToolTipText = "退出";
			// 
			// groupBox11
			// 
			this.groupBox11.BackColor = System.Drawing.SystemColors.Window;
			this.groupBox11.Controls.Add(this.dtpAEnd);
			this.groupBox11.Controls.Add(this.label5);
			this.groupBox11.Controls.Add(this.lblAStart);
			this.groupBox11.Controls.Add(this.dtpAStart);
			this.groupBox11.Location = new System.Drawing.Point(192, 48);
			this.groupBox11.Name = "groupBox11";
			this.groupBox11.Size = new System.Drawing.Size(496, 48);
			this.groupBox11.TabIndex = 10;
			this.groupBox11.TabStop = false;
			// 
			// dtpAEnd
			// 
			this.dtpAEnd.Location = new System.Drawing.Point(352, 16);
			this.dtpAEnd.Name = "dtpAEnd";
			this.dtpAEnd.Size = new System.Drawing.Size(136, 21);
			this.dtpAEnd.TabIndex = 3;
			// 
			// label5
			// 
			this.label5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
			this.label5.Location = new System.Drawing.Point(264, 24);
			this.label5.Name = "label5";
			this.label5.Size = new System.Drawing.Size(72, 2);
			this.label5.TabIndex = 2;
			// 
			// lblAStart
			// 
			this.lblAStart.Location = new System.Drawing.Point(24, 17);
			this.lblAStart.Name = "lblAStart";
			this.lblAStart.Size = new System.Drawing.Size(72, 23);
			this.lblAStart.TabIndex = 1;
			this.lblAStart.Text = "接警日期:";
			this.lblAStart.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
			// 
			// dtpAStart
			// 
			this.dtpAStart.Location = new System.Drawing.Point(96, 16);
			this.dtpAStart.Name = "dtpAStart";
			this.dtpAStart.Size = new System.Drawing.Size(152, 21);
			this.dtpAStart.TabIndex = 0;
			// 
			// grdRAccept
			// 
			this.grdRAccept.DataSource = null;
			this.grdRAccept.Location = new System.Drawing.Point(0, 96);
			this.grdRAccept.Name = "grdRAccept";
			this.grdRAccept.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("grdRAccept.OcxState")));
			this.grdRAccept.Size = new System.Drawing.Size(760, 264);
			this.grdRAccept.TabIndex = 33;
			// 
			// frmWell
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.ClientSize = new System.Drawing.Size(712, 413);
			this.Controls.Add(this.grdRAccept);
			this.Controls.Add(this.groupBox11);
			this.Controls.Add(this.toolBar1);
			this.Name = "frmWell";
			this.Text = "急抢修井盖丢失统计查询";
			this.Closing += new System.ComponentModel.CancelEventHandler(this.frmWell_Closing);
			this.Load += new System.EventHandler(this.frmWell_Load);
			this.groupBox11.ResumeLayout(false);
			((System.ComponentModel.ISupportInitialize)(this.grdRAccept)).EndInit();
			this.ResumeLayout(false);

		}
		#endregion

		private void frmWell_Load(object sender, System.EventArgs e)
		{
			this.Top = 0;
			this.Left = 0;
			this.Width = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Width;
			this.Height = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Height / 2;
			groupBox11.Left  = 500;
			grdRAccept.Width =this.Width ;
			grdRAccept.Height =this.Height -8;
			
			System.DateTime dateTime = new System.DateTime(System.DateTime.Now.Year, 01,01);
			dtpAStart.Value = dateTime;
//			dtpAStart.Format=DateTimePickerFormat.Custom;
//			dtpAStart.CustomFormat = "yyyy年MM月dd日";

			grdRAccept.SheetBorder =Color.White;
			grdRAccept.RowHeightMin =250;
			grdRAccept.RowHeightMax =300;
			grdRAccept.AllowSelection =false;
			grdRAccept.set_Cell(VSFlex7.CellPropertySettings.flexcpAlignment,0,0,14,1,VSFlex7.AlignmentSettings.flexAlignCenterCenter);
			if(this.frm == null) 
			{
				frm = new frmWellGP(this);
			}
			else
			{
				this.frm.Dispose();
				this.frm=null;
				frm = new frmWellGP(this);
			}
			frm.Show();
			frm.CreateAllCharts(300);
		}

		private void frmWell_Closing(object sender, System.ComponentModel.CancelEventArgs e)
		{
			if(!(this.frm == null))

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -