This commit is contained in:
parent
c61ce05257
commit
2ad0403d8c
|
@ -0,0 +1,5 @@
|
|||
|
||||
alter table dbo.Solution_LargerHazard add HazardName nvarchar(200)
|
||||
go
|
||||
|
||||
|
|
@ -32,6 +32,7 @@ namespace BLL
|
|||
{
|
||||
HazardId = largerHazard.HazardId,
|
||||
HazardCode = largerHazard.HazardCode,
|
||||
HazardName = largerHazard.HazardName,
|
||||
HazardType = largerHazard.HazardType,
|
||||
ProjectId = largerHazard.ProjectId,
|
||||
Address = largerHazard.Address,
|
||||
|
@ -43,7 +44,8 @@ namespace BLL
|
|||
States = largerHazard.States,
|
||||
TrainPersonNum = largerHazard.TrainPersonNum,
|
||||
IsSuperLargerHazard = largerHazard.IsSuperLargerHazard,
|
||||
Descriptions = largerHazard.Descriptions
|
||||
Descriptions = largerHazard.Descriptions,
|
||||
OperativesNum = largerHazard.OperativesNum
|
||||
};
|
||||
|
||||
db.Solution_LargerHazard.InsertOnSubmit(newLargerHazard);
|
||||
|
@ -73,6 +75,7 @@ namespace BLL
|
|||
if (newLargerHazard != null)
|
||||
{
|
||||
newLargerHazard.HazardCode = largerHazard.HazardCode;
|
||||
newLargerHazard.HazardName = largerHazard.HazardName;
|
||||
newLargerHazard.HazardType = largerHazard.HazardType;
|
||||
newLargerHazard.ProjectId = largerHazard.ProjectId;
|
||||
newLargerHazard.Address = largerHazard.Address;
|
||||
|
@ -84,6 +87,8 @@ namespace BLL
|
|||
newLargerHazard.TrainPersonNum = largerHazard.TrainPersonNum;
|
||||
newLargerHazard.IsSuperLargerHazard = largerHazard.IsSuperLargerHazard;
|
||||
newLargerHazard.Descriptions = largerHazard.Descriptions;
|
||||
newLargerHazard.IsUpdate = null;
|
||||
newLargerHazard.OperativesNum = largerHazard.OperativesNum;
|
||||
db.SubmitChanges();
|
||||
//判断是否有数据 有数据则更新 没有数据则添加
|
||||
var majorPlanApproval = BLL.MajorPlanApprovalService.GetMajorPlanApprovalById(largerHazard.HazardId);
|
||||
|
|
|
@ -2083,7 +2083,7 @@ namespace BLL
|
|||
CollCropCode = thisUnit.CollCropCode,
|
||||
DataDate = x.RecordTime,
|
||||
AttachFile = AttachFileService.getFileUrl(x.HazardId.ToString()),
|
||||
//HazardName = x.HazardName,
|
||||
HazardName = x.HazardName,
|
||||
TypeName = db.Sys_Const.FirstOrDefault(y =>
|
||||
y.ConstValue == x.HazardType && y.GroupId == ConstValue.Group_LargerHazardType).ConstText,
|
||||
IsSuperLargerHazard = x.IsSuperLargerHazard,
|
||||
|
@ -2282,7 +2282,7 @@ namespace BLL
|
|||
CollCropCode = thisUnit.CollCropCode,
|
||||
DataDate = x.RecordTime,
|
||||
AttachFile = AttachFileService.getFileUrl(x.HazardId.ToString()),
|
||||
//HazardName = x.HazardName,
|
||||
HazardName = x.HazardName,
|
||||
TypeName = db.Sys_Const.FirstOrDefault(y =>
|
||||
y.ConstValue == x.HazardType && y.GroupId == ConstValue.Group_LargerHazardType).ConstText,
|
||||
IsSuperLargerHazard = x.IsSuperLargerHazard,
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="LargerHazardEdit.aspx.cs" ValidateRequest="false" Inherits="FineUIPro.Web.HSSE.Solution.LargerHazardEdit" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
@ -11,6 +12,12 @@
|
|||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtHazardName" runat="server" Label="方案名称" MaxLength="50" Required="true" ShowRedStar="true">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtLargerHazardCode" runat="server" Label="文件编号" MaxLength="50" Required="true" ShowRedStar="true">
|
||||
|
@ -38,18 +45,27 @@
|
|||
<f:RadioButtonList ID="rblIsSuperLargerHazard" runat="server" Label="超危大工程" LabelWidth="100px" Required="true" ShowRedStar="true">
|
||||
</f:RadioButtonList>
|
||||
<f:NumberBox runat="server" ID="txtTrainPersonNum" NoDecimal="true" NoNegative="true" Label="培训人次" LabelWidth="100px"></f:NumberBox>
|
||||
<f:DropDownList ID="drpStates" runat="server" Label="状态" LabelAlign="Right" >
|
||||
<f:ListItem Text="审批完成" Value="1"/>
|
||||
<f:ListItem Text="作业中" Value="2"/>
|
||||
<f:ListItem Text="已关闭" Value="3"/>
|
||||
<f:ListItem Text="已取消" Value="0"/>
|
||||
<f:DropDownList ID="drpStates" runat="server" Label="状态" LabelAlign="Right">
|
||||
<f:ListItem Text="审批完成" Value="1" />
|
||||
<f:ListItem Text="作业中" Value="2" />
|
||||
<f:ListItem Text="已关闭" Value="3" />
|
||||
<f:ListItem Text="已取消" Value="0" />
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:NumberBox runat="server" ID="txtOperativesNum" NoDecimal="true" NoNegative="true" Label="作业人员数" LabelWidth="100px"></f:NumberBox>
|
||||
<f:Label runat="server" ID="txtOperativesNum1"></f:Label>
|
||||
<f:Label runat="server" ID="txtOperativesNum2"></f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea ID="txtDescriptions" runat="server" Label="描述"
|
||||
LabelAlign="Right" MaxLength="500" Height="100px"></f:TextArea>
|
||||
LabelAlign="Right" MaxLength="500" Height="100px">
|
||||
</f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
|
|
|
@ -101,9 +101,14 @@ namespace FineUIPro.Web.HSSE.Solution
|
|||
{
|
||||
this.txtTrainPersonNum.Text = largerHazard.TrainPersonNum.ToString();
|
||||
}
|
||||
if (largerHazard.OperativesNum != null)
|
||||
{
|
||||
this.txtOperativesNum.Text = largerHazard.OperativesNum.ToString();
|
||||
}
|
||||
this.drpStates.SelectedValue = largerHazard.States;
|
||||
this.txtRemark.Text = HttpUtility.HtmlDecode(largerHazard.Remark);
|
||||
this.txtDescriptions.Text = largerHazard.Descriptions;
|
||||
this.txtHazardName.Text = largerHazard.HazardName;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -193,11 +198,13 @@ namespace FineUIPro.Web.HSSE.Solution
|
|||
IsArgument = Convert.ToBoolean(this.rblIsArgument.SelectedValue),
|
||||
IsSuperLargerHazard = Convert.ToBoolean(this.rblIsSuperLargerHazard.SelectedValue),
|
||||
TrainPersonNum = Funs.GetNewIntOrZero(this.txtTrainPersonNum.Text.Trim()),
|
||||
OperativesNum = Funs.GetNewIntOrZero(this.txtOperativesNum.Text.Trim()),
|
||||
Remark = HttpUtility.HtmlEncode(this.txtRemark.Text.Trim()),
|
||||
Descriptions = this.txtDescriptions.Text.Trim(),
|
||||
RecordTime = Funs.GetNewDateTime(this.txtRecordTime.Text.Trim()),
|
||||
ProjectId = this.ProjectId,
|
||||
States = this.drpStates.SelectedValue,
|
||||
HazardName = txtHazardName.Text.Trim()
|
||||
};
|
||||
if (!string.IsNullOrEmpty(this.HazardId))
|
||||
{
|
||||
|
|
|
@ -41,6 +41,15 @@ namespace FineUIPro.Web.HSSE.Solution
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
|
||||
/// <summary>
|
||||
/// txtHazardName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtHazardName;
|
||||
|
||||
/// <summary>
|
||||
/// txtLargerHazardCode 控件。
|
||||
/// </summary>
|
||||
|
@ -122,6 +131,33 @@ namespace FineUIPro.Web.HSSE.Solution
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpStates;
|
||||
|
||||
/// <summary>
|
||||
/// txtOperativesNum 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtOperativesNum;
|
||||
|
||||
/// <summary>
|
||||
/// txtOperativesNum1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label txtOperativesNum1;
|
||||
|
||||
/// <summary>
|
||||
/// txtOperativesNum2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label txtOperativesNum2;
|
||||
|
||||
/// <summary>
|
||||
/// txtDescriptions 控件。
|
||||
/// </summary>
|
||||
|
|
|
@ -355462,6 +355462,8 @@ namespace Model
|
|||
|
||||
private System.Nullable<bool> _IsUpdate;
|
||||
|
||||
private string _HazardName;
|
||||
|
||||
private EntityRef<Base_Project> _Base_Project;
|
||||
|
||||
private EntityRef<Sys_User> _Sys_User;
|
||||
|
@ -355502,6 +355504,8 @@ namespace Model
|
|||
partial void OnOperativesNumChanged();
|
||||
partial void OnIsUpdateChanging(System.Nullable<bool> value);
|
||||
partial void OnIsUpdateChanged();
|
||||
partial void OnHazardNameChanging(string value);
|
||||
partial void OnHazardNameChanged();
|
||||
#endregion
|
||||
|
||||
public Solution_LargerHazard()
|
||||
|
@ -355839,6 +355843,26 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HazardName", DbType="NVarChar(200)")]
|
||||
public string HazardName
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._HazardName;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._HazardName != value))
|
||||
{
|
||||
this.OnHazardNameChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._HazardName = value;
|
||||
this.SendPropertyChanged("HazardName");
|
||||
this.OnHazardNameChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Solution_LargerSolution_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)]
|
||||
public Base_Project Base_Project
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue