1212
This commit is contained in:
parent
9c97cfcb4c
commit
c93dba3c61
|
@ -778,12 +778,12 @@ namespace FineUIPro.Web.AttachFile
|
|||
}
|
||||
#endregion
|
||||
|
||||
#region PunchlistFrom附件保存成功后处理事件
|
||||
if (MenuId == BLL.Const.PunchlistFromMenuId)
|
||||
{
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
}
|
||||
#endregion
|
||||
//#region PunchlistFrom附件保存成功后处理事件
|
||||
//if (MenuId == BLL.Const.PunchlistFromMenuId)
|
||||
//{
|
||||
// PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
//}
|
||||
//#endregion
|
||||
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
|
|
|
@ -244,14 +244,14 @@
|
|||
</f:Panel>
|
||||
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
|
||||
Height="500px">
|
||||
Height="500px" OnClose="WindowAtt_Close">
|
||||
</f:Window>
|
||||
<f:Window ID="Window2" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Top" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true"
|
||||
Width="700px" Height="560px">
|
||||
</f:Window>
|
||||
<f:Window ID="Window1" Title="尾项管理" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="1200px"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="1200px" OnClose="Window1_Close"
|
||||
Height="600px">
|
||||
</f:Window>
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
|
|
|
@ -212,6 +212,10 @@ namespace FineUIPro.Web.Transfer
|
|||
{
|
||||
BindGrid();
|
||||
}
|
||||
protected void WindowAtt_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 删除
|
||||
|
@ -569,7 +573,6 @@ namespace FineUIPro.Web.Transfer
|
|||
Response.Flush();
|
||||
Response.Close();
|
||||
File.Delete(newUrl);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -17,65 +17,65 @@
|
|||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtNum_NO" runat="server" Label="No." LabelAlign="Right" LabelWidth="180px" Required="true" ShowRedStar="true">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtSystem_No" runat="server" Label="系统号/System No." LabelAlign="Right" LabelWidth="180px" Required="true" ShowRedStar="true">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtSub_Sys_No" runat="server" Label="子系统号/Sub-sys. No." LabelAlign="Right" LabelWidth="200px" Required="true" ShowRedStar="true">
|
||||
<f:TextBox ID="txtSub_Sys_No" runat="server" Label="子系统号/Sub-sys. No." LabelAlign="Right" LabelWidth="200px" Required="true" ShowRedStar="true">
|
||||
</f:TextBox>
|
||||
<f:DropDownList ID="ddlCat" runat="server" Label="Cat." LabelWidth="200px" Required="true" ShowRedStar="true">
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="ddlCat" runat="server" Label="Cat." LabelWidth="200px" Required="true" ShowRedStar="true">
|
||||
<f:ListItem Value="" Text=""></f:ListItem>
|
||||
<f:ListItem Value="A" Text="A"></f:ListItem>
|
||||
<f:ListItem Value="B" Text="B"></f:ListItem>
|
||||
<f:ListItem Value="C" Text="C"></f:ListItem>
|
||||
<f:ListItem Value="D" Text="D"></f:ListItem>
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtRaised_By" runat="server" Label="提出人/Raised By" LabelAlign="Right" LabelWidth="180px" Required="true" ShowRedStar="true">
|
||||
<f:TextBox ID="txtRaised_By" runat="server" Label="提出人/Raised By" LabelAlign="Right" LabelWidth="180px" Required="true" ShowRedStar="true">
|
||||
</f:TextBox>
|
||||
<f:DatePicker runat="server" Label="提出时间/Date Raised" ID="txtDate_Raised" LabelAlign="Right" LabelWidth="200px" Width="300px" Required="true" ShowRedStar="true">
|
||||
<f:DatePicker runat="server" Label="提出时间/Date Raised" ID="txtDate_Raised" LabelAlign="Right" LabelWidth="200px" Width="300px" Required="true" ShowRedStar="true">
|
||||
</f:DatePicker>
|
||||
<f:TextBox ID="txtDisc" runat="server" Label="专业/Disc." LabelAlign="Right" LabelWidth="200px" Required="true" ShowRedStar="true">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="ddlIsEng" runat="server" Label="设计需求/Eng(Y/N)" LabelWidth="180px" Required="true" ShowRedStar="true">
|
||||
<f:TextBox ID="txtDisc" runat="server" Label="专业/Disc." LabelAlign="Right" LabelWidth="200px" Required="true" ShowRedStar="true">
|
||||
</f:TextBox>
|
||||
<f:DropDownList ID="ddlIsEng" runat="server" Label="设计需求/Eng(Y/N)" LabelWidth="180px" Required="true" ShowRedStar="true">
|
||||
<f:ListItem Value="" Text=""></f:ListItem>
|
||||
<f:ListItem Value="Y" Text="Y"></f:ListItem>
|
||||
<f:ListItem Value="N" Text="N"></f:ListItem>
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="ddlIsMatI" runat="server" Label="材料需求/Mat’l(Y/N)" LabelWidth="200px" Width="300px" Required="true" ShowRedStar="true">
|
||||
<f:DropDownList ID="ddlIsMatI" runat="server" Label="材料需求/Mat’l(Y/N)" LabelWidth="200px" Width="300px" Required="true" ShowRedStar="true">
|
||||
<f:ListItem Value="" Text=""></f:ListItem>
|
||||
<f:ListItem Value="Y" Text="Y"></f:ListItem>
|
||||
<f:ListItem Value="Y1" Text="Y1"></f:ListItem>
|
||||
<f:ListItem Value="Y2" Text="Y2"></f:ListItem>
|
||||
<f:ListItem Value="N" Text="N"></f:ListItem>
|
||||
</f:DropDownList>
|
||||
<f:TextBox ID="txtPunch_Type" runat="server" Label="尾项类别/Punch Type" LabelAlign="Right" LabelWidth="200px" Required="true" ShowRedStar="true">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
|
||||
<f:DatePicker runat="server" Label="要求完成时间/Required Date" ID="txtRequired_Date" LabelAlign="Right" LabelWidth="210px" Required="true" ShowRedStar="true">
|
||||
<f:TextBox ID="txtPunch_Type" runat="server" Label="尾项类别/Punch Type" LabelAlign="Right" LabelWidth="200px" Required="true" ShowRedStar="true">
|
||||
</f:TextBox>
|
||||
<f:DatePicker runat="server" Label="要求完成时间/Required Date" ID="txtRequired_Date" LabelAlign="Right" LabelWidth="210px" Required="true" ShowRedStar="true">
|
||||
</f:DatePicker>
|
||||
<f:TextBox ID="txtAction_By" runat="server" Label="责任单位/Action By" LabelAlign="Right" LabelWidth="200px" Width="300px" Required="true" ShowRedStar="true">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtPIC" runat="server" Label="责任人PIC" LabelAlign="Right" LabelWidth="200px" Required="true" ShowRedStar="true">
|
||||
<f:TextBox ID="txtAction_By" runat="server" Label="责任单位/Action By" LabelAlign="Right" LabelWidth="200px" Width="300px" Required="true" ShowRedStar="true">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtPIC_WUH" runat="server" Label="责任人-五环/PIC-WUH" LabelAlign="Right" LabelWidth="180px" Required="true" ShowRedStar="true">
|
||||
<f:TextBox ID="txtPIC" runat="server" Label="责任人PIC" LabelAlign="Right" LabelWidth="200px" Required="true" ShowRedStar="true">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtPIC_WUH" runat="server" Label="责任人-五环/PIC-WUH" LabelAlign="Right" LabelWidth="180px" Required="true" ShowRedStar="true">
|
||||
</f:TextBox>
|
||||
<f:DatePicker runat="server" Label="实际完成时间/Actual Date" ID="txtActual_Date" LabelAlign="Right" LabelWidth="180px" Width="300px">
|
||||
</f:DatePicker>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
|
|
|
@ -50,6 +50,7 @@ namespace FineUIPro.Web.Transfer
|
|||
var TransferPunchlistFrom = Funs.DB.Transfer_PunchlistFrom.FirstOrDefault(p => p.Id == this.Id);
|
||||
if (TransferPunchlistFrom != null)
|
||||
{
|
||||
this.txtNum_NO.Text = TransferPunchlistFrom.Num_NO;
|
||||
this.txtSystem_No.Text = TransferPunchlistFrom.System_No;
|
||||
this.txtSub_Sys_No.Text = TransferPunchlistFrom.Sub_Sys_No;
|
||||
this.txtDESCRIPTION.Text = TransferPunchlistFrom.DESCRIPTION;
|
||||
|
@ -83,6 +84,16 @@ namespace FineUIPro.Web.Transfer
|
|||
this.txtVerified_Date.Text = Convert.ToDateTime(TransferPunchlistFrom.Verified_Date).ToString("yyyy-MM-dd");
|
||||
this.txtRemark.Text = TransferPunchlistFrom.Remark;
|
||||
}
|
||||
else
|
||||
{
|
||||
var maxNumNO = 0;
|
||||
var modelTp = Funs.DB.Transfer_PunchlistFrom.OrderByDescending(x => x.Num_NO).FirstOrDefault(x => x.ProjectId == CurrUser.LoginProjectId);
|
||||
if (modelTp == null)
|
||||
maxNumNO = 1;
|
||||
else
|
||||
maxNumNO = Convert.ToInt32(modelTp.Num_NO) + 1;
|
||||
this.txtNum_NO.Text = maxNumNO.ToString("0000");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -122,12 +133,12 @@ namespace FineUIPro.Web.Transfer
|
|||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (SaveData() == 0) {
|
||||
Alert.ShowInTop("保存失败!", MessageBoxIcon.Warning);
|
||||
if (SaveData() == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
ShowNotify("保存成功",MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
ShowNotify("保存成功", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -136,19 +147,13 @@ namespace FineUIPro.Web.Transfer
|
|||
/// <returns></returns>
|
||||
private int SaveData()
|
||||
{
|
||||
int reutState = 0;
|
||||
var maxNumNO = 0;
|
||||
var modelTp = Funs.DB.Transfer_PunchlistFrom.OrderByDescending(x => x.Num_NO).FirstOrDefault(x => x.ProjectId == CurrUser.LoginProjectId);
|
||||
if (modelTp == null)
|
||||
maxNumNO = 1;
|
||||
else
|
||||
maxNumNO = Convert.ToInt32(modelTp.Num_NO) + 1;
|
||||
int reutState = 0;
|
||||
|
||||
Model.Transfer_PunchlistFrom newTransferFrom = new Model.Transfer_PunchlistFrom()
|
||||
{
|
||||
Id= Guid.NewGuid().ToString(),
|
||||
Num_NO = maxNumNO.ToString("0000"),
|
||||
ProjectId=this.ProjectId,
|
||||
Id = Guid.NewGuid().ToString(),
|
||||
Num_NO = this.txtNum_NO.Text.Trim(),
|
||||
ProjectId = this.ProjectId,
|
||||
System_No = this.txtSystem_No.Text.Trim(),
|
||||
Sub_Sys_No = this.txtSub_Sys_No.Text.Trim(),
|
||||
DESCRIPTION = this.txtDESCRIPTION.Text.Trim(),
|
||||
|
@ -159,19 +164,19 @@ namespace FineUIPro.Web.Transfer
|
|||
IsEng = this.ddlIsEng.SelectedValue == "Y" ? true : false,
|
||||
IsMatI = this.ddlIsMatI.SelectedValue,
|
||||
Punch_Type = this.txtPunch_Type.Text.Trim(),
|
||||
Required_Date= Funs.GetNewDateTime(this.txtRequired_Date.Text),
|
||||
Action_By= this.txtAction_By.Text.Trim(),
|
||||
PIC= this.txtPIC.Text.Trim(),
|
||||
PIC_WUH=this.txtPIC_WUH.Text.Trim(),
|
||||
Correction_Action= this.txtCorrection_Action.Text.Trim(),
|
||||
Required_Date = Funs.GetNewDateTime(this.txtRequired_Date.Text),
|
||||
Action_By = this.txtAction_By.Text.Trim(),
|
||||
PIC = this.txtPIC.Text.Trim(),
|
||||
PIC_WUH = this.txtPIC_WUH.Text.Trim(),
|
||||
Correction_Action = this.txtCorrection_Action.Text.Trim(),
|
||||
Actual_Date = Funs.GetNewDateTime(this.txtActual_Date.Text),
|
||||
Cleared_By= this.txtCleared_By.Text.Trim(),
|
||||
Cleared_By = this.txtCleared_By.Text.Trim(),
|
||||
Cleared_Date = Funs.GetNewDateTime(this.txtCleared_Date.Text),
|
||||
Confirmed_By= this.txtConfirmed_By.Text.Trim(),
|
||||
Confirmed_By = this.txtConfirmed_By.Text.Trim(),
|
||||
Confirmed_Date = Funs.GetNewDateTime(this.txtConfirmed_Date.Text),
|
||||
Verified_By= this.txtVerified_By.Text.Trim(),
|
||||
Verified_By = this.txtVerified_By.Text.Trim(),
|
||||
Verified_Date = Funs.GetNewDateTime(this.txtVerified_Date.Text),
|
||||
Remark= this.txtRemark.Text.Trim()
|
||||
Remark = this.txtRemark.Text.Trim()
|
||||
};
|
||||
|
||||
if (newTransferFrom.Cleared_Date == null && newTransferFrom.Confirmed_Date == null && newTransferFrom.Verified_Date == null)
|
||||
|
@ -184,11 +189,24 @@ namespace FineUIPro.Web.Transfer
|
|||
var TransferPunchlistFrom = Funs.DB.Transfer_PunchlistFrom.FirstOrDefault(p => p.Id == this.Id);
|
||||
if (TransferPunchlistFrom == null)
|
||||
{
|
||||
if (Funs.DB.Transfer_PunchlistFrom.Where(p => p.ProjectId == this.ProjectId && p.Num_NO == newTransferFrom.Num_NO).Count() > 0)
|
||||
{
|
||||
ShowNotify("录入的NO.重复了,不能保存", MessageBoxIcon.Warning);
|
||||
return reutState;
|
||||
}
|
||||
|
||||
Funs.DB.Transfer_PunchlistFrom.InsertOnSubmit(newTransferFrom);
|
||||
this.Id = newTransferFrom.Id;
|
||||
this.Id = newTransferFrom.Id;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
if (Funs.DB.Transfer_PunchlistFrom.Where(p => p.ProjectId == this.ProjectId && p.Num_NO == newTransferFrom.Num_NO && p.Id != TransferPunchlistFrom.Id).Count() > 0)
|
||||
{
|
||||
ShowNotify("录入的NO.重复了,不能保存", MessageBoxIcon.Warning);
|
||||
return reutState;
|
||||
}
|
||||
|
||||
TransferPunchlistFrom.Num_NO = newTransferFrom.Num_NO;
|
||||
TransferPunchlistFrom.System_No = newTransferFrom.System_No;
|
||||
TransferPunchlistFrom.Sub_Sys_No = newTransferFrom.Sub_Sys_No;
|
||||
TransferPunchlistFrom.DESCRIPTION = newTransferFrom.DESCRIPTION;
|
||||
|
|
|
@ -41,6 +41,15 @@ namespace FineUIPro.Web.Transfer
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
|
||||
/// <summary>
|
||||
/// txtNum_NO 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtNum_NO;
|
||||
|
||||
/// <summary>
|
||||
/// txtSystem_No 控件。
|
||||
/// </summary>
|
||||
|
|
Loading…
Reference in New Issue