46 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			46 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
| using System;
 | |
| using System.Collections.Generic;
 | |
| using System.ComponentModel;
 | |
| using System.Data;
 | |
| using System.Drawing;
 | |
| using System.Linq;
 | |
| using System.Text;
 | |
| using System.Windows.Forms;
 | |
| 
 | |
| namespace FBS0000
 | |
| {
 | |
|     public partial class fLovWorkUser : Form
 | |
|     {
 | |
|         public dsMSSQL.EETGW_WorkTableUserRow dr = null;
 | |
|         public fLovWorkUser(List<dsMSSQL.EETGW_WorkTableUserRow> users)
 | |
|         {
 | |
|             InitializeComponent();
 | |
|             Properties.Settings.Default["gwcs"] = FCOMMON.info.CS;
 | |
|             this.dsMSSQL.Merge(users.ToArray());
 | |
|             this.KeyDown += (s1, e1) => { if (e1.KeyCode == Keys.Escape) this.Close(); };
 | |
|         }
 | |
| 
 | |
|         private void fLovWorkUser_Load(object sender, EventArgs e)
 | |
|         {
 | |
|             this.Show();
 | |
|             Application.DoEvents();
 | |
|             this.arDatagridView1.AutoResizeColumns();
 | |
|         }
 | |
| 
 | |
|         private void arDatagridView1_DoubleClick(object sender, EventArgs e)
 | |
|         {
 | |
| 
 | |
|         }
 | |
| 
 | |
|         private void arDatagridView1_KeyDown(object sender, KeyEventArgs e)
 | |
|         {
 | |
|             if(e.KeyCode == Keys.Enter)
 | |
|             {
 | |
|                 var drv = this.bs.Current as DataRowView;
 | |
|                 dr = drv.Row as dsMSSQL.EETGW_WorkTableUserRow;
 | |
|                 DialogResult = DialogResult.OK;
 | |
|             }
 | |
|         }
 | |
|     }
 | |
| }
 | 
