亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
亚洲一区二区三区四区在线 | 成人免费在线视频观看| 国产传媒一区在线| 国产区在线观看成人精品| 一级日本不卡的影视| 精品1区2区3区| 亚洲午夜私人影院| 欧美一区2区视频在线观看| 青青草伊人久久| 久久麻豆一区二区| 成人99免费视频| 亚洲五码中文字幕| 欧美大黄免费观看| 国产宾馆实践打屁股91| 亚洲免费高清视频在线| 欧美日韩国产精品自在自线| 日韩国产一区二| 久久久亚洲午夜电影| av电影在线不卡| 亚洲.国产.中文慕字在线| 欧美成人精品3d动漫h| 国产不卡免费视频| 亚洲一本大道在线| 亚洲精品一区二区精华| 97久久精品人人做人人爽50路| 五月天久久比比资源色| 久久伊人蜜桃av一区二区| av成人老司机| 日本亚洲一区二区| 欧美高清一级片在线观看| 91国产精品成人| 精品中文字幕一区二区小辣椒| 国产精品视频你懂的| 欧美主播一区二区三区美女| 久久成人久久爱| 亚洲老司机在线| 欧美成人一区二区三区在线观看| 不卡在线观看av| 日产国产高清一区二区三区| 欧美高清在线一区二区| 4438x亚洲最大成人网| 丰满放荡岳乱妇91ww| 亚洲大尺度视频在线观看| 国产午夜亚洲精品午夜鲁丝片 | 欧美日韩一区二区三区四区五区| 久久99精品国产91久久来源| 亚洲天堂免费看| 欧美电影免费观看高清完整版在线观看| 成人网在线免费视频| 丝袜美腿一区二区三区| 国产精品久久久久久久久免费丝袜 | 亚洲午夜精品在线| 国产清纯白嫩初高生在线观看91| 欧美视频你懂的| 懂色av中文一区二区三区| 日韩精品每日更新| 亚洲天天做日日做天天谢日日欢 | 亚洲欧洲韩国日本视频| 日韩美女在线视频| 欧美色图免费看| 成人av在线一区二区| 日韩avvvv在线播放| 亚洲三级在线观看| 国产日产欧美一区二区视频| 51午夜精品国产| 日本道色综合久久| 丁香亚洲综合激情啪啪综合| 日韩精品免费视频人成| 亚洲乱码国产乱码精品精小说| 国产日韩精品一区二区三区在线| 欧美精品黑人性xxxx| 色综合一区二区三区| 国产一区二区精品在线观看| 日韩精品三区四区| 一区二区三区四区不卡视频| 国产精品午夜在线| 久久亚洲二区三区| 婷婷国产v国产偷v亚洲高清| 中文字幕一区二区在线播放| 精品久久国产老人久久综合| 欧美疯狂做受xxxx富婆| 91久久国产最好的精华液| 99在线精品一区二区三区| 粉嫩欧美一区二区三区高清影视 | 丰满亚洲少妇av| 国产在线精品免费av| 老司机午夜精品| 偷拍一区二区三区四区| 亚洲成人自拍一区| 亚洲女同ⅹxx女同tv| 国产精品久久久久久久久果冻传媒| 久久久青草青青国产亚洲免观| 日韩欧美国产一二三区| 欧美日韩亚洲综合一区二区三区| 91麻豆免费看| 白白色 亚洲乱淫| 国产91高潮流白浆在线麻豆 | 国产精品久久毛片av大全日韩| 久久网站最新地址| 亚洲精品一区在线观看| 精品国产乱码久久久久久久 | 亚洲日本va午夜在线影院| 国产精品天干天干在线综合| 久久久久久综合| 国产欧美va欧美不卡在线| 国产日韩精品一区| 国产日本亚洲高清| 欧美国产激情一区二区三区蜜月 | 亚洲成a人片综合在线| 亚洲一区二区三区影院| 一区二区成人在线观看| 亚洲国产精品精华液网站| 午夜欧美视频在线观看 | av动漫一区二区| 99视频精品免费视频| 99re这里只有精品首页| 91麻豆精品秘密| 在线免费观看一区| 欧美日韩国产高清一区二区三区 | 欧美成人三级在线| 精品粉嫩超白一线天av| 国产婷婷一区二区| 欧美国产成人精品| 国产精品国产三级国产aⅴ中文 | 久久精品国内一区二区三区| 精品无码三级在线观看视频| 国产一区91精品张津瑜| 懂色一区二区三区免费观看 | 欧美人动与zoxxxx乱| 日韩三级.com| 久久久国产精华| 中文字幕一区在线观看| 一区二区三区四区在线播放| 午夜视频久久久久久| 裸体歌舞表演一区二区| 国产99久久久久| 色诱视频网站一区| 欧美日韩一区二区在线观看视频| 欧美一级理论片| 国产亚洲女人久久久久毛片| |精品福利一区二区三区| 亚洲午夜在线电影| 精品一区二区三区在线播放视频| 国产成人免费视频 | 色妞www精品视频| 欧美日本一区二区在线观看| 26uuu亚洲综合色欧美| 国产精品国产馆在线真实露脸 | 99久久精品国产导航| 欧美日韩亚洲不卡| 欧美精品一区二区在线观看| 亚洲欧美怡红院| 青青国产91久久久久久| 成人免费高清在线| 欧美日韩精品一区二区| 久久伊人中文字幕| 一区二区三区在线观看视频| 久久99精品久久久| 99精品视频在线观看| 91麻豆精品国产91久久久久久| 国产日韩欧美一区二区三区综合| 亚洲一区二区三区中文字幕在线| 捆绑调教一区二区三区| 99国产精品久久久久| 日韩亚洲欧美中文三级| 国产精品久久久久久久午夜片 | 成人h版在线观看| 欧美美女一区二区三区| 久久久久久久久久久黄色| 一个色妞综合视频在线观看| 美女精品自拍一二三四| 91麻豆成人久久精品二区三区| 欧美videos大乳护士334| 中文字幕亚洲视频| 久久精品国产一区二区| 91极品视觉盛宴| 国产三级精品视频| 日韩精品一级二级| 91欧美一区二区| 久久综合九色综合欧美98| 亚洲国产精品综合小说图片区| 国产福利电影一区二区三区| 欧美精品三级日韩久久| 国产精品沙发午睡系列990531| 日产精品久久久久久久性色 | 91老师片黄在线观看| 精品盗摄一区二区三区| 亚洲五月六月丁香激情| 成人国产精品免费观看视频| 日韩小视频在线观看专区| 一区二区三区资源| 国产成人av一区二区三区在线观看| 欧美精品1区2区| 亚洲天堂免费在线观看视频| 国产精品77777竹菊影视小说| 欧美日韩卡一卡二| 亚洲欧美日韩在线不卡| 成人亚洲精品久久久久软件| 欧美v亚洲v综合ⅴ国产v| 五月激情综合婷婷|