亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? clientdatamanage.cs

?? 進銷存管理系統
?? CS
字號:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

namespace 進銷存管理系統
{
	/// <summary>
	/// ClientDataManage 的摘要說明。
	/// </summary>
	public class ClientDataManage : System.Windows.Forms.Form
	{
		private DataSet ds = new DataSet();
		private	LinkDataBase link = new LinkDataBase();	
		private string sendTableName = "客戶清單";
		private string sendStrSQL = "SELECT 客戶編號, 拼音編碼, 名稱, 聯系人, 地址, 郵編, 區號, 地區, 電話, 傳真, 電報, 簡稱, 開戶行, 開戶行郵編, 銀行帳號, 稅號, 性質, 業務員, 業務部門, 授信額度 FROM 客戶清單";

		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.TextBox txt_WareWord;
		private System.Windows.Forms.Button btn_Search;
		private System.Windows.Forms.GroupBox groupBox1;
		private System.Windows.Forms.ToolBar toolBar1;
		private System.Windows.Forms.ToolBarButton tbarBtnSave;
		private System.Windows.Forms.ToolBarButton tbarBtnDelete;
		private System.Windows.Forms.ImageList imageList1;
		private System.Windows.Forms.DataGrid dgrd_ClientData;
		private System.ComponentModel.IContainer components;

		public ClientDataManage()
		{
			//
			// Windows 窗體設計器支持所必需的
			//
			InitializeComponent();

			//
			// TODO: 在 InitializeComponent 調用后添加任何構造函數代碼
			//
		}

		//------------重載構造函數,判斷窗體調用原因-------------
		public ClientDataManage(bool blToolBarShow)
		{
			//
			// Windows 窗體設計器支持所必需的
			//
			InitializeComponent();

			//
			// TODO: 在 InitializeComponent 調用后添加任何構造函數代碼
			//
			this.ds = this.link.SelectDataBase(sendStrSQL,sendTableName);
			//如果blToolBarShow為false,則表示該窗體使由銷售單和進貨單雙擊時生成
			this.DataGridStateControl(blToolBarShow); 
			this.dgrd_ClientData.DataSource = ds.Tables[0];
			this.toolBar1.Enabled = blToolBarShow;
		}

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

		#region Windows 窗體設計器生成的代碼
		/// <summary>
		/// 設計器支持所需的方法 - 不要使用代碼編輯器修改
		/// 此方法的內容。
		/// </summary>
		private void InitializeComponent()
		{
			this.components = new System.ComponentModel.Container();
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(ClientDataManage));
			this.dgrd_ClientData = new System.Windows.Forms.DataGrid();
			this.label1 = new System.Windows.Forms.Label();
			this.txt_WareWord = new System.Windows.Forms.TextBox();
			this.btn_Search = new System.Windows.Forms.Button();
			this.groupBox1 = new System.Windows.Forms.GroupBox();
			this.toolBar1 = new System.Windows.Forms.ToolBar();
			this.tbarBtnSave = new System.Windows.Forms.ToolBarButton();
			this.tbarBtnDelete = new System.Windows.Forms.ToolBarButton();
			this.imageList1 = new System.Windows.Forms.ImageList(this.components);
			((System.ComponentModel.ISupportInitialize)(this.dgrd_ClientData)).BeginInit();
			this.groupBox1.SuspendLayout();
			this.SuspendLayout();
			// 
			// dgrd_ClientData
			// 
			this.dgrd_ClientData.AllowSorting = false;
			this.dgrd_ClientData.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
				| System.Windows.Forms.AnchorStyles.Left) 
				| System.Windows.Forms.AnchorStyles.Right)));
			this.dgrd_ClientData.CaptionVisible = false;
			this.dgrd_ClientData.DataMember = "";
			this.dgrd_ClientData.HeaderForeColor = System.Drawing.SystemColors.ControlText;
			this.dgrd_ClientData.Location = new System.Drawing.Point(0, 74);
			this.dgrd_ClientData.Name = "dgrd_ClientData";
			this.dgrd_ClientData.Size = new System.Drawing.Size(720, 350);
			this.dgrd_ClientData.TabIndex = 3;
			this.dgrd_ClientData.DoubleClick += new System.EventHandler(this.dgrd_ClientData_DoubleClick);
			// 
			// label1
			// 
			this.label1.Location = new System.Drawing.Point(172, 19);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(72, 16);
			this.label1.TabIndex = 14;
			this.label1.Text = "客戶拼音:";
			// 
			// txt_WareWord
			// 
			this.txt_WareWord.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
				| System.Windows.Forms.AnchorStyles.Right)));
			this.txt_WareWord.Location = new System.Drawing.Point(259, 13);
			this.txt_WareWord.Name = "txt_WareWord";
			this.txt_WareWord.Size = new System.Drawing.Size(224, 21);
			this.txt_WareWord.TabIndex = 1;
			this.txt_WareWord.Text = "";
			// 
			// btn_Search
			// 
			this.btn_Search.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
			this.btn_Search.Location = new System.Drawing.Point(499, 13);
			this.btn_Search.Name = "btn_Search";
			this.btn_Search.Size = new System.Drawing.Size(48, 24);
			this.btn_Search.TabIndex = 2;
			this.btn_Search.Text = "查詢";
			this.btn_Search.Click += new System.EventHandler(this.btn_Search_Click);
			// 
			// groupBox1
			// 
			this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
				| System.Windows.Forms.AnchorStyles.Right)));
			this.groupBox1.Controls.Add(this.label1);
			this.groupBox1.Controls.Add(this.txt_WareWord);
			this.groupBox1.Controls.Add(this.btn_Search);
			this.groupBox1.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
			this.groupBox1.Location = new System.Drawing.Point(1, 23);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new System.Drawing.Size(718, 50);
			this.groupBox1.TabIndex = 15;
			this.groupBox1.TabStop = false;
			// 
			// toolBar1
			// 
			this.toolBar1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
			this.toolBar1.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {
																						this.tbarBtnSave,
																						this.tbarBtnDelete});
			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(720, 29);
			this.toolBar1.TabIndex = 4;
			this.toolBar1.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.toolBar1_ButtonClick);
			// 
			// tbarBtnSave
			// 
			this.tbarBtnSave.ImageIndex = 0;
			this.tbarBtnSave.ToolTipText = "保存修改";
			// 
			// tbarBtnDelete
			// 
			this.tbarBtnDelete.ImageIndex = 1;
			this.tbarBtnDelete.ToolTipText = "刪除數據";
			// 
			// 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;
			// 
			// ClientDataManage
			// 
			this.AcceptButton = this.btn_Search;
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.ClientSize = new System.Drawing.Size(720, 421);
			this.Controls.Add(this.toolBar1);
			this.Controls.Add(this.groupBox1);
			this.Controls.Add(this.dgrd_ClientData);
			this.Name = "ClientDataManage";
			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
			this.Text = "【客戶信息維護】";
			((System.ComponentModel.ISupportInitialize)(this.dgrd_ClientData)).EndInit();
			this.groupBox1.ResumeLayout(false);
			this.ResumeLayout(false);

		}
		#endregion

		//------------根據用戶的輸入客戶拼音編碼來搜索客戶信息----------
		private void btn_Search_Click(object sender, System.EventArgs e)
		{
			string strSpellWord = this.txt_WareWord.Text.Trim();
			string tempStrSQL = "select * from 客戶清單 where 拼音編碼 like '" + strSpellWord + "%'";
			this.link.SelectDataBase(tempStrSQL,sendTableName);
		}

		//--------------處理保存,刪除,退出等事務---------------
		private void toolBar1_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
		{
			if (e.Button.ToolTipText == "保存修改")
			{
				try
				{
					int row = this.dgrd_ClientData.CurrentCell.RowNumber;
					//將當前所在行往下移動一行,為便于實現同步保存
					//(否則會出現修改的最后一行無法保存,因為它還處于編輯狀態)
					this.dgrd_ClientData.CurrentCell = new DataGridCell(row+1,0); 
					if (this.ds.HasChanges())
					{
						this.link.UpdateDataBase(this.ds.GetChanges(),sendTableName);
						MessageBox.Show("數據修改成功!","信息");
					}
					else
					{
						MessageBox.Show("沒有修改的數據!");
						return;
					}

				}
				catch
				{
					MessageBox.Show("數據保存失敗,請確認所有信息輸入完整且正確!","提示");
					return;
				}
			}

			if (e.Button.ToolTipText == "刪除數據")
			{
				if (MessageBox.Show("確實要刪除這條記錄嗎?","詢問",MessageBoxButtons.YesNo) == DialogResult.Yes)
				{
					int intRowNumber = this.dgrd_ClientData.CurrentCell.RowNumber;
					try
					{
						this.ds.Tables[0].Rows[intRowNumber].Delete();
						this.link.UpdateDataBase(this.ds.GetChanges(),sendTableName);
						MessageBox.Show("數據刪除成功!","信息");
					
					}
					catch
					{
						MessageBox.Show("該數據不能刪除!","提示");
						string tempStrSQL = "select * from " + sendTableName;
						this.link.SelectDataBase(tempStrSQL,sendTableName);
						return;
					}
				}
			}
		}


		//------------設置表格格式--------------
		private void DataGridStateControl(bool blReadonly)
		{
			DataGridTableStyle ts = new DataGridTableStyle();
			ts.AlternatingBackColor = Color.LightGray;
			ts.MappingName = this.ds.Tables[0].TableName;
			ts.AllowSorting = false;
			int numCols = this.ds.Tables[0].Columns.Count;
			for (int i = 0;i< numCols;i++)
			{
				if (blReadonly == true)
				{
					//生成下拉列表框的列
					if ( i == 3)
					{
						DataTable tempTable = new DataTable();
						tempTable = this.link.SelectDataBase("select 姓名 from 業務員清單");
						DataGridComboBoxColumn aComboBoxColumn = new DataGridComboBoxColumn(tempTable,0,0);
						aComboBoxColumn.MappingName = this.ds.Tables[0].Columns[i].ColumnName;
						aComboBoxColumn.HeaderText = this.ds.Tables[0].Columns[i].ColumnName;
						aComboBoxColumn.NullText = "";
						ts.GridColumnStyles.Add(aComboBoxColumn);
					}
					else
					{
						DataGridTextBoxColumn aColumnTextColumn = new DataGridTextBoxColumn();
						aColumnTextColumn.MappingName = this.ds.Tables[0].Columns[i].ColumnName;
						aColumnTextColumn.HeaderText = this.ds.Tables[0].Columns[i].ColumnName;
						aColumnTextColumn.NullText = "";
						aColumnTextColumn.Format = "F";
						ts.GridColumnStyles.Add(aColumnTextColumn);
					}
				}
				else
				{
					DataGridNoActiveCellColumn	aColumnTextColumn = new DataGridNoActiveCellColumn();
					aColumnTextColumn.MappingName = this.ds.Tables[0].Columns[i].ColumnName;
					aColumnTextColumn.HeaderText = this.ds.Tables[0].Columns[i].ColumnName;
					aColumnTextColumn.NullText = "";
					aColumnTextColumn.Format = "F";
					ts.GridColumnStyles.Add(aColumnTextColumn);
				}
			}
			this.dgrd_ClientData.TableStyles.Add(ts);
		}

		//---------------其他窗體調用客戶信息窗體,雙擊選擇數據并回送--------------
		private void dgrd_ClientData_DoubleClick(object sender, System.EventArgs e)
		{
			if (this.dgrd_ClientData.ReadOnly == true) //判斷如果是在銷售單中生成的窗體則不響應DataGrid的雙擊事件
			{
				int intCurrentRowNumber = this.dgrd_ClientData.CurrentCell.RowNumber;
				string sendClientID,sendClientName;
				sendClientID = this.dgrd_ClientData[intCurrentRowNumber,0].ToString().Trim();
				sendClientName = this.dgrd_ClientData[intCurrentRowNumber,2].ToString().Trim();
				string [] sendArray = new string [] {sendClientID,sendClientName};
				SellTable.inputTextDataArray[0] = sendArray[0];
				SellTable.inputTextDataArray[1] = sendArray[1];
				this.Close();
			}
		}

		public void setDataGridReadOnly()
		{
			this.dgrd_ClientData.ReadOnly = true;
		}
	}
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人免费看片app下载| 久久久蜜桃精品| 日本成人超碰在线观看| 欧美成人官网二区| proumb性欧美在线观看| 亚洲一区二区三区自拍| 日韩免费高清av| 色中色一区二区| 久久99国产精品尤物| 亚洲少妇屁股交4| 久久久99精品免费观看| 色天天综合久久久久综合片| 久久99久久久欧美国产| 亚洲欧美乱综合| 欧美tk—视频vk| 538在线一区二区精品国产| 国产成人99久久亚洲综合精品| 亚洲黄色小视频| 国产精品色婷婷| 2023国产精品自拍| 日韩午夜中文字幕| 在线视频国产一区| 懂色中文一区二区在线播放| 国内精品嫩模私拍在线| 日本伊人色综合网| 日韩制服丝袜先锋影音| 日韩精品亚洲一区二区三区免费| 亚洲黄色av一区| 亚洲国产一区在线观看| 亚洲妇女屁股眼交7| 亚洲国产精品人人做人人爽| 亚洲一区二区三区自拍| 日韩av网站免费在线| 日韩二区在线观看| 久久精品国产成人一区二区三区 | www国产精品av| 欧美激情一区在线| 亚洲天天做日日做天天谢日日欢 | 欧美日韩在线不卡| 欧美日韩一区二区三区视频| 国产成人综合视频| 欧美在线一二三四区| 7777精品久久久大香线蕉 | 成人av电影在线观看| 91污在线观看| 精品美女一区二区| 亚洲激情图片小说视频| 日韩一区欧美二区| 93久久精品日日躁夜夜躁欧美| 欧美三级韩国三级日本一级| 精品福利二区三区| 亚洲在线成人精品| 国内精品伊人久久久久av一坑| 97久久精品人人做人人爽50路| 欧美日韩电影在线播放| 欧美韩日一区二区三区| 午夜成人免费电影| 日本精品视频一区二区三区| 精品精品欲导航| 亚洲一区二区免费视频| 成人免费毛片嘿嘿连载视频| 国产精品国产a级| 精品亚洲欧美一区| 91精品国产高清一区二区三区 | 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 91国在线观看| 一个色综合av| 欧美亚洲综合色| 一区二区三区高清| 欧美性xxxxxxxx| 亚洲一区二区三区中文字幕在线| 成人免费高清在线| 中文字幕 久热精品 视频在线| 精品在线一区二区三区| 欧美一区二区在线观看| 美女在线一区二区| 日韩精品一区二区三区视频在线观看| 五月婷婷色综合| 久久亚洲精品国产精品紫薇| 国产成人免费视频网站高清观看视频| 欧美精品日韩精品| 蜜臀av国产精品久久久久| 精品国产免费一区二区三区四区| 精品一区二区在线看| 亚洲欧洲精品成人久久奇米网| 欧美日韩在线播放三区| 精品一区二区三区影院在线午夜 | 色综合激情久久| 免费高清在线一区| 亚洲欧美综合另类在线卡通| 99亚偷拍自图区亚洲| 日韩精品电影一区亚洲| 国产人妖乱国产精品人妖| 在线观看免费成人| 国产91丝袜在线播放| 日本在线播放一区二区三区| 国产精品不卡视频| 日韩欧美中文字幕一区| 91天堂素人约啪| 国产成人av一区二区三区在线 | 日本伦理一区二区| 国产在线精品一区在线观看麻豆| 一区二区在线观看免费| 国产婷婷色一区二区三区在线| 欧美日精品一区视频| 在线亚洲一区二区| 99国产一区二区三精品乱码| 国产精品一区二区在线播放 | 免费欧美日韩国产三级电影| 亚洲a一区二区| 亚洲精品日产精品乱码不卡| 中文字幕巨乱亚洲| 国产精品久久久久久久久免费桃花 | 91色视频在线| 欧美日韩一二区| 69久久夜色精品国产69蝌蚪网| 欧美日韩午夜影院| 7777精品伊人久久久大香线蕉最新版| 91成人在线精品| 欧美精品v国产精品v日韩精品| 欧美日韩亚洲不卡| 精品国产一二三区| 国产精品毛片久久久久久| 成人免费在线播放视频| 亚洲一区二区三区四区在线免费观看| 亚洲伦理在线精品| 日本麻豆一区二区三区视频| 国产一区二区0| 一本色道久久综合亚洲aⅴ蜜桃| 色94色欧美sute亚洲线路一久 | 欧美一级片免费看| 中文字幕不卡一区| 丝袜国产日韩另类美女| 国产高清亚洲一区| 日本二三区不卡| 久久天天做天天爱综合色| 亚洲美女少妇撒尿| 国产成人自拍在线| 337p粉嫩大胆色噜噜噜噜亚洲| 亚洲精品国产精华液| 不卡大黄网站免费看| 久久伊人蜜桃av一区二区| 亚洲综合色噜噜狠狠| 91网页版在线| 亚洲欧美在线视频观看| 国产乱淫av一区二区三区| 91精品啪在线观看国产60岁| 国产高清不卡一区| 国产精品69毛片高清亚洲| 欧美婷婷六月丁香综合色| 久久久九九九九| 免费在线欧美视频| 欧美肥胖老妇做爰| 午夜精品久久久久久不卡8050| 97久久精品人人爽人人爽蜜臀 | 欧美一区二区三区男人的天堂| 亚洲裸体xxx| 欧美日韩精品高清| 亚洲va韩国va欧美va精品| 欧美三级电影网站| 日韩va欧美va亚洲va久久| 日韩欧美国产不卡| 国产精品亚洲一区二区三区在线| 精品国产伦一区二区三区观看方式| 美国十次综合导航| 国产片一区二区三区| 91视频www| 秋霞影院一区二区| 中文幕一区二区三区久久蜜桃| av激情综合网| 麻豆久久久久久| 国产精品水嫩水嫩| 3atv在线一区二区三区| 国产一区亚洲一区| 尤物视频一区二区| 日韩欧美成人一区| 99久久精品国产毛片| 久草中文综合在线| 综合自拍亚洲综合图不卡区| 日韩视频一区二区在线观看| www.欧美色图| 国产激情视频一区二区在线观看| 亚洲乱码日产精品bd| 26uuu亚洲综合色| 欧美色图在线观看| 97久久精品人人做人人爽50路| 麻豆精品国产传媒mv男同| 亚洲另类在线视频| 久久女同性恋中文字幕| 欧美日韩免费一区二区三区视频| 国产成人精品影视| 激情六月婷婷久久| 激情综合色丁香一区二区| 日本不卡视频在线| 日韩精品亚洲一区二区三区免费| 亚洲午夜一区二区| 夜色激情一区二区| 亚洲国产裸拍裸体视频在线观看乱了| 国产精品美女久久久久久久| 日本一区二区综合亚洲|