//===========================================================================
// Smarclient FPMS Demo Project a sample project for SmartClient technology.
// Smarclient FPMS Demo is designed and implemented bases Microsoft Application Block tech.
// Author: SFPMS Team, Date 2004-11
// Vision 2.0.0.0,support xuqiu fenglei
// Revison History
//=============================================================================
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using Microsoft.ApplicationBlocks.ApplicationUpdater;
using Microsoft.ApplicationBlocks.SmartClient.Offline;
using JSW.Tool; 
using JSW.FPMS.Tool;
using JSW.FPMS.Xiang.KongZhi;

namespace JSW.FPMS.Xiang.ShiTu
{
	/// <summary>
	/// clsXuQiuChaXunForm 应用程序主界面，响应用户UI操作
	/// MVC中的Viewer角色
	/// </summary>
	public class XuQiuChaXunForm : System.Windows.Forms.Form
	{
		#region 成员变量区域

		private System.Windows.Forms.Button BT_XuQiuLuRu;
		private System.Windows.Forms.GroupBox GB_JieGuo;
		
		private System.Windows.Forms.MenuItem menuItem8;
		private System.Windows.Forms.MenuItem menuItem9;
		private System.Windows.Forms.MainMenu MM_CaiDan;
		private System.Windows.Forms.MenuItem MMI_GongNeng;
		private System.Windows.Forms.MenuItem MMI_XuQiuLuRu;
		private System.Windows.Forms.MenuItem MMI_TuiChu;
		private System.Windows.Forms.MenuItem MMI_BangZhuBT;
		private System.Windows.Forms.MenuItem MMI_BangZhu;
		private System.Windows.Forms.MenuItem MMI_GuanYu;
		private System.Windows.Forms.StatusBar SB_ZhuangTai;
		private System.ComponentModel.IContainer components;


		//界面控制器
		private clsXuQiuChaXunKongZhi jiemianKongZhi = null;
		private System.Windows.Forms.Button BT_ShuanXin;
		private System.Windows.Forms.MenuItem MMI_ShuaXin;
		private System.Windows.Forms.Timer TM_ShuJuGengXin;
		private System.Windows.Forms.TabControl TAB_XuQiu;
		private System.Windows.Forms.TabPage TAB_XuQiuWeiDaFu;
		private System.Windows.Forms.TabPage TB_XuQiuYiDaFu;
		private System.Windows.Forms.GroupBox GB_XuQiuYiDaFu;
		//DG_XuQiu
		private System.Windows.Forms.DataGrid DG_XuQiu;
		private System.Windows.Forms.DataGridTableStyle dataGridTableStyle1;
		private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn1;
		private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn2;
		private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn3;
		private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn4;
		private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn5;
		private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn6;
		private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn7;
		private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn8;

		//DG_XuQiuYiDaFu
		private System.Windows.Forms.DataGrid DG_XuQiuYiDaFu;
		private System.Windows.Forms.DataGridTableStyle dataGridTableStyle2;
		private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn2_1;
		private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn2_2;
		private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn2_3;
		private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn2_4;
		private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn2_5;
		private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn2_6;
		private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn2_7;
		private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn2_8;

		//2.0.0.0，修改
		private DataSet xuqiuChaXunWeiDaFu = null;
		private System.Windows.Forms.MenuItem menuItem1;
		private System.Windows.Forms.MenuItem MMI_ShangXian;
		private System.Windows.Forms.MenuItem MMI_LiXian;
		private System.Windows.Forms.PictureBox pictureBox1;
		private DataSet xuqiuChaXunYiDaFu = null;

		#endregion
		
		#region 私有方法区域
		private void InitializeComponent()
		{
			this.components = new System.ComponentModel.Container();
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(XuQiuChaXunForm));
			this.BT_XuQiuLuRu = new System.Windows.Forms.Button();
			this.GB_JieGuo = new System.Windows.Forms.GroupBox();
			this.DG_XuQiu = new System.Windows.Forms.DataGrid();
			this.dataGridTableStyle1 = new System.Windows.Forms.DataGridTableStyle();
			this.dataGridTextBoxColumn1 = new System.Windows.Forms.DataGridTextBoxColumn();
			this.dataGridTextBoxColumn2 = new System.Windows.Forms.DataGridTextBoxColumn();
			this.dataGridTextBoxColumn3 = new System.Windows.Forms.DataGridTextBoxColumn();
			this.dataGridTextBoxColumn4 = new System.Windows.Forms.DataGridTextBoxColumn();
			this.dataGridTextBoxColumn5 = new System.Windows.Forms.DataGridTextBoxColumn();
			this.dataGridTextBoxColumn6 = new System.Windows.Forms.DataGridTextBoxColumn();
			this.dataGridTextBoxColumn7 = new System.Windows.Forms.DataGridTextBoxColumn();
			this.dataGridTextBoxColumn8 = new System.Windows.Forms.DataGridTextBoxColumn();
			this.MM_CaiDan = new System.Windows.Forms.MainMenu();
			this.MMI_GongNeng = new System.Windows.Forms.MenuItem();
			this.MMI_ShuaXin = new System.Windows.Forms.MenuItem();
			this.MMI_XuQiuLuRu = new System.Windows.Forms.MenuItem();
			this.menuItem8 = new System.Windows.Forms.MenuItem();
			this.MMI_TuiChu = new System.Windows.Forms.MenuItem();
			this.menuItem1 = new System.Windows.Forms.MenuItem();
			this.MMI_ShangXian = new System.Windows.Forms.MenuItem();
			this.MMI_LiXian = new System.Windows.Forms.MenuItem();
			this.MMI_BangZhuBT = new System.Windows.Forms.MenuItem();
			this.MMI_BangZhu = new System.Windows.Forms.MenuItem();
			this.menuItem9 = new System.Windows.Forms.MenuItem();
			this.MMI_GuanYu = new System.Windows.Forms.MenuItem();
			this.SB_ZhuangTai = new System.Windows.Forms.StatusBar();
			this.BT_ShuanXin = new System.Windows.Forms.Button();
			this.TM_ShuJuGengXin = new System.Windows.Forms.Timer(this.components);
			this.TAB_XuQiu = new System.Windows.Forms.TabControl();
			this.TAB_XuQiuWeiDaFu = new System.Windows.Forms.TabPage();
			this.TB_XuQiuYiDaFu = new System.Windows.Forms.TabPage();
			this.GB_XuQiuYiDaFu = new System.Windows.Forms.GroupBox();
			this.DG_XuQiuYiDaFu = new System.Windows.Forms.DataGrid();
			this.dataGridTableStyle2 = new System.Windows.Forms.DataGridTableStyle();
			this.dataGridTextBoxColumn2_1 = new System.Windows.Forms.DataGridTextBoxColumn();
			this.dataGridTextBoxColumn2_2 = new System.Windows.Forms.DataGridTextBoxColumn();
			this.dataGridTextBoxColumn2_3 = new System.Windows.Forms.DataGridTextBoxColumn();
			this.dataGridTextBoxColumn2_4 = new System.Windows.Forms.DataGridTextBoxColumn();
			this.dataGridTextBoxColumn2_5 = new System.Windows.Forms.DataGridTextBoxColumn();
			this.dataGridTextBoxColumn2_6 = new System.Windows.Forms.DataGridTextBoxColumn();
			this.dataGridTextBoxColumn2_7 = new System.Windows.Forms.DataGridTextBoxColumn();
			this.dataGridTextBoxColumn2_8 = new System.Windows.Forms.DataGridTextBoxColumn();
			this.pictureBox1 = new System.Windows.Forms.PictureBox();
			this.GB_JieGuo.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)(this.DG_XuQiu)).BeginInit();
			this.TAB_XuQiu.SuspendLayout();
			this.TAB_XuQiuWeiDaFu.SuspendLayout();
			this.TB_XuQiuYiDaFu.SuspendLayout();
			this.GB_XuQiuYiDaFu.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)(this.DG_XuQiuYiDaFu)).BeginInit();
			this.SuspendLayout();
			// 
			// BT_XuQiuLuRu
			// 
			this.BT_XuQiuLuRu.Location = new System.Drawing.Point(92, 8);
			this.BT_XuQiuLuRu.Name = "BT_XuQiuLuRu";
			this.BT_XuQiuLuRu.TabIndex = 10;
			this.BT_XuQiuLuRu.Text = "需求录入";
			this.BT_XuQiuLuRu.Click += new System.EventHandler(this.BT_XuQiuLuRu_Click);
			// 
			// GB_JieGuo
			// 
			this.GB_JieGuo.Controls.Add(this.DG_XuQiu);
			this.GB_JieGuo.Location = new System.Drawing.Point(0, 0);
			this.GB_JieGuo.Name = "GB_JieGuo";
			this.GB_JieGuo.Size = new System.Drawing.Size(592, 304);
			this.GB_JieGuo.TabIndex = 14;
			this.GB_JieGuo.TabStop = false;
			// 
			// DG_XuQiu
			// 
			this.DG_XuQiu.CaptionVisible = false;
			this.DG_XuQiu.DataMember = "";
			this.DG_XuQiu.Dock = System.Windows.Forms.DockStyle.Fill;
			this.DG_XuQiu.HeaderForeColor = System.Drawing.SystemColors.ControlText;
			this.DG_XuQiu.Location = new System.Drawing.Point(3, 17);
			this.DG_XuQiu.Name = "DG_XuQiu";
			this.DG_XuQiu.Size = new System.Drawing.Size(586, 284);
			this.DG_XuQiu.TabIndex = 0;
			this.DG_XuQiu.TableStyles.AddRange(new System.Windows.Forms.DataGridTableStyle[] {
																								 this.dataGridTableStyle1});
			this.DG_XuQiu.DoubleClick += new System.EventHandler(this.DG_XuQiu_DoubleClick);
			// 
			// dataGridTableStyle1
			// 
			this.dataGridTableStyle1.DataGrid = this.DG_XuQiu;
			this.dataGridTableStyle1.GridColumnStyles.AddRange(new System.Windows.Forms.DataGridColumnStyle[] {
																												  this.dataGridTextBoxColumn1,
																												  this.dataGridTextBoxColumn2,
																												  this.dataGridTextBoxColumn3,
																												  this.dataGridTextBoxColumn4,
																												  this.dataGridTextBoxColumn5,
																												  this.dataGridTextBoxColumn6,
																												  this.dataGridTextBoxColumn7,
																												  this.dataGridTextBoxColumn8});
			this.dataGridTableStyle1.HeaderForeColor = System.Drawing.SystemColors.ControlText;
			this.dataGridTableStyle1.MappingName = "XuQiu";
			// 
			// dataGridTextBoxColumn1
			// 
			this.dataGridTextBoxColumn1.Format = "yyyy-MM-dd";
			this.dataGridTextBoxColumn1.FormatInfo = null;
			this.dataGridTextBoxColumn1.HeaderText = "采集时间";
			this.dataGridTextBoxColumn1.MappingName = "CaiJiShiJian";
			this.dataGridTextBoxColumn1.NullText = "";
			this.dataGridTextBoxColumn1.Width = 75;
			// 
			// dataGridTextBoxColumn2
			// 
			this.dataGridTextBoxColumn2.Format = "";
			this.dataGridTextBoxColumn2.FormatInfo = null;
			this.dataGridTextBoxColumn2.HeaderText = "提出人";
			this.dataGridTextBoxColumn2.MappingName = "TiChuRen";
			this.dataGridTextBoxColumn2.NullText = "";
			this.dataGridTextBoxColumn2.Width = 75;
			// 
			// dataGridTextBoxColumn3
			// 
			this.dataGridTextBoxColumn3.Format = "";
			this.dataGridTextBoxColumn3.FormatInfo = null;
			this.dataGridTextBoxColumn3.HeaderText = "育妇编码";
			this.dataGridTextBoxColumn3.MappingName = "YuFuBianMa";
			this.dataGridTextBoxColumn3.NullText = "";
			this.dataGridTextBoxColumn3.Width = 75;
			// 
			// dataGridTextBoxColumn4
			// 
			this.dataGridTextBoxColumn4.Format = "";
			this.dataGridTextBoxColumn4.FormatInfo = null;
			this.dataGridTextBoxColumn4.HeaderText = "需求类别";
			this.dataGridTextBoxColumn4.MappingName = "XuQiuLeiBie";
			this.dataGridTextBoxColumn4.NullText = "";
			this.dataGridTextBoxColumn4.Width = 75;
			// 
			// dataGridTextBoxColumn5
			// 
			this.dataGridTextBoxColumn5.Format = "";
			this.dataGridTextBoxColumn5.FormatInfo = null;
			this.dataGridTextBoxColumn5.HeaderText = "答复人";
			this.dataGridTextBoxColumn5.MappingName = "DaFuRen";
			this.dataGridTextBoxColumn5.NullText = "";
			this.dataGridTextBoxColumn5.Width = 75;
			// 
			// dataGridTextBoxColumn6
			// 
			this.dataGridTextBoxColumn6.Format = "yyyy-MM-dd";
			this.dataGridTextBoxColumn6.FormatInfo = null;
			this.dataGridTextBoxColumn6.HeaderText = "答复时间";
			this.dataGridTextBoxColumn6.MappingName = "DaFuShiJian";
			this.dataGridTextBoxColumn6.NullText = "";
			this.dataGridTextBoxColumn6.Width = 75;
			// 
			// dataGridTextBoxColumn7
			// 
			this.dataGridTextBoxColumn7.Format = "";
			this.dataGridTextBoxColumn7.FormatInfo = null;
			this.dataGridTextBoxColumn7.HeaderText = "信息点编号";
			this.dataGridTextBoxColumn7.MappingName = "XinXiDianBianHao";
			this.dataGridTextBoxColumn7.NullText = "";
			this.dataGridTextBoxColumn7.Width = 75;
			// 
			// dataGridTextBoxColumn8
			// 
			this.dataGridTextBoxColumn8.Format = "";
			this.dataGridTextBoxColumn8.FormatInfo = null;
			this.dataGridTextBoxColumn8.HeaderText = "需求满意度";
			this.dataGridTextBoxColumn8.MappingName = "XuQiuManYiDu";
			this.dataGridTextBoxColumn8.NullText = "";
			this.dataGridTextBoxColumn8.Width = 75;
			// 
			// MM_CaiDan
			// 
			this.MM_CaiDan.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																					  this.MMI_GongNeng,
																					  this.menuItem1,
																					  this.MMI_BangZhuBT});
			// 
			// MMI_GongNeng
			// 
			this.MMI_GongNeng.Index = 0;
			this.MMI_GongNeng.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																						 this.MMI_ShuaXin,
																						 this.MMI_XuQiuLuRu,
																						 this.menuItem8,
																						 this.MMI_TuiChu});
			this.MMI_GongNeng.Text = "文件(&F)";
			// 
			// MMI_ShuaXin
			// 
			this.MMI_ShuaXin.Index = 0;
			this.MMI_ShuaXin.Text = "刷新";
			this.MMI_ShuaXin.Click += new System.EventHandler(this.MMI_ShuaXin_Click);
			// 
			// MMI_XuQiuLuRu
			// 
			this.MMI_XuQiuLuRu.Index = 1;
			this.MMI_XuQiuLuRu.Text = "需求录入";
			this.MMI_XuQiuLuRu.Click += new System.EventHandler(this.MMI_XuQiuLuRu_Click);
			// 
			// menuItem8
			// 
			this.menuItem8.Index = 2;
			this.menuItem8.Text = "-";
			// 
			// MMI_TuiChu
			// 
			this.MMI_TuiChu.Index = 3;
			this.MMI_TuiChu.Text = "退出";
			this.MMI_TuiChu.Click += new System.EventHandler(this.MMI_TuiChu_Click);
			// 
			// menuItem1
			// 
			this.menuItem1.Index = 1;
			this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																					  this.MMI_ShangXian,
																					  this.MMI_LiXian});
			this.menuItem1.Text = "操作";
			// 
			// MMI_ShangXian
			// 
			this.MMI_ShangXian.Index = 0;
			this.MMI_ShangXian.Text = "上线";
			this.MMI_ShangXian.Click += new System.EventHandler(this.MMI_ShangXian_Click);
			// 
			// MMI_LiXian
			// 
			this.MMI_LiXian.Index = 1;
			this.MMI_LiXian.Text = "离线";
			this.MMI_LiXian.Click += new System.EventHandler(this.MMI_LiXian_Click);
			// 
			// MMI_BangZhuBT
			// 
			this.MMI_BangZhuBT.Index = 2;
			this.MMI_BangZhuBT.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																						  this.MMI_BangZhu,
																						  this.menuItem9,
																						  this.MMI_GuanYu});
			this.MMI_BangZhuBT.Text = "帮助(&H)";
			// 
			// MMI_BangZhu
			// 
			this.MMI_BangZhu.Index = 0;
			this.MMI_BangZhu.Text = "帮助";
			this.MMI_BangZhu.Click += new System.EventHandler(this.MMI_BangZhu_Click);
			// 
			// menuItem9
			// 
			this.menuItem9.Index = 1;
			this.menuItem9.Text = "-";
			// 
			// MMI_GuanYu
			// 
			this.MMI_GuanYu.Index = 2;
			this.MMI_GuanYu.Text = "关于";
			this.MMI_GuanYu.Click += new System.EventHandler(this.MMI_GuanYu_Click);
			// 
			// SB_ZhuangTai
			// 
			this.SB_ZhuangTai.Location = new System.Drawing.Point(0, 385);
			this.SB_ZhuangTai.Name = "SB_ZhuangTai";
			this.SB_ZhuangTai.Size = new System.Drawing.Size(608, 16);
			this.SB_ZhuangTai.TabIndex = 15;
			this.SB_ZhuangTai.Text = "应用程序启动";
			// 
			// BT_ShuanXin
			// 
			this.BT_ShuanXin.Location = new System.Drawing.Point(8, 8);
			this.BT_ShuanXin.Name = "BT_ShuanXin";
			this.BT_ShuanXin.TabIndex = 16;
			this.BT_ShuanXin.Text = "刷新";
			this.BT_ShuanXin.Click += new System.EventHandler(this.BT_ShuanXin_Click);
			// 
			// TM_ShuJuGengXin
			// 
			this.TM_ShuJuGengXin.Enabled = true;
			this.TM_ShuJuGengXin.Interval = 15000;
			this.TM_ShuJuGengXin.Tick += new System.EventHandler(this.TM_ShuJuGengXin_Tick);
			// 
			// TAB_XuQiu
			// 
			this.TAB_XuQiu.Controls.Add(this.TAB_XuQiuWeiDaFu);
			this.TAB_XuQiu.Controls.Add(this.TB_XuQiuYiDaFu);
			this.TAB_XuQiu.Location = new System.Drawing.Point(8, 40);
			this.TAB_XuQiu.Name = "TAB_XuQiu";
			this.TAB_XuQiu.SelectedIndex = 0;
			this.TAB_XuQiu.Size = new System.Drawing.Size(600, 336);
			this.TAB_XuQiu.TabIndex = 18;
			// 
			// TAB_XuQiuWeiDaFu
			// 
			this.TAB_XuQiuWeiDaFu.Controls.Add(this.GB_JieGuo);
			this.TAB_XuQiuWeiDaFu.Location = new System.Drawing.Point(4, 21);
			this.TAB_XuQiuWeiDaFu.Name = "TAB_XuQiuWeiDaFu";
			this.TAB_XuQiuWeiDaFu.Size = new System.Drawing.Size(592, 311);
			this.TAB_XuQiuWeiDaFu.TabIndex = 1;
			this.TAB_XuQiuWeiDaFu.Text = "没有答复的需求";
			// 
			// TB_XuQiuYiDaFu
			// 
			this.TB_XuQiuYiDaFu.Controls.Add(this.GB_XuQiuYiDaFu);
			this.TB_XuQiuYiDaFu.Location = new System.Drawing.Point(4, 21);
			this.TB_XuQiuYiDaFu.Name = "TB_XuQiuYiDaFu";
			this.TB_XuQiuYiDaFu.Size = new System.Drawing.Size(592, 311);
			this.TB_XuQiuYiDaFu.TabIndex = 2;
			this.TB_XuQiuYiDaFu.Text = "已经答复的需求";
			// 
			// GB_XuQiuYiDaFu
			// 
			this.GB_XuQiuYiDaFu.Controls.Add(this.DG_XuQiuYiDaFu);
			this.GB_XuQiuYiDaFu.Location = new System.Drawing.Point(0, 0);
			this.GB_XuQiuYiDaFu.Name = "GB_XuQiuYiDaFu";
			this.GB_XuQiuYiDaFu.Size = new System.Drawing.Size(592, 304);
			this.GB_XuQiuYiDaFu.TabIndex = 0;
			this.GB_XuQiuYiDaFu.TabStop = false;
			// 
			// DG_XuQiuYiDaFu
			// 
			this.DG_XuQiuYiDaFu.CaptionVisible = false;
			this.DG_XuQiuYiDaFu.DataMember = "";
			this.DG_XuQiuYiDaFu.HeaderForeColor = System.Drawing.SystemColors.ControlText;
			this.DG_XuQiuYiDaFu.Location = new System.Drawing.Point(3, 17);
			this.DG_XuQiuYiDaFu.Name = "DG_XuQiuYiDaFu";
			this.DG_XuQiuYiDaFu.Size = new System.Drawing.Size(586, 284);
			this.DG_XuQiuYiDaFu.TabIndex = 0;
			this.DG_XuQiuYiDaFu.TableStyles.AddRange(new System.Windows.Forms.DataGridTableStyle[] {
																									   this.dataGridTableStyle2});
			this.DG_XuQiuYiDaFu.DoubleClick += new System.EventHandler(this.DG_XuQiuYiDaFu_DoubleClick);
			// 
			// dataGridTableStyle2
			// 
			this.dataGridTableStyle2.DataGrid = this.DG_XuQiuYiDaFu;
			this.dataGridTableStyle2.GridColumnStyles.AddRange(new System.Windows.Forms.DataGridColumnStyle[] {
																												  this.dataGridTextBoxColumn2_1,
																												  this.dataGridTextBoxColumn2_2,
																												  this.dataGridTextBoxColumn2_3,
																												  this.dataGridTextBoxColumn2_4,
																												  this.dataGridTextBoxColumn2_5,
																												  this.dataGridTextBoxColumn2_6,
																												  this.dataGridTextBoxColumn2_7,
																												  this.dataGridTextBoxColumn2_8});
			this.dataGridTableStyle2.HeaderForeColor = System.Drawing.SystemColors.ControlText;
			this.dataGridTableStyle2.MappingName = "XuQiu";
			// 
			// dataGridTextBoxColumn2_1
			// 
			this.dataGridTextBoxColumn2_1.Format = "yyyy-MM-dd";
			this.dataGridTextBoxColumn2_1.FormatInfo = null;
			this.dataGridTextBoxColumn2_1.HeaderText = "采集时间";
			this.dataGridTextBoxColumn2_1.MappingName = "CaiJiShiJian";
			this.dataGridTextBoxColumn2_1.NullText = "";
			this.dataGridTextBoxColumn2_1.Width = 75;
			// 
			// dataGridTextBoxColumn2_2
			// 
			this.dataGridTextBoxColumn2_2.Format = "";
			this.dataGridTextBoxColumn2_2.FormatInfo = null;
			this.dataGridTextBoxColumn2_2.HeaderText = "提出人";
			this.dataGridTextBoxColumn2_2.MappingName = "TiChuRen";
			this.dataGridTextBoxColumn2_2.NullText = "";
			this.dataGridTextBoxColumn2_2.Width = 75;
			// 
			// dataGridTextBoxColumn2_3
			// 
			this.dataGridTextBoxColumn2_3.Format = "";
			this.dataGridTextBoxColumn2_3.FormatInfo = null;
			this.dataGridTextBoxColumn2_3.HeaderText = "育妇编码";
			this.dataGridTextBoxColumn2_3.MappingName = "YuFuBianMa";
			this.dataGridTextBoxColumn2_3.NullText = "";
			this.dataGridTextBoxColumn2_3.Width = 75;
			// 
			// dataGridTextBoxColumn2_4
			// 
			this.dataGridTextBoxColumn2_4.Format = "";
			this.dataGridTextBoxColumn2_4.FormatInfo = null;
			this.dataGridTextBoxColumn2_4.HeaderText = "需求类别";
			this.dataGridTextBoxColumn2_4.MappingName = "XuQiuLeiBie";
			this.dataGridTextBoxColumn2_4.NullText = "";
			this.dataGridTextBoxColumn2_4.Width = 75;
			// 
			// dataGridTextBoxColumn2_5
			// 
			this.dataGridTextBoxColumn2_5.Format = "";
			this.dataGridTextBoxColumn2_5.FormatInfo = null;
			this.dataGridTextBoxColumn2_5.HeaderText = "答复人";
			this.dataGridTextBoxColumn2_5.MappingName = "DaFuRen";
			this.dataGridTextBoxColumn2_5.NullText = "";
			this.dataGridTextBoxColumn2_5.Width = 75;
			// 
			// dataGridTextBoxColumn2_6
			// 
			this.dataGridTextBoxColumn2_6.Format = "yyyy-MM-dd";
			this.dataGridTextBoxColumn2_6.FormatInfo = null;
			this.dataGridTextBoxColumn2_6.HeaderText = "答复时间";
			this.dataGridTextBoxColumn2_6.MappingName = "DaFuShiJian";
			this.dataGridTextBoxColumn2_6.NullText = "";
			this.dataGridTextBoxColumn2_6.Width = 75;
			// 
			// dataGridTextBoxColumn2_7
			// 
			this.dataGridTextBoxColumn2_7.Format = "";
			this.dataGridTextBoxColumn2_7.FormatInfo = null;
			this.dataGridTextBoxColumn2_7.HeaderText = "信息点编号";
			this.dataGridTextBoxColumn2_7.MappingName = "XinXiDianBianHao";
			this.dataGridTextBoxColumn2_7.NullText = "";
			this.dataGridTextBoxColumn2_7.Width = 75;
			// 
			// dataGridTextBoxColumn2_8
			// 
			this.dataGridTextBoxColumn2_8.Format = "";
			this.dataGridTextBoxColumn2_8.FormatInfo = null;
			this.dataGridTextBoxColumn2_8.HeaderText = "需求满意度";
			this.dataGridTextBoxColumn2_8.MappingName = "XuQiuManYiDu";
			this.dataGridTextBoxColumn2_8.NullText = "";
			this.dataGridTextBoxColumn2_8.Width = 75;
			// 
			// pictureBox1
			// 
			this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
			this.pictureBox1.Location = new System.Drawing.Point(360, 0);
			this.pictureBox1.Name = "pictureBox1";
			this.pictureBox1.Size = new System.Drawing.Size(248, 48);
			this.pictureBox1.TabIndex = 19;
			this.pictureBox1.TabStop = false;
			// 
			// XuQiuChaXunForm
			// 
			this.AutoScale = false;
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.ClientSize = new System.Drawing.Size(608, 401);
			this.Controls.Add(this.pictureBox1);
			this.Controls.Add(this.TAB_XuQiu);
			this.Controls.Add(this.BT_ShuanXin);
			this.Controls.Add(this.SB_ZhuangTai);
			this.Controls.Add(this.BT_XuQiuLuRu);
			this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
			this.MaximizeBox = false;
			this.MaximumSize = new System.Drawing.Size(616, 448);
			this.Menu = this.MM_CaiDan;
			this.MinimumSize = new System.Drawing.Size(616, 448);
			this.Name = "XuQiuChaXunForm";
			this.Text = "人口和计划生育管理信息系统 (FPMS) ：乡级系统";
			this.Closing += new System.ComponentModel.CancelEventHandler(this.XuQiuChaXunForm_Closing);
			this.Closed += new System.EventHandler(this.XuQiuChaXunForm_Closed);
			this.GB_JieGuo.ResumeLayout(false);
			((System.ComponentModel.ISupportInitialize)(this.DG_XuQiu)).EndInit();
			this.TAB_XuQiu.ResumeLayout(false);
			this.TAB_XuQiuWeiDaFu.ResumeLayout(false);
			this.TB_XuQiuYiDaFu.ResumeLayout(false);
			this.GB_XuQiuYiDaFu.ResumeLayout(false);
			((System.ComponentModel.ISupportInitialize)(this.DG_XuQiuYiDaFu)).EndInit();
			this.ResumeLayout(false);

		}

		/// <summary>
		/// 销毁控制器
		/// </summary>
		private void XiaoHui() 
		{
			//销毁控制器
			if(	jiemianKongZhi != null) 
			{
				try 
				{
					jiemianKongZhi.XiaoHui(); 
					
				}
				catch(Exception e) 
				{
					clsRiZhiChuLi.JiLuRiZhi(e.Message);  
				}
				finally
				{
					this.jiemianKongZhi = null;
				}
			}
		}

		#region 事件响应区域
		/// <summary>
		/// 主视图关闭
		/// </summary>
		private void XuQiuChaXunForm_Closed(object sender, System.EventArgs e)
		{
			this.XiaoHui(); 
		}

		/// <summary>
		/// 当前应用程序退出
		/// </summary>
		private void CurrentDomain_ProcessExit(object sender, EventArgs e)
		{
			
			this.XiaoHui(); 
		}
		/// <summary>
		/// 窗体关闭
		/// </summary>
		private void XuQiuChaXunForm_Closing(object sender, System.ComponentModel.CancelEventArgs e)
		{
			if(DialogResult.Yes != MessageBox.Show(this,
				"您确认退出系统?","提示信息",MessageBoxButtons.YesNo))
				e.Cancel=true;	
		}

		
		/// <summary>
		/// 刷新按钮单击响应事件
		/// </summary>
		private void BT_ShuanXin_Click(object sender, System.EventArgs e)
		{
			this.jiemianKongZhi.ShuJuChaXun(); 
		}		
		/// <summary>
		/// 刷新菜单项目单击响应事件
		/// </summary>
		private void MMI_ShuaXin_Click(object sender, System.EventArgs e)
		{
			this.jiemianKongZhi.ShuJuChaXun(); 
		}
		/// <summary>
		/// 需求录入按钮单击响应事件
		/// </summary>
		private void BT_XuQiuLuRu_Click(object sender, System.EventArgs e)
		{
			if(!this.jiemianKongZhi.ShiFouXuYaoXiaZai()) 
			{ 
				(new XuQiuLuRuForm (jiemianKongZhi,0,null)).ShowDialog() ;
			}
			else 
			{
				MessageBox.Show(this,"请单击刷新按钮下载基本数据！","提示信息");
			}
		}
		/// <summary>
		/// 需求录入菜单项目单击响应事件
		/// </summary>
		private void MMI_XuQiuLuRu_Click(object sender, System.EventArgs e)
		{
			BT_XuQiuLuRu_Click(sender,e);		
		}

		/// <summary>
		/// 退出按钮单击响应事件
		/// </summary>
		private void MMI_TuiChu_Click(object sender, System.EventArgs e)
		{
			this.Close();	
		}
		/// <summary>
		/// 调看按钮单击响应事件
		/// </summary>
		 
		/*
		private void BT_DiaoKan_Click(object sender, System.EventArgs e)
		{
			//服务器端传回的查询结果
			int hang = this.DG_XuQiu.CurrentRowIndex;
			XuQiuLuRuForm xinChuanTi = null;
			if(hang >= 0 ) 
			{
				DataSet ds = jiemianKongZhi.HuoDeShuJu(clsChangLiang.SHUJU_XUQIU,hang);
				xinChuanTi = new XuQiuLuRuForm(this.jiemianKongZhi,2,ds);
				xinChuanTi.Show() ;
			}
		}
		*/
		/// <summary>
		/// 未答复需求网格双击事件
		/// </summary>		
		private void DG_XuQiu_DoubleClick(object sender, System.EventArgs e)
		{
			//服务器端传回的查询结果
			int hang = this.DG_XuQiu.CurrentRowIndex;
			XuQiuLuRuForm xinChuanTi = null;
			if(hang >= 0 ) 
			{
				DataSet ds = jiemianKongZhi.HuoDeShuJu(clsChangLiang.SHUJU_XUQIU_WEIDAFU,hang);
				xinChuanTi = new XuQiuLuRuForm(this.jiemianKongZhi,2,ds);
				xinChuanTi.ShowDialog() ;
			}
		}
		/// <summary>
		/// 答复需求网格双击事件
		/// </summary>
		private void DG_XuQiuYiDaFu_DoubleClick(object sender, System.EventArgs e)
		{
			//服务器端传回的查询结果
			int hang = this.DG_XuQiu.CurrentRowIndex;
			XuQiuLuRuForm xinChuanTi = null;
			if(hang >= 0 ) 
			{
				DataSet ds = jiemianKongZhi.HuoDeShuJu(clsChangLiang.SHUJU_XUQIU_YIDAFU,hang);
				xinChuanTi = new XuQiuLuRuForm(this.jiemianKongZhi,2,ds);
				xinChuanTi.ShowDialog() ;
			}
		}
		/// <summary>
		/// 打开帮助窗体
		/// </summary>
		private void MMI_BangZhu_Click(object sender, System.EventArgs e)
		{
			BangZhuForm xinChuangTi = new BangZhuForm();
			xinChuangTi.ShowDialog();
		}
		/// <summary>
		/// 打开关于窗体
		/// </summary>
		private void MMI_GuanYu_Click(object sender, System.EventArgs e)
		{
			GuanYuForm xinChuangTi = new GuanYuForm();
			xinChuangTi.ShowDialog();
		}

		/// <summary>
		/// 时钟时间处理，根据时钟的Interval定时执行
		/// </summary>
		private void TM_ShuJuGengXin_Tick(object sender, System.EventArgs e)
		{
			//clsRiZhiChuLi.JiLuRiZhi(DateTime.Now.ToString());
			this.jiemianKongZhi.DingShiShuJuChaXun();
		}
		/// <summary>
		/// 上线菜单条单击事件响应
		/// </summary>
		private void MMI_ShangXian_Click(object sender, System.EventArgs e)
		{
			this.jiemianKongZhi.QiangZhiShangXian(); 
		}
		/// <summary>
		/// 离线菜单条单击事件响应
		/// </summary>
		private void MMI_LiXian_Click(object sender, System.EventArgs e)
		{
			this.jiemianKongZhi.QiangZhiLiXian();
		}

		#endregion

		#endregion

		#region 保护方法区域
		/// <summary>
		/// 清理所有正在使用的资源。
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			//销毁界面元素
			if( disposing )
			{
				if (components != null) 
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}
		
		#endregion

		#region 公共方法区域
		public XuQiuChaXunForm()
		{			
			//初始化界面元素
			InitializeComponent();
			//注册AppDomain退出事件响应
			AppDomain.CurrentDomain.ProcessExit +=new EventHandler(CurrentDomain_ProcessExit);
			//初始化控制器			
			try 
			{
				jiemianKongZhi =  new clsXuQiuChaXunKongZhi(this);
				jiemianKongZhi.YunXin(); 
			}
			catch(Exception e) 
			{
				clsRiZhiChuLi.JiLuRiZhi(e.Message) ;
				jiemianKongZhi = null;
			}
			
		}
		/// <summary>
		/// 是否构造成功
		/// </summary>
		/// <returns>true构造成功，false构造失败</returns>

		public bool GouZaoChengGong() 
		{
			return jiemianKongZhi == null? false:true;
		}
		
		// <summary>
		/// 连接状态变化
		/// </summary>
		/// <param name="shifouLianJie">是否连接</param>
		public void LianJieZhuangTai(bool shifouLianJie) 
		{
			//设置界面显示
			if(shifouLianJie) 
			{
				ShiZhiZhuangTai("网络已经接通！"); 
				this.MMI_LiXian.Enabled=true;
				this.MMI_ShangXian.Enabled=false;
			}
			else 
			{
				ShiZhiZhuangTai("网络已经断开！"); 
				this.MMI_LiXian.Enabled=false;
				this.MMI_ShangXian.Enabled=true;
			}			
		}		
		/// <summary>
		/// 设置状态条显示
		/// </summary>
		/// <param name="Zhi">显示值</param>
		public void ShiZhiZhuangTai(String Zhi) 
		{
			SB_ZhuangTai.Text = Zhi; 
		}

		/// <summary>
		/// 更新需求查询网格,2.0.0.0修改
		/// </summary>
		/// <param name="WeiDaFu">未答复的需求数据</param>
		/// <param name="YiDaFu">已答复的需求数据</param>		
		public void GengXinXuQiu(DataSet WeiDaFu,DataSet YiDaFu) 
		{
			this.xuqiuChaXunWeiDaFu  = WeiDaFu;
			this.xuqiuChaXunYiDaFu   = YiDaFu;
			MethodInvoker	fangfa  = new MethodInvoker(this.ShuaXinWangGe);
			this.BeginInvoke(fangfa);
		}
		
		/// <summary>
		/// 刷新网格
		/// </summary>
		public void ShuaXinWangGe() 
		{
			DataSet xinShuJu = null;
			System.Data.DataView xinShuJuShiTu= null;
			//更新未答复的需求网格
			if(xuqiuChaXunWeiDaFu.Tables.Count > 0) 
			{  
				xinShuJu = xuqiuChaXunWeiDaFu;
				xinShuJuShiTu = xuqiuChaXunWeiDaFu.Tables[0].DefaultView; 
			}
			this.DG_XuQiu.DataSource = xinShuJuShiTu;		
			//更新已答复的需求网格
			xinShuJu = null;
			xinShuJuShiTu= null;
			if(xuqiuChaXunYiDaFu.Tables.Count > 0) 
			{  
				xinShuJu = xuqiuChaXunYiDaFu;
				xinShuJuShiTu = xuqiuChaXunYiDaFu.Tables[0].DefaultView; 
			}
			this.DG_XuQiuYiDaFu.DataSource = xinShuJuShiTu;			
		}

		/// <summary>
		/// 设置未答复的数据源,2.0.0.0
		/// </summary>
		/// <param name="ShuJu"></param>
		public void  SheZhiShuJuYuan_WeiDaFu(DataSet ShuJu) 
		{			
			if(ShuJu !=null && ShuJu.Tables.Count != 0 ) 
			{
				this.DG_XuQiu.DataSource = ShuJu;			
				this.DG_XuQiu.DataMember =ShuJu.Tables[0].TableName;
			}
		}
		/// <summary>
		/// 设置未答复的数据源,2.0.0.0
		/// </summary>
		/// <param name="ShuJu"></param>
		public void  SheZhiShuJuYuan_YiDaFu(DataSet ShuJu) 
		{			
			if(ShuJu !=null && ShuJu.Tables.Count != 0 ) 
			{
				this.DG_XuQiuYiDaFu.DataSource = ShuJu;			
				this.DG_XuQiuYiDaFu.DataMember =ShuJu.Tables[0].TableName;
			}
		}


		/// <summary>
		/// 开始下载
		/// </summary>
		public void XiaZaiKaiShi(object sender, UpdaterActionEventArgs e) 
		{		
			this.SB_ZhuangTai.Text = "应用程序开始下载......";  
		}

		/// <summary>
		/// 下载结束
		/// </summary>
		public void XiaZaiJieShu(object sender, UpdaterActionEventArgs e) 
		{		
			this.SB_ZhuangTai.Text = "应用程序下载结束......";
		}

		/// <summary>
		/// 是否开始运行新的版本程序
		/// </summary>
		/// <param name="e"></param>
		/// <returns></returns>
		public bool YunXinChengXu(UpdaterActionEventArgs e) 
		{
			DialogResult dialog = 
				MessageBox.Show(this,"你是否现在就要运行最新的程序?", "程序提示", MessageBoxButtons.YesNo );
			if( DialogResult.Yes == dialog )
			{
				return true;
			}
			else 
			{
				return false;
			}

		}
		
		/// <summary>
		/// 设置时钟的运行状态
		/// </summary>
		/// <param name="ShiFouYunXing"></param>
		public void SheZhiTimer(bool ShiFouYunXing) 
		{
			this.TM_ShuJuGengXin.Enabled=ShiFouYunXing;
		}
		#endregion

		#region Main方法区域
		/// <summary>
		/// 应用程序的主入口点。
		/// </summary>
		[STAThread]
		static void Main() 
		{	
			try 
			{
				XuQiuChaXunForm jieMian = 	new XuQiuChaXunForm();
				if(jieMian.GouZaoChengGong())
				{
					Application.Run(jieMian);
				}
				else 
				{
					jieMian.Close(); 
					jieMian = null;
					MessageBox.Show("系统初始化错误，请查看应用程序输出日志获得更多信息");
				}
			}
			catch(Exception genException ) 
			{
				Console.WriteLine(genException.Message);
			}
		}

		
		#endregion

		

	}
}
