修改共检通知单
This commit is contained in:
@@ -65,9 +65,14 @@
|
||||
<f:RenderField ColumnID="AcceptanceSite" DataField="AcceptanceSite" FieldType="String" HeaderText="验收部位" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="150px">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="AcceptanceCheckMan" DataField="AcceptanceCheckMan" FieldType="String" HeaderText="检查人" TextAlign="Center"
|
||||
<%-- <f:RenderField ColumnID="AcceptanceCheckMan" DataField="AcceptanceCheckMan" FieldType="String" HeaderText="检查人" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="120px">
|
||||
</f:RenderField>
|
||||
</f:RenderField>--%>
|
||||
<f:TemplateField ColumnID="AcceptanceCheckMan" Width="280px" HeaderText="检查人" HeaderTextAlign="Center" TextAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label3" runat="server" Text='<%# ConvertCheckMan(Eval("AcceptanceCheckMan")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField ColumnID="IsOnceQualified" DataField="IsOnceQualified" FieldType="String" HeaderText="是否一次合格" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="120px">
|
||||
</f:RenderField>
|
||||
|
||||
@@ -251,5 +251,21 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
Response.End();
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 获取检查人名称
|
||||
/// </summary>
|
||||
/// <param name="CarryUnitIds"></param>
|
||||
/// <returns></returns>
|
||||
protected string ConvertCheckMan(object CarryUnitIds)
|
||||
{
|
||||
var uname = BLL.UserService.getUserNamesUserIds(CarryUnitIds);
|
||||
if (string.IsNullOrEmpty(uname))
|
||||
{
|
||||
uname = CarryUnitIds.ToString();
|
||||
}
|
||||
return uname;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
+35
-24
@@ -7,11 +7,13 @@
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.CQMS.ProcessControl {
|
||||
|
||||
|
||||
public partial class InspectionManagement {
|
||||
|
||||
namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
{
|
||||
|
||||
|
||||
public partial class InspectionManagement
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
@@ -20,7 +22,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
@@ -29,7 +31,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
@@ -38,7 +40,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
@@ -47,7 +49,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ToolSearch 控件。
|
||||
/// </summary>
|
||||
@@ -56,7 +58,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar ToolSearch;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// drpUnitWork 控件。
|
||||
/// </summary>
|
||||
@@ -65,7 +67,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpUnitWork;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// drpCNProfessional 控件。
|
||||
/// </summary>
|
||||
@@ -74,7 +76,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpCNProfessional;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtStarTime 控件。
|
||||
/// </summary>
|
||||
@@ -83,7 +85,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtStarTime;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Label1 控件。
|
||||
/// </summary>
|
||||
@@ -92,7 +94,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label Label1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtEndTime 控件。
|
||||
/// </summary>
|
||||
@@ -101,7 +103,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtEndTime;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnSearch 控件。
|
||||
/// </summary>
|
||||
@@ -110,7 +112,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSearch;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnOut 控件。
|
||||
/// </summary>
|
||||
@@ -119,7 +121,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnOut;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// lblPageIndex 控件。
|
||||
/// </summary>
|
||||
@@ -128,7 +130,16 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblPageIndex;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Label3 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label3;
|
||||
|
||||
/// <summary>
|
||||
/// lbtnFileUrl 控件。
|
||||
/// </summary>
|
||||
@@ -137,7 +148,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.LinkButton lbtnFileUrl;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarText1 控件。
|
||||
/// </summary>
|
||||
@@ -146,7 +157,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarText ToolbarText1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize 控件。
|
||||
/// </summary>
|
||||
@@ -155,7 +166,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
@@ -164,7 +175,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
@@ -173,7 +184,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuModify 控件。
|
||||
/// </summary>
|
||||
@@ -182,7 +193,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuModify;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuDel 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<f:RadioItem Value="True" Text="是" Selected="true" />
|
||||
<f:RadioItem Value="False" Text="否" />
|
||||
</f:RadioButtonList>
|
||||
<f:DatePicker ID="txtInspectionDate" runat="server" Label="验收日期" LabelAlign="Right" LabelWidth="130px"></f:DatePicker>
|
||||
<f:DatePicker ID="txtInspectionDate" runat="server" DateFormatString="yyyy-MM-dd HH:mm:ss" ShowTime="true" Label="验收日期" LabelAlign="Right" LabelWidth="130px"></f:DatePicker>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
this.Grid1.DataSource = BLL.InspectionManagementDetailService.GetInspectionDetails(this.hdInspectionNoticeId.Text.Trim());
|
||||
this.Grid1.DataBind();
|
||||
this.txtInspectionCode.Text = inspectionManagement.InspectionCode;
|
||||
this.txtInspectionDate.Text = inspectionManagement.InspectionDate.HasValue ? string.Format("{0:yyyy-MM-dd}", inspectionManagement.InspectionDate) : "";
|
||||
this.txtInspectionDate.Text = inspectionManagement.InspectionDate.HasValue ? string.Format("{0:yyyy-MM-dd HH:mm:ss}", inspectionManagement.InspectionDate) : "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,9 +64,16 @@
|
||||
<f:RenderField ColumnID="AcceptanceSite" DataField="AcceptanceSite" FieldType="String" HeaderText="验收部位" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="150px">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="AcceptanceCheckMan" DataField="AcceptanceCheckMan" FieldType="String" HeaderText="检查人" TextAlign="Center"
|
||||
<%-- <f:RenderField ColumnID="AcceptanceCheckMan" DataField="AcceptanceCheckMan" FieldType="String" HeaderText="检查人" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="120px">
|
||||
</f:RenderField>
|
||||
</f:RenderField>--%>
|
||||
|
||||
<f:TemplateField ColumnID="AcceptanceCheckMan" Width="280px" HeaderText="检查人" HeaderTextAlign="Center" TextAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label3" runat="server" Text='<%# ConvertCheckMan(Eval("AcceptanceCheckMan")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
|
||||
<f:TemplateField ColumnID="AttachFile" Width="150px" HeaderText="附件" HeaderTextAlign="Center" TextAlign="Left" >
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="lbtnFileUrl" runat="server" CssClass="ItemLink"
|
||||
|
||||
@@ -183,6 +183,14 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
//合格的情况下不允许修改
|
||||
var model = Funs.DB.ProcessControl_InspectionManagement.FirstOrDefault(x => x.InspectionId == Grid1.SelectedRowID);
|
||||
if (model.IsOnceQualified==true)
|
||||
{
|
||||
Alert.ShowInTop("该共检通知单已合格,不允许修改!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InspectionNoticeEdit.aspx?InspectionId={0}", Grid1.SelectedRowID, "编辑 - ")));
|
||||
}
|
||||
#endregion
|
||||
@@ -306,17 +314,17 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
var units = (from x in db.Base_Unit
|
||||
join y in db.Project_ProjectUnit
|
||||
on x.UnitId equals y.UnitId
|
||||
where y.ProjectId == this.CurrUser.LoginProjectId && y.UnitType == BLL.Const.ProjectUnitType_4
|
||||
where y.ProjectId==this.CurrUser.LoginProjectId && y.UnitType== BLL.Const.ProjectUnitType_4
|
||||
orderby x.UnitName
|
||||
select x).FirstOrDefault();
|
||||
if (units != null)
|
||||
if (units!=null)
|
||||
{
|
||||
bookmarkUnitName.Text = units.UnitName;
|
||||
}
|
||||
}
|
||||
var projectModel = db.Base_Project.Where(x => x.ProjectId == this.CurrUser.LoginProjectId).FirstOrDefault();
|
||||
var inspectionModel = db.ProcessControl_InspectionManagement.Where(x => x.InspectionId == Id).FirstOrDefault();
|
||||
|
||||
|
||||
//项目编号
|
||||
Bookmark bookmarkProjectCode = doc.Range.Bookmarks["projectCode"];
|
||||
if (bookmarkProjectCode != null)
|
||||
@@ -362,7 +370,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
var valModel = db.Sys_User.Where(x => x.UserId == inspectionModel.CompileMan).FirstOrDefault();
|
||||
if (inspectionModel != null && valModel != null)
|
||||
{
|
||||
bookmarkunitNamefbs.Text = valModel.UserName;
|
||||
bookmarkcompileMan.Text = valModel.UserName;
|
||||
}
|
||||
}
|
||||
//总承包商名称
|
||||
@@ -387,7 +395,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
{
|
||||
if (inspectionModel != null)
|
||||
{
|
||||
bookmarkinspectionDate.Text = inspectionModel.InspectionDate.ToString().Split(' ')[0].Replace("/", "-");
|
||||
bookmarkinspectionDate.Text = inspectionModel.InspectionDate.ToString().Replace("/", "-");
|
||||
}
|
||||
}
|
||||
//共检地点
|
||||
@@ -446,7 +454,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
builder.StartTable();
|
||||
builder.CellFormat.Borders.LineStyle = Aspose.Words.LineStyle.Single;
|
||||
builder.CellFormat.Borders.Color = System.Drawing.Color.Black;
|
||||
|
||||
|
||||
builder.Bold = false;
|
||||
builder.RowFormat.Height = 20;
|
||||
builder.Font.Size = 10;
|
||||
@@ -462,8 +470,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
{
|
||||
builder.RowFormat.Height = 200 / ManagementDetaillList.Count;
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
builder.RowFormat.Height = 20;
|
||||
}
|
||||
builder.CellFormat.Borders.Left.LineWidth = 1;
|
||||
@@ -474,7 +481,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
builder.CellFormat.Width = 156;
|
||||
builder.Write(ConvertControlPointType(item.ControlPointType));
|
||||
builder.CellFormat.Borders.Left.LineWidth = 0;
|
||||
// 控制点等级
|
||||
// 控制点等级
|
||||
builder.InsertCell();
|
||||
builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None;
|
||||
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
||||
@@ -484,12 +491,11 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
|
||||
var ControlPointType = ConvertClass(item.ControlPointType);
|
||||
#region 控制点等级
|
||||
if (ControlPointType.Contains("A"))
|
||||
if (ControlPointType.Contains("A") )
|
||||
{
|
||||
builder.Write("■A ");
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
builder.Write("□A ");
|
||||
}
|
||||
if (ControlPointType.Contains("B"))
|
||||
@@ -516,7 +522,8 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
|
||||
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
|
||||
builder.CellFormat.Width = 113.5;
|
||||
builder.Write("");
|
||||
var ControlBasis = ConvertBasis(item.ControlPointType);
|
||||
builder.Write(ControlBasis);
|
||||
|
||||
//合并单元格
|
||||
builder.InsertCell();
|
||||
@@ -694,24 +701,24 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
builder.ParagraphFormat.Alignment = ParagraphAlignment.Left;//水平居中对齐
|
||||
builder.CellFormat.Width = 487.5;
|
||||
builder.ParagraphFormat.LineSpacing = 16; //设置1倍行距 12就是一倍行距
|
||||
builder.Write("备注:\r\r\r\r\r\r验收意见:\r总承包商意见: □合格 □不合格\r\r监理意见: □合格 □不合格\r\r业主意见: □合格 □不合格\r\r\r");
|
||||
builder.Write("备注:\r\r验收意见:\r总承包商意见: □合格 □不合格\r监理意见: □合格 □不合格\r业主意见: □合格 □不合格\r ");
|
||||
#region 生成二维码
|
||||
|
||||
string imageUrl = Funs.RootPath + CreateQRCodeService.CreateCode_Simple("InspectionNotice$" + Id);
|
||||
if (File.Exists(imageUrl))
|
||||
{
|
||||
builder.ParagraphFormat.Alignment = ParagraphAlignment.Right;//水平居中对齐
|
||||
builder.InsertImage(imageUrl, 100, 100);
|
||||
}
|
||||
#endregion
|
||||
builder.EndRow();
|
||||
|
||||
builder.ParagraphFormat.Alignment = ParagraphAlignment.Left;//水平居中对齐
|
||||
builder.Write("注:如果业主有规定,执行业主的规定。 ");
|
||||
#endregion
|
||||
|
||||
#region 生成二维码
|
||||
|
||||
string imageUrl = Funs.RootPath + CreateQRCodeService.CreateCode_Simple("InspectionNotice$" + Id);
|
||||
if (File.Exists(imageUrl))
|
||||
{
|
||||
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Top;//垂直居中对齐
|
||||
builder.ParagraphFormat.Alignment = ParagraphAlignment.Right;//水平居中对齐
|
||||
builder.InsertImage(imageUrl, 100, 100);
|
||||
}
|
||||
#endregion
|
||||
doc.Save(newUrl);
|
||||
|
||||
doc.Save(newUrl);
|
||||
string fileName = Path.GetFileName(newUrl);
|
||||
FileInfo info = new FileInfo(newUrl);
|
||||
long fileSize = info.Length;
|
||||
@@ -732,8 +739,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
}
|
||||
}
|
||||
|
||||
public class WorkBranchList
|
||||
{
|
||||
public class WorkBranchList {
|
||||
public string UnitWorkId { get; set; }
|
||||
public string Branch { get; set; }
|
||||
}
|
||||
@@ -814,6 +820,41 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取执行依据
|
||||
/// </summary>
|
||||
/// <param name="ControlPointType"></param>
|
||||
/// <returns></returns>
|
||||
protected string ConvertBasis(object ControlPointType)
|
||||
{
|
||||
string name = string.Empty;
|
||||
if (ControlPointType != null)
|
||||
{
|
||||
var controlPointType = BLL.BreakdownProjectService.GetBreakdownProjectById(ControlPointType.ToString());
|
||||
if (controlPointType != null)
|
||||
{
|
||||
name = controlPointType.Basis;
|
||||
}
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取检查人名称
|
||||
/// </summary>
|
||||
/// <param name="CarryUnitIds"></param>
|
||||
/// <returns></returns>
|
||||
protected string ConvertCheckMan(object CarryUnitIds)
|
||||
{
|
||||
var uname = BLL.UserService.getUserNamesUserIds(CarryUnitIds);
|
||||
if (string.IsNullOrEmpty(uname))
|
||||
{
|
||||
uname = CarryUnitIds.ToString();
|
||||
}
|
||||
return uname;
|
||||
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -140,6 +140,15 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblPageIndex;
|
||||
|
||||
/// <summary>
|
||||
/// Label3 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label3;
|
||||
|
||||
/// <summary>
|
||||
/// lbtnFileUrl 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -56,14 +56,18 @@
|
||||
</f:FormRow>--%>
|
||||
<f:FormRow ColumnWidths="50% 10% 30%">
|
||||
<Items>
|
||||
<f:TextBox runat="server" ID="txtAcceptanceCheckMan" Label="检查人" LabelAlign="Right" LabelWidth="130px" ></f:TextBox>
|
||||
<f:Label ID="Label1" runat="server" Label="上传附件"
|
||||
<f:DropDownList ID="drpAcceptanceCheckMan" runat="server" Label="检查人" EnableCheckBoxSelect="true"
|
||||
EnableMultiSelect="true">
|
||||
</f:DropDownList>
|
||||
<%-- <f:TextBox runat="server" ID="txtAcceptanceCheckMan" Label="检查人" LabelAlign="Right" LabelWidth="130px" ></f:TextBox>--%>
|
||||
<f:Label ID="Label1" runat="server" Label="上传附件" ShowRedStar="true"
|
||||
LabelWidth="130px" LabelAlign="Right" >
|
||||
</f:Label>
|
||||
<f:Button ID="btnAttach" Icon="TableCell" EnablePostBack="true" Text="附件" runat="server" OnClick="btnAttach_Click" >
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
GetButtonPower();
|
||||
BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(drpUnit, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, true);//施工分包商
|
||||
BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessionalId, true);//专业
|
||||
|
||||
UserService.InitUserProjectIdUnitTypeDropDownList(this.drpAcceptanceCheckMan, this.CurrUser.LoginProjectId, Const.ProjectUnitType_2, false);
|
||||
this.hdInspectionNoticeId.Text = Request.Params["inspectionId"];
|
||||
if (!string.IsNullOrEmpty(this.hdInspectionNoticeId.Text))
|
||||
{
|
||||
@@ -37,7 +37,10 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
this.drpCNProfessionalId.SelectedValue = inspectionManagement.CNProfessionalId;
|
||||
}
|
||||
this.txtAcceptanceSite.Text = inspectionManagement.AcceptanceSite;
|
||||
this.txtAcceptanceCheckMan.Text = inspectionManagement.AcceptanceCheckMan;
|
||||
if (!string.IsNullOrEmpty(inspectionManagement.AcceptanceCheckMan))
|
||||
{
|
||||
this.drpAcceptanceCheckMan.SelectedValueArray = inspectionManagement.AcceptanceCheckMan.Split(',');
|
||||
}
|
||||
this.txtNoticeCode.Text = inspectionManagement.NoticeCode;
|
||||
this.Grid1.DataSource = BLL.InspectionManagementDetailService.GetInspectionDetails(this.hdInspectionNoticeId.Text.Trim());
|
||||
this.Grid1.DataBind();
|
||||
@@ -74,6 +77,8 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
Alert.ShowInTop("请先选择专业!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Model.ProcessControl_InspectionManagement inspectionManagement = new Model.ProcessControl_InspectionManagement();
|
||||
inspectionManagement.ProjectId = this.CurrUser.LoginProjectId;
|
||||
if (this.drpUnit.SelectedValue != BLL.Const._Null)
|
||||
@@ -86,9 +91,28 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
}
|
||||
inspectionManagement.NoticeCode = this.txtNoticeCode.Text.Trim();
|
||||
inspectionManagement.AcceptanceSite = this.txtAcceptanceSite.Text.Trim();
|
||||
inspectionManagement.AcceptanceCheckMan = this.txtAcceptanceCheckMan.Text.Trim();
|
||||
|
||||
//检查人
|
||||
string CheckManIds = string.Empty;
|
||||
foreach (var item in this.drpAcceptanceCheckMan.SelectedValueArray)
|
||||
{
|
||||
CheckManIds += item + ",";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(CheckManIds))
|
||||
{
|
||||
CheckManIds = CheckManIds.Substring(0, CheckManIds.LastIndexOf(","));
|
||||
}
|
||||
inspectionManagement.AcceptanceCheckMan = CheckManIds;
|
||||
//inspectionManagement.AcceptanceCheckMan = this.txtAcceptanceCheckMan.Text.Trim();
|
||||
if (string.IsNullOrEmpty(Request.Params["inspectionId"]))
|
||||
{
|
||||
//编号不能重复
|
||||
var InspectionManagementModel = Funs.DB.ProcessControl_InspectionManagement.FirstOrDefault(x => x.NoticeCode == this.txtNoticeCode.Text.Trim());
|
||||
if (InspectionManagementModel != null)
|
||||
{
|
||||
ShowNotify("共检通知单编号已存在,不能重复!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
inspectionManagement.CompileMan = this.CurrUser.UserId;
|
||||
inspectionManagement.CompileDate = DateTime.Now;
|
||||
if (!string.IsNullOrEmpty(this.hdInspectionNoticeId.Text.Trim()))
|
||||
@@ -100,13 +124,35 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
inspectionManagement.InspectionId = SQLHelper.GetNewID(typeof(Model.ProcessControl_InspectionManagement));
|
||||
this.hdInspectionNoticeId.Text = inspectionManagement.InspectionId;
|
||||
}
|
||||
var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == inspectionManagement.InspectionId);
|
||||
if (sour == null || string.IsNullOrEmpty(sour.AttachUrl))
|
||||
{
|
||||
Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
BLL.InspectionManagementService.AddInspectionManagement(inspectionManagement);
|
||||
}
|
||||
else
|
||||
{
|
||||
//编号不能重复
|
||||
var InspectionManagementModel = Funs.DB.ProcessControl_InspectionManagement.FirstOrDefault(x => x.NoticeCode == this.txtNoticeCode.Text.Trim()
|
||||
&& x.InspectionId!= Request.Params["inspectionId"]);
|
||||
if (InspectionManagementModel != null)
|
||||
{
|
||||
ShowNotify("共检通知单编号已存在,不能重复!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
Model.ProcessControl_InspectionManagement oldInspectionManagement = BLL.InspectionManagementService.GetInspectionManagementById(this.hdInspectionNoticeId.Text.Trim());
|
||||
inspectionManagement.AttachUrl2 = oldInspectionManagement.AttachUrl2;
|
||||
inspectionManagement.InspectionId = this.hdInspectionNoticeId.Text.Trim();
|
||||
var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == inspectionManagement.InspectionId);
|
||||
if (sour == null || string.IsNullOrEmpty(sour.AttachUrl))
|
||||
{
|
||||
Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
BLL.InspectionManagementService.UpdateInspectionManagement(inspectionManagement);
|
||||
BLL.InspectionManagementDetailService.DeleteAllInspectionDetail(inspectionManagement.InspectionId);
|
||||
}
|
||||
|
||||
+32
-30
@@ -7,11 +7,13 @@
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.CQMS.ProcessControl {
|
||||
|
||||
|
||||
public partial class InspectionNoticeEdit {
|
||||
|
||||
namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
{
|
||||
|
||||
|
||||
public partial class InspectionNoticeEdit
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
@@ -20,7 +22,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
@@ -29,7 +31,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// SimpleForm1 控件。
|
||||
/// </summary>
|
||||
@@ -38,7 +40,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// drpUnit 控件。
|
||||
/// </summary>
|
||||
@@ -47,7 +49,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpUnit;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// drpCNProfessionalId 控件。
|
||||
/// </summary>
|
||||
@@ -56,7 +58,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpCNProfessionalId;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtNoticeCode 控件。
|
||||
/// </summary>
|
||||
@@ -65,7 +67,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtNoticeCode;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtAcceptanceSite 控件。
|
||||
/// </summary>
|
||||
@@ -74,16 +76,16 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtAcceptanceSite;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtAcceptanceCheckMan 控件。
|
||||
/// drpAcceptanceCheckMan 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtAcceptanceCheckMan;
|
||||
|
||||
protected global::FineUIPro.DropDownList drpAcceptanceCheckMan;
|
||||
|
||||
/// <summary>
|
||||
/// Label1 控件。
|
||||
/// </summary>
|
||||
@@ -92,7 +94,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label Label1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnAttach 控件。
|
||||
/// </summary>
|
||||
@@ -101,7 +103,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAttach;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Panel2 控件。
|
||||
/// </summary>
|
||||
@@ -110,7 +112,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel2;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
@@ -119,7 +121,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar4 控件。
|
||||
/// </summary>
|
||||
@@ -128,7 +130,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar4;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnNew 控件。
|
||||
/// </summary>
|
||||
@@ -137,7 +139,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnNew;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Label2 控件。
|
||||
/// </summary>
|
||||
@@ -146,7 +148,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label2;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Label3 控件。
|
||||
/// </summary>
|
||||
@@ -155,7 +157,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label3;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Label5 控件。
|
||||
/// </summary>
|
||||
@@ -164,7 +166,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label5;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Label4 控件。
|
||||
/// </summary>
|
||||
@@ -173,7 +175,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label4;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
@@ -182,7 +184,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// hdItemsString 控件。
|
||||
/// </summary>
|
||||
@@ -191,7 +193,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdItemsString;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// hdInspectionNoticeId 控件。
|
||||
/// </summary>
|
||||
@@ -200,7 +202,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdInspectionNoticeId;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
@@ -209,7 +211,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
@@ -218,7 +220,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user