Commit db8f153d authored by tr's avatar tr

1、员工考核:员工姓名取数优化

parent 304a3c29
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<appSettings> <appSettings>
<add key="UpdateTime" value="2021-07-16 10:51:22.823" /> <add key="UpdateTime" value="2021-07-29 14:12:41.660" />
</appSettings> </appSettings>
<startup> <startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" /> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
......
...@@ -139,11 +139,6 @@ ...@@ -139,11 +139,6 @@
// cbWho // cbWho
// //
this.cbWho.FormattingEnabled = true; this.cbWho.FormattingEnabled = true;
this.cbWho.Items.AddRange(new object[] {
"段廷瑞",
"王奇誉",
"盛俊杰",
"金燚波"});
this.cbWho.Location = new System.Drawing.Point(296, 7); this.cbWho.Location = new System.Drawing.Point(296, 7);
this.cbWho.Name = "cbWho"; this.cbWho.Name = "cbWho";
this.cbWho.Size = new System.Drawing.Size(108, 20); this.cbWho.Size = new System.Drawing.Size(108, 20);
......
...@@ -24,6 +24,8 @@ namespace Tools.UI ...@@ -24,6 +24,8 @@ namespace Tools.UI
/// </summary> /// </summary>
string ThisMonthStart => DateTime.Now.ToString("yyyy-MM-01"); string ThisMonthStart => DateTime.Now.ToString("yyyy-MM-01");
List<string> UserList = null;
bool IsAdd = false; bool IsAdd = false;
int EditID = 0; int EditID = 0;
...@@ -49,6 +51,13 @@ namespace Tools.UI ...@@ -49,6 +51,13 @@ namespace Tools.UI
//只取最近两个月的数据 //只取最近两个月的数据
string sql = $"SELECT * FROM FTT_EvaluationOfEmployee WHERE CreateDate > '{this.LastMonthStart}'"; string sql = $"SELECT * FROM FTT_EvaluationOfEmployee WHERE CreateDate > '{this.LastMonthStart}'";
this._ds = this._db.GetData(sql, "FTT_EvaluationOfEmployee"); this._ds = this._db.GetData(sql, "FTT_EvaluationOfEmployee");
//查询员工姓名
string userSql = $@"SELECT DISTINCT Name FROM dbo.AC_User
WHERE WorkState = '在职' AND IsStop = 0
AND ISNULL(Name, '') NOT IN('', 'test', '王杰平', '李双')
AND UserType NOT IN(5312, 5313)";
var dt = this._db.GetDataTable(userSql, "AC_User", false);
this.UserList = dt.Rows.Cast<DataRow>().Select(r => r[0].ToString()).ToList();
} }
public override void InitUI() public override void InitUI()
{ {
...@@ -58,10 +67,13 @@ namespace Tools.UI ...@@ -58,10 +67,13 @@ namespace Tools.UI
this.dgvDetail.SelectionMode = DataGridViewSelectionMode.FullRowSelect; this.dgvDetail.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
this.dgvDetail.DataSource = this._ds.Tables[0].DefaultView; this.dgvDetail.DataSource = this._ds.Tables[0].DefaultView;
this.dgvDetail.CellMouseClick += DgvDetail_CellMouseClick; this.dgvDetail.CellMouseClick += DgvDetail_CellMouseClick;
//初始化下拉项 //初始化工具栏月份下拉项
this.tscbMonth.Items.Add(this.ThisMonthStart); this.tscbMonth.Items.Add(this.ThisMonthStart);
this.tscbMonth.Items.Add(this.LastMonthStart); this.tscbMonth.Items.Add(this.LastMonthStart);
this.tscbMonth.SelectedIndex = 0; this.tscbMonth.SelectedIndex = 0;
//初始化编辑信息-员工姓名下拉项
this.cbWho.Items.Clear();
this.cbWho.Items.AddRange(this.UserList.ToArray());
} }
public override bool SaveCheck() public override bool SaveCheck()
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment