修改共检通知单
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user