提交施工日志修改
This commit is contained in:
@@ -69,7 +69,9 @@ namespace FineUIPro.Web.PZHGL.InformationProject
|
||||
this.hdWorkPostId.Text = workPostId;
|
||||
this.hdMachineId.Text = machineId;
|
||||
List<string> list = Funs.GetStrListByStr(this.hdWorkPostId.Text, ',');
|
||||
list.Distinct();
|
||||
list = list.Distinct().ToList();
|
||||
workPostId = Funs.GetStrListByList(list);
|
||||
this.hdWorkPostId.Text = workPostId;
|
||||
for (int i = 0; i < list.Count; i++)
|
||||
{
|
||||
RenderField rdPlan = new RenderField();
|
||||
@@ -86,7 +88,9 @@ namespace FineUIPro.Web.PZHGL.InformationProject
|
||||
Grid1.Columns.Add(rdPlan);
|
||||
}
|
||||
List<string> list2 = Funs.GetStrListByStr(this.hdMachineId.Text, ',');
|
||||
list2.Distinct();
|
||||
list2 = list2.Distinct().ToList();
|
||||
machineId = Funs.GetStrListByList(list2);
|
||||
this.hdMachineId.Text = machineId;
|
||||
for (int i = 0; i < list2.Count; i++)
|
||||
{
|
||||
RenderField rdPlan = new RenderField();
|
||||
@@ -461,7 +465,6 @@ namespace FineUIPro.Web.PZHGL.InformationProject
|
||||
}
|
||||
}
|
||||
}
|
||||
this.txtState.Text = string.Empty;
|
||||
this.txtRemark.Text = string.Empty;
|
||||
this.Grid1.DataSource = null;
|
||||
this.Grid1.DataBind();
|
||||
@@ -474,6 +477,7 @@ namespace FineUIPro.Web.PZHGL.InformationProject
|
||||
this.Grid5.DataSource = null;
|
||||
this.Grid5.DataBind();
|
||||
drpUnitWork_SelectedIndexChanged(null, null);
|
||||
ChangeText();
|
||||
}
|
||||
|
||||
private void TextEmpty()
|
||||
@@ -488,7 +492,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.Grid1.DataSource = null;
|
||||
this.Grid1.DataBind();
|
||||
@@ -669,7 +672,32 @@ namespace FineUIPro.Web.PZHGL.InformationProject
|
||||
/// <param name="e"></param>
|
||||
protected void Window1_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
ChangeText();
|
||||
}
|
||||
|
||||
private void ChangeText()
|
||||
{
|
||||
DateTime today = DateTime.Now.Date;
|
||||
if (!string.IsNullOrEmpty(this.txtCompileDate.Text.Trim()))
|
||||
{
|
||||
today = Convert.ToDateTime(this.txtCompileDate.Text.Trim()).Date;
|
||||
}
|
||||
var personLogIds = (from x in Funs.DB.ZHGL_ConstructionLog
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.CompileDate == today
|
||||
orderby x.CompileDate descending
|
||||
select x.ConstructionLogId).ToList();
|
||||
|
||||
var workEfficiencys = from x in Funs.DB.ZHGL_ConstructionLogWorkEfficiency
|
||||
where personLogIds.Contains(x.ConstructionLogId)
|
||||
select x;
|
||||
if (workEfficiencys.Count() > 0)
|
||||
{
|
||||
this.btnWorkEfficiency.Text = "已填报";
|
||||
}
|
||||
else
|
||||
{
|
||||
this.btnWorkEfficiency.Text = "未填报";
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -1205,5 +1233,46 @@ namespace FineUIPro.Web.PZHGL.InformationProject
|
||||
{
|
||||
TextNew();
|
||||
}
|
||||
|
||||
protected void btnWorkEfficiency_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.txtCompileDate.Text.Trim()))
|
||||
{
|
||||
Alert.ShowInTop("请选择日期!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
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("ProjectConstructionLogWorkEfficiency.aspx?CompileDate={0}&contractNo={1}&professional={2}&WorkPostId={3}&MachineId={4}", this.txtCompileDate.Text.Trim(), contractNo, professional, hdWorkPostId.Text, hdMachineId.Text, "导入 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("请选择合同编号和专业工程!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user