修改员工考核

This commit is contained in:
2023-10-07 15:27:02 +08:00
parent dd53b2300a
commit f1a5407c69
15 changed files with 1269 additions and 94 deletions
@@ -228,6 +228,7 @@ namespace FineUIPro.Web.PZHGL.InformationProject
{
this.hdWorkPostId.Text = log.WorkPostId;
this.hdMachineId.Text = log.MachineId;
this.hdConstructionLogId.Text = log.ConstructionLogId;
this.txtFileCode.Text = log.FileCode;
if (log.CompileDate != null)
{
@@ -513,6 +514,7 @@ namespace FineUIPro.Web.PZHGL.InformationProject
this.Grid5.DataSource = records;
this.Grid5.DataBind();
}
ChangeText();
}
}
@@ -537,6 +539,7 @@ namespace FineUIPro.Web.PZHGL.InformationProject
private void TextNew()
{
this.ConstructionLogId = string.Empty;
this.hdConstructionLogId.Text = string.Empty;
DateTime today = DateTime.Now.Date;
if (!string.IsNullOrEmpty(this.txtCompileDate.Text.Trim()))
{
@@ -589,7 +592,6 @@ namespace FineUIPro.Web.PZHGL.InformationProject
}
}
}
this.txtState.Text = string.Empty;
this.txtRemark.Text = string.Empty;
this.txtHSETodaySummary.Text = string.Empty;
this.txtHSETodaySummaryRemark.Text = string.Empty;
@@ -610,6 +612,7 @@ namespace FineUIPro.Web.PZHGL.InformationProject
this.Grid5.DataSource = null;
this.Grid5.DataBind();
drpUnitWork_SelectedIndexChanged(null, null);
ChangeText();
}
private void TextEmpty()
@@ -624,7 +627,6 @@ namespace FineUIPro.Web.PZHGL.InformationProject
this.drpContractNo.SelectedIndex = 0;
this.drpUnitWork.SelectedIndex = 0;
this.drpProfessional.SelectedIndex = 0;
this.txtState.Text = string.Empty;
this.txtRemark.Text = string.Empty;
this.txtHSETodaySummary.Text = string.Empty;
this.txtHSETodaySummaryRemark.Text = string.Empty;
@@ -792,7 +794,14 @@ namespace FineUIPro.Web.PZHGL.InformationProject
select x).FirstOrDefault();
if (personLog == null)
{
log.ConstructionLogId = SQLHelper.GetNewID(typeof(Model.ZHGL_ConstructionLog));
if (!string.IsNullOrEmpty(hdConstructionLogId.Text))
{
log.ConstructionLogId = hdConstructionLogId.Text;
}
else
{
log.ConstructionLogId = SQLHelper.GetNewID(typeof(Model.ZHGL_ConstructionLog));
}
this.ConstructionLogId = log.ConstructionLogId;
BLL.ConstructionLogService.AddConstructionLog(log);
}
@@ -893,10 +902,26 @@ namespace FineUIPro.Web.PZHGL.InformationProject
/// <param name="e"></param>
protected void Window1_Close(object sender, WindowCloseEventArgs e)
{
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
ChangeText();
}
#endregion
private void ChangeText()
{
var workEfficiencys = from x in Funs.DB.ZHGL_ConstructionLogWorkEfficiency
where x.ConstructionLogId == this.hdConstructionLogId.Text
select x;
if (workEfficiencys.Count() > 0)
{
this.btnWorkEfficiency.Text = "已填报";
}
else
{
this.btnWorkEfficiency.Text = "未填报";
}
}
#region
/// <summary>
/// 右键删除焊口
@@ -911,6 +936,7 @@ namespace FineUIPro.Web.PZHGL.InformationProject
var log = BLL.ConstructionLogService.GetConstructionLogById(ConstructionLogId);
if (log != null)
{
BLL.ConstructionLogWorkEfficiencyService.DeleteConstructionLogWorkEfficiencysByConstructionLogId(ConstructionLogId);
BLL.ConstructionLogPersonService.DeleteConstructionLogPersonsByConstructionLogId(ConstructionLogId);
BLL.ConstructionLogMachineService.DeleteConstructionLogMachinesByConstructionLogId(ConstructionLogId);
BLL.ConstructionLogManagementService.DeleteConstructionLogManagementsByConstructionLogId(ConstructionLogId);
@@ -923,7 +949,7 @@ namespace FineUIPro.Web.PZHGL.InformationProject
}
else
{
Alert.ShowInTop("请选择要删除的试压记录!", MessageBoxIcon.Warning);
Alert.ShowInTop("请选择要删除的记录!", MessageBoxIcon.Warning);
}
}
else
@@ -1216,5 +1242,45 @@ namespace FineUIPro.Web.PZHGL.InformationProject
{
TextNew();
}
protected void btnWorkEfficiency_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(hdConstructionLogId.Text)) //新增记录
{
hdConstructionLogId.Text = SQLHelper.GetNewID();
}
string contractNo = string.Empty;
foreach (var item in this.drpContractNo.SelectedValueArray)
{
if (item != BLL.Const._Null)
{
contractNo += item + ",";
}
}
if (!string.IsNullOrEmpty(contractNo))
{
contractNo = contractNo.Substring(0, contractNo.Length - 1);
}
string professional = string.Empty;
foreach (var item in this.drpProfessional.SelectedValueArray)
{
if (item != BLL.Const._Null)
{
professional += item + ",";
}
}
if (!string.IsNullOrEmpty(professional))
{
professional = professional.Substring(0, professional.Length - 1);
}
if (!string.IsNullOrEmpty(contractNo) && !string.IsNullOrEmpty(professional))
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ConstructionLogWorkEfficiency.aspx?ConstructionLogId={0}&contractNo={1}&professional={2}&WorkPostId={3}&MachineId={4}", this.hdConstructionLogId.Text, contractNo, professional, hdWorkPostId.Text, hdMachineId.Text, "导入 - ")));
}
else
{
Alert.ShowInTop("请选择合同编号和专业工程!", MessageBoxIcon.Warning);
}
}
}
}