Commit d338c5bb authored by tr's avatar tr

1、员工考核:优化

parent e2caa08f
......@@ -108,7 +108,9 @@
this.cbWho.FormattingEnabled = true;
this.cbWho.Items.AddRange(new object[] {
"段廷瑞",
"王奇誉"});
"王奇誉",
"盛俊杰",
"金燚波"});
this.cbWho.Location = new System.Drawing.Point(296, 7);
this.cbWho.Name = "cbWho";
this.cbWho.Size = new System.Drawing.Size(108, 20);
......@@ -193,24 +195,28 @@
this.Column4.DataPropertyName = "ID";
this.Column4.HeaderText = "记录编号";
this.Column4.Name = "Column4";
this.Column4.ReadOnly = true;
//
// Column2
//
this.Column2.DataPropertyName = "Who";
this.Column2.HeaderText = "员工姓名";
this.Column2.Name = "Column2";
this.Column2.ReadOnly = true;
//
// Column1
//
this.Column1.DataPropertyName = "Minus";
this.Column1.HeaderText = "减分";
this.Column1.Name = "Column1";
this.Column1.ReadOnly = true;
//
// Column3
//
this.Column3.DataPropertyName = "Reason";
this.Column3.HeaderText = "减分原因";
this.Column3.Name = "Column3";
this.Column3.ReadOnly = true;
//
// wEvaluationOfEmployee
//
......
......@@ -66,7 +66,8 @@ namespace Tools.UI
}
else
{
this.EditRow();
if(!this.EditRow())
return false;
}
return base.SaveCheck();
}
......@@ -116,20 +117,22 @@ namespace Tools.UI
/// <summary>
/// 更新数据
/// </summary>
private void EditRow()
private bool EditRow()
{
//查找编辑行
var drEdit = this._ds.Tables[0].Select($"ID={this.EditID}").FirstOrDefault();
if (this.EditID == 0 || drEdit == null)
{
Utils.Tip("请选择您要编辑的行!");
return;
return false;
}
//编辑赋值
drEdit["Minus"] = this.nbMinus.Value;
drEdit["Who"] = this.cbWho.Text;
drEdit["Reason"] = this.tbReason.Text.Trim();
drEdit.EndEdit();
return true;
}
}
}
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