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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? popedommanage.cs

?? Csharp進(jìn)銷存軟件源代碼
?? CS
字號(hào):
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

namespace 進(jìn)銷存管理系統(tǒng)
{
	/// <summary>
	/// PopedomManage 的摘要說明。
	/// </summary>
	public class PopedomManage : System.Windows.Forms.Form
	{
		//設(shè)置數(shù)據(jù)庫連接和適配器
		private DataSet ds = new DataSet();
		private	LinkDataBase link = new LinkDataBase();	
		private string sendTableName = "用戶清單";
		private string sendStrSQL = "SELECT * from 用戶清單 where 姓名<>'sys'";
		private DataTable popedomDataTable = new DataTable();
		private bool blInitial = true;

		private System.Windows.Forms.GroupBox groupBox1;
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.Label label2;
		private System.Windows.Forms.CheckedListBox chkLst_Priority;
		private System.Windows.Forms.DataGrid dgrd_Popedom;
		/// <summary>
		/// 必需的設(shè)計(jì)器變量。
		/// </summary>
		private System.ComponentModel.Container components = null;

		public PopedomManage()
		{
			//
			// Windows 窗體設(shè)計(jì)器支持所必需的
			//
			InitializeComponent();

			//
			// TODO: 在 InitializeComponent 調(diào)用后添加任何構(gòu)造函數(shù)代碼
			//
		}

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

		#region Windows 窗體設(shè)計(jì)器生成的代碼
		/// <summary>
		/// 設(shè)計(jì)器支持所需的方法 - 不要使用代碼編輯器修改
		/// 此方法的內(nèi)容。
		/// </summary>
		private void InitializeComponent()
		{
			this.groupBox1 = new System.Windows.Forms.GroupBox();
			this.chkLst_Priority = new System.Windows.Forms.CheckedListBox();
			this.label2 = new System.Windows.Forms.Label();
			this.label1 = new System.Windows.Forms.Label();
			this.dgrd_Popedom = new System.Windows.Forms.DataGrid();
			this.groupBox1.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)(this.dgrd_Popedom)).BeginInit();
			this.SuspendLayout();
			// 
			// groupBox1
			// 
			this.groupBox1.Controls.Add(this.chkLst_Priority);
			this.groupBox1.Controls.Add(this.label2);
			this.groupBox1.Controls.Add(this.label1);
			this.groupBox1.Controls.Add(this.dgrd_Popedom);
			this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
			this.groupBox1.Location = new System.Drawing.Point(0, 0);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new System.Drawing.Size(648, 357);
			this.groupBox1.TabIndex = 0;
			this.groupBox1.TabStop = false;
			// 
			// chkLst_Priority
			// 
			this.chkLst_Priority.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
				| System.Windows.Forms.AnchorStyles.Right)));
			this.chkLst_Priority.CheckOnClick = true;
			this.chkLst_Priority.Items.AddRange(new object[] {
																 "商品資料維護(hù)",
																 "供貨商資料維護(hù)",
																 "客戶資料維護(hù)",
																 "進(jìn)貨單",
																 "銷售單",
																 "庫存查詢",
																 "權(quán)限管理"});
			this.chkLst_Priority.Location = new System.Drawing.Point(456, 52);
			this.chkLst_Priority.Name = "chkLst_Priority";
			this.chkLst_Priority.Size = new System.Drawing.Size(172, 276);
			this.chkLst_Priority.TabIndex = 2;
			this.chkLst_Priority.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.chkLst_Priority_ItemCheck);
			// 
			// label2
			// 
			this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
			this.label2.Location = new System.Drawing.Point(450, 28);
			this.label2.Name = "label2";
			this.label2.Size = new System.Drawing.Size(100, 16);
			this.label2.TabIndex = 5;
			this.label2.Text = "權(quán)限:";
			// 
			// label1
			// 
			this.label1.Location = new System.Drawing.Point(33, 28);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(100, 16);
			this.label1.TabIndex = 4;
			this.label1.Text = "用戶:";
			// 
			// dgrd_Popedom
			// 
			this.dgrd_Popedom.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_Popedom.CaptionVisible = false;
			this.dgrd_Popedom.DataMember = "";
			this.dgrd_Popedom.HeaderForeColor = System.Drawing.SystemColors.ControlText;
			this.dgrd_Popedom.Location = new System.Drawing.Point(26, 52);
			this.dgrd_Popedom.Name = "dgrd_Popedom";
			this.dgrd_Popedom.ReadOnly = true;
			this.dgrd_Popedom.Size = new System.Drawing.Size(412, 274);
			this.dgrd_Popedom.TabIndex = 1;
			this.dgrd_Popedom.MouseUp += new System.Windows.Forms.MouseEventHandler(this.dgrd_Popedom_MouseUp);
			// 
			// PopedomManage
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.ClientSize = new System.Drawing.Size(648, 357);
			this.Controls.Add(this.groupBox1);
			this.Name = "PopedomManage";
			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
			this.Text = "【權(quán)限管理】";
			this.Load += new System.EventHandler(this.PopedomManage_Load);
			this.groupBox1.ResumeLayout(false);
			((System.ComponentModel.ISupportInitialize)(this.dgrd_Popedom)).EndInit();
			this.ResumeLayout(false);

		}
		#endregion
        //---------窗體創(chuàng)建時(shí),將用戶的權(quán)限數(shù)據(jù)讀入并顯示-----------
		private void PopedomManage_Load(object sender, System.EventArgs e)
		{
			this.ds = this.link.SelectDataBase(sendStrSQL,sendTableName);
			this.dgrd_Popedom.DataSource = ds.Tables[0];
			this.DataGridStateControl();

			this.dgrd_Popedom.Select(0);//窗體生成后選中第一行
			string selectedUserID = this.ds.Tables[0].Rows[0][0].ToString();//默認(rèn)選中用戶清單中的第一個(gè)用戶
			string tempStrSQL = "select 權(quán)限名稱 from 權(quán)限清單 " + " where 用戶編號(hào) = '" + selectedUserID + "'";
			popedomDataTable = link.SelectDataBase(tempStrSQL);//讀入該用戶的權(quán)限
			for (int i=0;i<popedomDataTable.Rows.Count;i++)//根據(jù)權(quán)限設(shè)置ListBox
			{
				for (int j=0;j<this.chkLst_Priority.Items.Count;j++)
				{
					if (this.chkLst_Priority.Items[j].ToString().Trim() == popedomDataTable.Rows[i][0].ToString().Trim())
					{
						this.chkLst_Priority.SetItemChecked(j,true);
					}
				}
			}
		}

		//-------------設(shè)置顯示用戶信息的表---------------
		private void DataGridStateControl()
		{
			DataGridTableStyle ts = new DataGridTableStyle();
			DataGridNoActiveCellColumn aColumnTextColumn;//設(shè)置dataGrid格式
			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++)
			{
				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_Popedom.TableStyles.Add(ts);
		}

		
		//-------------改變用戶的權(quán)限,并向數(shù)據(jù)庫中提交----------------
		private void chkLst_Priority_ItemCheck(object sender, System.Windows.Forms.ItemCheckEventArgs e)
		{
			//CheckedListBox控件中的Item的CheckedState屬性是由點(diǎn)擊CheckedListBox控件而改變時(shí)才響應(yīng)該事件
			if (blInitial == false)
			{
				if (e.CurrentValue.ToString() == "Unchecked")
				{
					try
					{
						string strUserName = this.dgrd_Popedom[this.dgrd_Popedom.CurrentCell.RowNumber,0].ToString().Trim();
						string strPopedom = this.chkLst_Priority.SelectedItem.ToString();
						string tempSendStrSQL = "insert 權(quán)限清單 (用戶編號(hào),權(quán)限名稱) values ('" + strUserName +"','"+ strPopedom +"')";
						this.link.UpdateDataBase(tempSendStrSQL);
					}
					catch
					{
						MessageBox.Show("數(shù)據(jù)庫中的權(quán)限修改出錯(cuò),請(qǐng)重試!","信息");
					}
				}
				else if (e.CurrentValue.ToString() == "Checked")
				{
					try
					{
						string strUserName = this.dgrd_Popedom[this.dgrd_Popedom.CurrentCell.RowNumber,0].ToString().Trim();
						string strPopedom = this.chkLst_Priority.SelectedItem.ToString();
						string tempSendStrSQL = "delete from 權(quán)限清單 where (用戶編號(hào) = '" + strUserName +"'" +
							" and 權(quán)限名稱 = '" + strPopedom + "')";
						this.link.UpdateDataBase(tempSendStrSQL);
					}
					catch
					{
						MessageBox.Show("數(shù)據(jù)庫中的權(quán)限修改出錯(cuò)!","信息");
					}
				}
			}
		}

		private void dgrd_Popedom_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
		{
			if (this.dgrd_Popedom.CurrentCell.RowNumber >= this.ds.Tables[0].Rows.Count)//防止出現(xiàn)所選的用戶不在數(shù)據(jù)表中的情況
			{
				return;
			}
			this.chkLst_Priority.Enabled = true;
			blInitial = true; //控制當(dāng)【權(quán)限管理】窗體剛生成時(shí)和點(diǎn)擊其他用戶時(shí)使CheckedListBox控件中數(shù)據(jù)發(fā)生改變時(shí)不響應(yīng)ItemCheck事件
			//以下代碼實(shí)現(xiàn)的是當(dāng)dataGrid中所選用戶改變時(shí),根據(jù)選中用戶權(quán)限重新設(shè)置listBox的功能
			for (int i=0;i<this.chkLst_Priority.Items.Count;i++)//將listBox中所有權(quán)限設(shè)為未選中
			{
				this.chkLst_Priority.SetItemChecked(i,false);
			}
			int intRowNumber = this.dgrd_Popedom.CurrentCell.RowNumber;
			string selectedUserID = this.ds.Tables[0].Rows[intRowNumber][0].ToString();
			string tempStrSQL = "select 權(quán)限名稱 from 權(quán)限清單 " + " where 用戶編號(hào) = '" + selectedUserID + "'";
			popedomDataTable = link.SelectDataBase(tempStrSQL);//查詢所選用戶權(quán)限
			for (int i=0;i<popedomDataTable.Rows.Count;i++)//重新設(shè)置listBox
			{
				for (int j=0;j<this.chkLst_Priority.Items.Count;j++)
				{
					if (this.chkLst_Priority.Items[j].ToString().Trim() == popedomDataTable.Rows[i][0].ToString().Trim())
					{
						this.chkLst_Priority.SetItemChecked(j,true);
					}
				}
			}			
			blInitial = false;
		}
	}
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩欧美国产一区二区三区| 国产精品一区二区在线播放| 日本不卡视频一二三区| 免费看日韩a级影片| 国产成人在线影院| 色婷婷综合久色| 欧美一区2区视频在线观看| 久久久久国产精品人| 亚洲欧美另类在线| 蜜臀av一区二区三区| av在线播放不卡| 欧美日韩国产精品自在自线| 久久久一区二区三区| 亚洲免费电影在线| 久久99在线观看| eeuss鲁一区二区三区| 欧美精品乱人伦久久久久久| 欧美激情在线一区二区三区| 日日夜夜一区二区| 丁香啪啪综合成人亚洲小说| 欧美电影影音先锋| 亚洲国产成人自拍| 日韩va亚洲va欧美va久久| 不卡视频在线看| 日韩一区二区中文字幕| 亚洲人妖av一区二区| 免费高清不卡av| 91福利资源站| 欧美激情综合网| 男男gaygay亚洲| 色综合天天综合| 久久久高清一区二区三区| 亚洲一区二区在线观看视频| 国产福利一区在线观看| 3751色影院一区二区三区| 亚洲视频中文字幕| 国产一区二区三区美女| 欧美日韩国产首页| 亚洲日穴在线视频| 国产剧情一区在线| 91精品午夜视频| 亚洲精品综合在线| 高清在线成人网| 精品噜噜噜噜久久久久久久久试看| 亚洲黄网站在线观看| 不卡视频在线观看| 国产欧美一区二区精品久导航 | 99久久er热在这里只有精品66| 欧美一级久久久久久久大片| 亚洲精品中文在线| 99久久久久免费精品国产 | 国产精一区二区三区| 9191成人精品久久| 夜夜亚洲天天久久| 成人av在线一区二区| 国产亚洲欧美一区在线观看| 卡一卡二国产精品 | 狠狠色伊人亚洲综合成人| 欧美浪妇xxxx高跟鞋交| 亚洲一区二区三区四区五区黄| av福利精品导航| 国产精品人成在线观看免费| 久久aⅴ国产欧美74aaa| 欧美大片一区二区三区| 另类小说综合欧美亚洲| 日韩精品一区二区三区视频播放| 欧美日韩一卡二卡| 亚洲美女淫视频| 91成人免费在线视频| 伊人婷婷欧美激情| 91久久精品一区二区二区| 综合久久久久久| 91女神在线视频| 亚洲色图欧美激情| 日本久久一区二区| 亚洲影视在线播放| 欧美疯狂性受xxxxx喷水图片| 亚洲观看高清完整版在线观看| 精品污污网站免费看| 天堂va蜜桃一区二区三区| 正在播放亚洲一区| 麻豆视频观看网址久久| 欧美成人猛片aaaaaaa| 国产真实乱偷精品视频免| 国产欧美一二三区| 91在线观看一区二区| 伊人色综合久久天天| 欧美色网站导航| 日精品一区二区三区| 日韩精品一区二| 国产91露脸合集magnet| 中文字幕亚洲综合久久菠萝蜜| 91蜜桃在线免费视频| 亚洲一二三区视频在线观看| 91麻豆精品国产91| 国产中文一区二区三区| 国产精品久久久久aaaa| 在线观看国产精品网站| 蜜臀国产一区二区三区在线播放| 久久综合九色综合欧美就去吻 | 最好看的中文字幕久久| 欧美三级一区二区| 麻豆91精品91久久久的内涵| 亚洲国产精品二十页| 色88888久久久久久影院野外| 日韩精品久久理论片| 久久久久久久性| 色哟哟精品一区| 青娱乐精品视频| 欧美极品另类videosde| 欧美午夜精品理论片a级按摩| 蜜桃久久久久久久| 国产精品久久久久久久久久免费看 | 欧美高清视频一二三区 | 国产精品网曝门| 欧美丝袜自拍制服另类| 国内精品国产三级国产a久久| 亚洲欧美一区二区视频| 欧美日韩aaaaa| 国产精品18久久久久| 一区二区三区四区精品在线视频 | 国产一区二区三区av电影 | 欧美日韩在线一区二区| 国产成人免费高清| 亚洲成人自拍偷拍| 久久精品视频一区二区| 欧美亚洲另类激情小说| 国产成人午夜精品5599| 亚洲国产精品一区二区久久恐怖片 | 午夜视频一区在线观看| 日本一区二区免费在线观看视频| 欧美性做爰猛烈叫床潮| 成人综合婷婷国产精品久久蜜臀 | 精品国产精品网麻豆系列| 色综合天天天天做夜夜夜夜做| 麻豆91在线播放免费| 亚洲综合一区二区精品导航| www亚洲一区| 欧美日韩aaaaa| 91麻豆蜜桃一区二区三区| 韩国午夜理伦三级不卡影院| 亚洲国产欧美另类丝袜| 中文字幕在线播放不卡一区| 欧美大片一区二区| 欧美日产国产精品| 91啪在线观看| 成人av免费在线播放| 久久国产生活片100| 午夜一区二区三区在线观看| 国产精品久久久久毛片软件| 久久婷婷久久一区二区三区| 欧美精品久久一区| 日本高清不卡视频| 波多野结衣中文一区| 狠狠色狠狠色综合日日91app| 日欧美一区二区| 亚洲国产精品一区二区久久恐怖片 | 九九视频精品免费| 日韩专区一卡二卡| 亚洲一区在线电影| 亚洲六月丁香色婷婷综合久久| 国产欧美一区二区精品性色超碰| 欧美大片在线观看一区二区| 91精品国产一区二区三区蜜臀| 色先锋aa成人| 91免费看片在线观看| 97久久精品人人做人人爽50路 | 亚洲色图第一区| 国产精品短视频| 欧美激情艳妇裸体舞| 久久九九国产精品| 久久尤物电影视频在线观看| 欧美一二三四在线| 欧美一区二区三区思思人| 欧美中文字幕亚洲一区二区va在线| 一本色道久久综合亚洲91| 91在线精品秘密一区二区| 97久久超碰精品国产| www.欧美日韩国产在线| 丁香激情综合国产| 福利一区二区在线| 懂色av中文一区二区三区| 成人黄色在线看| 成人午夜av影视| fc2成人免费人成在线观看播放 | 亚洲国产另类精品专区| 亚洲福中文字幕伊人影院| 亚洲国产精品一区二区久久恐怖片 | 99久久久久久| 91久久精品一区二区三| 欧美日韩精品二区第二页| 欧美色电影在线| 91麻豆精品国产自产在线 | 国产资源在线一区| 国产高清久久久| 99re亚洲国产精品| 欧美色成人综合| 欧美电影免费观看高清完整版在线观看| 欧美大片一区二区| 亚洲国产成人午夜在线一区|