提交代码

This commit is contained in:
2023-11-23 16:50:57 +08:00
parent aedd071d96
commit 1530dd850b
27 changed files with 974 additions and 250 deletions
@@ -0,0 +1,5 @@
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('2C66A01D-B53F-46A1-89F0-30ED137C7498','检测结果汇总','HJGL/WeldingReport/CheckResult.aspx',100,'F3B157B7-9BEE-4150-80CB-087828F1C51D','Menu_HJGL',0,1,1)
GO
INSERT INTO Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('C5671119-2DDD-4A64-B7C6-492B96C5AEC7','2C66A01D-B53F-46A1-89F0-30ED137C7498','查看',1)
GO
@@ -543,6 +543,12 @@ GO
INSERT INTO Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('47A49DB1-4689-421A-A93E-DCBD7C34D917','854C79DF-A1C0-4E3C-BCB4-7D5CD044F72B','查看',1)
GO
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('2C66A01D-B53F-46A1-89F0-30ED137C7498','检测结果汇总','HJGL/WeldingReport/CheckResult.aspx',100,'F3B157B7-9BEE-4150-80CB-087828F1C51D','Menu_HJGL',0,1,1)
GO
INSERT INTO Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('C5671119-2DDD-4A64-B7C6-492B96C5AEC7','2C66A01D-B53F-46A1-89F0-30ED137C7498','查看',1)
GO
--INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
--VALUES('CF3CB43C-4031-4CFD-905F-154DC1CB881E','管线综合信息','HJGL/WeldingReport/IsoCompreInfo.aspx',80,'F3B157B7-9BEE-4150-80CB-087828F1C51D','Menu_HJGL',0,1,1)
+4
View File
@@ -3451,6 +3451,10 @@ namespace BLL
/// 公司平均工效统计模板文件原始虚拟路径
/// </summary>
public const string CompanyConstructionLogWorkEfficiencyTemplateUrl = "File\\Excel\\ConstructionLog\\公司平均工效统计.xlsx";
/// <summary>
/// 焊口二次设计信息模板文件原始虚拟路径
/// </summary>
public const string JotTwoDesignTemplateUrl = "File\\Excel\\DataOut\\焊口二次设计信息.xlsx";
#endregion
#region
+2 -2
View File
@@ -65,10 +65,10 @@ namespace BLL
/// <param name="welderId"></param>
/// <param name="welderCode"></param>
/// <returns></returns>
public static bool IsExisWelderCode(string welderId, string welderCode)
public static bool IsExisWelderCode(string welderId, string welderCode, string projectId)
{
bool isExitCode = false;
var q = from x in Funs.DB.SitePerson_Person where x.WelderCode == welderCode && x.PersonId != welderId select x;
var q = from x in Funs.DB.SitePerson_Person where x.WelderCode == welderCode && x.PersonId != welderId && x.ProjectId == projectId select x;
if (q.Count() > 0)
{
isExitCode = true;
+43 -18
View File
@@ -100,31 +100,31 @@ namespace BLL
{
var newWeldJoint = BLL.WeldJointService.GetWeldJointByWeldJointId(weldJointId);
if (newWeldJoint != null )
if (newWeldJoint != null)
{
var isTrust = from x in Funs.DB.HJGL_Batch_BatchTrustItem
where x.WeldJointId == weldJointId
select x; ;
if (!isTrust.Any())
{
var pointBatchItems = from x in Funs.DB.HJGL_Batch_PointBatchItem where x.WeldJointId == weldJointId select x;
string pointBatchId = pointBatchItems.FirstOrDefault()?.PointBatchId;
{
var pointBatchItems = from x in Funs.DB.HJGL_Batch_PointBatchItem where x.WeldJointId == weldJointId select x;
string pointBatchId = pointBatchItems.FirstOrDefault()?.PointBatchId;
// 删除焊口所在批明细信息
BLL.PointBatchDetailService.DeleteBatchDetail(weldJointId);
// 删除焊口所在批明细信息
BLL.PointBatchDetailService.DeleteBatchDetail(weldJointId);
// 删除批信息
var batch = from x in Funs.DB.HJGL_Batch_PointBatchItem where x.PointBatchId == pointBatchId select x;
if (!string.IsNullOrEmpty(pointBatchId) && !batch.Any())
{
DeleteBatch(pointBatchId);
}
//BLL.Batch_NDEItemService.DeleteAllNDEInfoToWeldJoint(item.WeldJointId);
// 删除批信息
var batch = from x in Funs.DB.HJGL_Batch_PointBatchItem where x.PointBatchId == pointBatchId select x;
if (!string .IsNullOrEmpty(pointBatchId) && !batch.Any())
{
DeleteBatch(pointBatchId);
}
//BLL.Batch_NDEItemService.DeleteAllNDEInfoToWeldJoint(item.WeldJointId);
}
else
{
// errlog += "焊口【" + newWeldJoint.WeldJointCode + "】已进委托单了,不能删除。";
// errlog += "焊口【" + newWeldJoint.WeldJointCode + "】已进委托单了,不能删除。";
}
}
}
@@ -138,7 +138,7 @@ namespace BLL
var newWeldJoint = BLL.WeldJointService.GetWeldJointByWeldJointId(weldJointId);
var pipeline = BLL.PipelineService.GetPipelineByPipelineId(newWeldJoint.PipelineId);
var project = BLL.ProjectService.GetProjectByProjectId(pipeline.ProjectId);
var unitWork = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(pipeline.UnitWorkId);
var unitWork = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(pipeline.UnitWorkId);
var WeldingDaily = BLL.WeldingDailyService.GetPipeline_WeldingDailyByWeldingDailyId(newWeldJoint.WeldingDailyId);
var ndt = BLL.Base_DetectionTypeService.GetDetectionTypeByDetectionTypeId(pipeline.DetectionType);
var ndtr = BLL.Base_DetectionRateService.GetDetectionRateByDetectionRateId(pipeline.DetectionRateId);
@@ -236,8 +236,33 @@ namespace BLL
batch.PointBatchId = SQLHelper.GetNewID(typeof(Model.HJGL_Batch_PointBatch));
batchId = batch.PointBatchId;
string perfix = project.ProjectCode + "-" + unitWork.UnitWorkCode + "-GD-DK-" + ndt.DetectionTypeCode + "-" + ndtr.DetectionRateValue.ToString() + "%-";
batch.PointBatchCode = BLL.SQLHelper.RunProcNewIdByProjectId("SpGetNewCode4ByProjectId", "dbo.HJGL_Batch_PointBatch", "PointBatchCode", project.ProjectId, perfix);
//batch.PointBatchCode = BLL.SQLHelper.RunProcNewIdByProjectId("SpGetNewCode4ByProjectId", "dbo.HJGL_Batch_PointBatch", "PointBatchCode", project.ProjectId, perfix);
var maxBatch = (from x in Funs.DB.HJGL_Batch_PointBatch where x.ProjectId == project.ProjectId && x.PointBatchCode.Contains(perfix) select x).FirstOrDefault();
if (maxBatch == null)
{
batch.PointBatchCode = perfix + "0001";
}
else
{
int code = Funs.GetNewIntOrZero(maxBatch.PointBatchCode.Substring(maxBatch.PointBatchCode.Length - 4));
code = code + 1;
if (code < 10)
{
batch.PointBatchCode = perfix + "000" + code.ToString();
}
else if (code >= 10 && code < 100)
{
batch.PointBatchCode = perfix + "00" + code.ToString();
}
else if (code >= 100 && code < 1000)
{
batch.PointBatchCode = perfix + "0" + code.ToString();
}
else
{
batch.PointBatchCode = perfix + code.ToString();
}
}
batch.ProjectId = project.ProjectId;
batch.UnitWorkId = pipeline.UnitWorkId;
batch.BatchCondition = batchCondition;
+25 -18
View File
@@ -9,7 +9,7 @@ namespace BLL
{
public static class WeldJointService
{
public static List<Model.HJGL_WeldJoint> hJGL_WeldJoints
public static List<Model.HJGL_WeldJoint> hJGL_WeldJoints
{
get;
@@ -66,14 +66,14 @@ namespace BLL
}
public static List<Model.HJGL_WeldJoint> GetWeldJointsByPipelineId(string PipelineId)
{
var q = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == PipelineId select x).ToList();
var q = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == PipelineId select x).ToList();
return q;
}
public static Model.HJGL_WeldJoint GetWeldJointsByWeldJointCode(string PipelineId, string WeldJointCode)
{
var q=(from x in Funs.DB.HJGL_WeldJoint where x.PipelineId==PipelineId && x.WeldJointCode==WeldJointCode select x ).FirstOrDefault();
{
var q = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == PipelineId && x.WeldJointCode == WeldJointCode select x).FirstOrDefault();
return q;
}
@@ -87,7 +87,6 @@ namespace BLL
Model.SGGLDB db = Funs.DB;
Model.HJGL_WeldJoint newWeldJoint = new Model.HJGL_WeldJoint
{
WeldJointId = SQLHelper.GetNewID(typeof(Model.HJGL_WeldJoint)),
ProjectId = weldJoint.ProjectId,
PipelineId = weldJoint.PipelineId,
PipelineCode = weldJoint.PipelineCode,
@@ -97,7 +96,7 @@ namespace BLL
Material2Id = weldJoint.Material2Id,
Thickness = weldJoint.Thickness,
Dia = weldJoint.Dia,
DNDia=weldJoint.DNDia,
DNDia = weldJoint.DNDia,
Size = weldJoint.Size,
DetectionTypeId = weldJoint.DetectionTypeId,
JointArea = weldJoint.JointArea,
@@ -120,9 +119,16 @@ namespace BLL
Remark = weldJoint.Remark,
IsTwoJoint = weldJoint.IsTwoJoint,
SubmitMan = weldJoint.SubmitMan,
TwoJointType=weldJoint.TwoJointType
TwoJointType = weldJoint.TwoJointType
};
if (!string.IsNullOrEmpty(weldJoint.WeldJointId))
{
newWeldJoint.WeldJointId = weldJoint.WeldJointId;
}
else
{
newWeldJoint.WeldJointId = SQLHelper.GetNewID(typeof(Model.HJGL_WeldJoint));
}
db.HJGL_WeldJoint.InsertOnSubmit(newWeldJoint);
db.SubmitChanges();
}
@@ -285,7 +291,7 @@ namespace BLL
public static void DeleteWeldJointByPipelineId(string pipelineId)
{
Model.SGGLDB db = Funs.DB;
var weldline = db.HJGL_WeldJoint.Where(e => e.PipelineId == pipelineId);
var weldline = db.HJGL_WeldJoint.Where(e => e.PipelineId == pipelineId);
if (weldline != null)
{
db.HJGL_WeldJoint.DeleteAllOnSubmit(weldline);
@@ -297,7 +303,7 @@ namespace BLL
/// 根据unitworkid删除焊口
/// </summary>
/// <param name="unitworkId"></param>
public static void DeleteWeldJointByUnitWorkId(string unitworkId)
public static void DeleteWeldJointByUnitWorkId(string unitworkId)
{
var oldPipeline = BLL.PipelineService.GetPipelinesByUnitWordId(unitworkId);
if (oldPipeline != null)
@@ -353,14 +359,14 @@ namespace BLL
{
Model.SGGLDB db = Funs.DB;
var q = (from x in db.HJGL_WeldJoint
join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId into tt
from g in tt.DefaultIfEmpty()
where g.UnitWorkId == UnitWorkId
join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId into tt
from g in tt.DefaultIfEmpty()
where g.UnitWorkId == UnitWorkId
select x).ToList();
return q;
}
public static List<Model.HJGL_WeldJoint> GetWeldJointByProjectid(string ProjectId)
public static List<Model.HJGL_WeldJoint> GetWeldJointByProjectid(string ProjectId)
{
Model.SGGLDB db = Funs.DB;
@@ -368,7 +374,7 @@ namespace BLL
where x.ProjectId == ProjectId
select x).ToList();
return q;
}
}
/// <summary>
/// 根据焊口Id获取插入焊口数
@@ -445,13 +451,14 @@ namespace BLL
public static List<Model.View_HJGL_WeldJoint> GetViewWeldJointsBymodel(Model.View_HJGL_WeldJoint model)
{
var q = (from x in Funs.DB.View_HJGL_WeldJoint
where
where
(string.IsNullOrEmpty(model.ProjectId) || x.ProjectId.Contains(model.ProjectId))
&& (string.IsNullOrEmpty(model.UnitWorkId) || x.UnitWorkId.Contains(model.UnitWorkId))
&& (string.IsNullOrEmpty(model.PipelineId) || x.PipelineId.Contains(model.PipelineId))
&& (string.IsNullOrEmpty(model.PipelineCode) || x.PipelineCode.Contains(model.PipelineCode))
&& (string.IsNullOrEmpty(model.WeldJointCode) || x.WeldJointCode.Contains(model.WeldJointCode))
orderby x.WeldJointCode select x).AsParallel().ToList();
orderby x.WeldJointCode
select x).AsParallel().ToList();
return q;
}
/// <summary>
@@ -39,6 +39,15 @@
EmptyText="输入查询条件" Width="190px" LabelWidth="80px"
LabelAlign="Right">
</f:TextBox>
</Items>
</f:Toolbar>
<f:Toolbar ID="Toolbar4" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:TextBox ID="txtName" runat="server" Label="焊工姓名"
EmptyText="输入查询条件" Width="190px" LabelWidth="80px"
LabelAlign="Right">
</f:TextBox>
<f:Button ID="btnQuery" ToolTip="查询" Icon="SystemSearch"
EnablePostBack="true" OnClick="btnQuery_Click1" runat="server">
</f:Button>
@@ -191,11 +191,15 @@ namespace FineUIPro.Web.CQMS.PersonManage
rootNode.Text = item.UnitName;
rootNode.EnableClickEvent = true;
this.tvControlItem.Nodes.Add(rootNode);
var getWelders = (from x in Funs.DB.SitePerson_Person where x.ProjectId == this.CurrUser.LoginProjectId && x.WorkPostId == Const.WorkPost_Welder && x.States == Const.ProjectPersonStates_1 && x.UnitId == item.UnitId select x).ToList();
var getWelders = (from x in Funs.DB.SitePerson_Person where x.ProjectId == this.CurrUser.LoginProjectId && x.WorkPostId == Const.WorkPost_Welder && x.UnitId == item.UnitId select x).ToList();
if (!string.IsNullOrEmpty(txtQueryWelderCode.Text.Trim()))
{
getWelders = getWelders.Where(x => x.WelderCode.Contains(txtQueryWelderCode.Text.Trim())).ToList();
}
if (!string.IsNullOrEmpty(txtName.Text.Trim()))
{
getWelders = getWelders.Where(x => x.PersonName.Contains(txtName.Text.Trim())).ToList();
}
foreach (var sitem in getWelders)
{
TreeNode tn = new TreeNode();
@@ -7,13 +7,11 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.CQMS.PersonManage
{
public partial class WelderManage
{
namespace FineUIPro.Web.CQMS.PersonManage {
public partial class WelderManage {
/// <summary>
/// form1 控件。
/// </summary>
@@ -22,7 +20,7 @@ namespace FineUIPro.Web.CQMS.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
@@ -31,7 +29,7 @@ namespace FineUIPro.Web.CQMS.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
@@ -40,7 +38,7 @@ namespace FineUIPro.Web.CQMS.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// panelLeftRegion 控件。
/// </summary>
@@ -49,7 +47,7 @@ namespace FineUIPro.Web.CQMS.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelLeftRegion;
/// <summary>
/// Toolbar3 控件。
/// </summary>
@@ -58,7 +56,7 @@ namespace FineUIPro.Web.CQMS.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar3;
/// <summary>
/// txtQueryWelderCode 控件。
/// </summary>
@@ -67,7 +65,25 @@ namespace FineUIPro.Web.CQMS.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtQueryWelderCode;
/// <summary>
/// Toolbar4 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar4;
/// <summary>
/// txtName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtName;
/// <summary>
/// btnQuery 控件。
/// </summary>
@@ -76,7 +92,7 @@ namespace FineUIPro.Web.CQMS.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnQuery;
/// <summary>
/// tvControlItem 控件。
/// </summary>
@@ -85,7 +101,7 @@ namespace FineUIPro.Web.CQMS.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Tree tvControlItem;
/// <summary>
/// panelCenterRegion 控件。
/// </summary>
@@ -94,7 +110,7 @@ namespace FineUIPro.Web.CQMS.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelCenterRegion;
/// <summary>
/// Toolbar1 控件。
/// </summary>
@@ -103,7 +119,7 @@ namespace FineUIPro.Web.CQMS.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// ToolbarFill2 控件。
/// </summary>
@@ -112,7 +128,7 @@ namespace FineUIPro.Web.CQMS.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill2;
/// <summary>
/// btnEdit 控件。
/// </summary>
@@ -121,7 +137,7 @@ namespace FineUIPro.Web.CQMS.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnEdit;
/// <summary>
/// btnDelete 控件。
/// </summary>
@@ -130,7 +146,7 @@ namespace FineUIPro.Web.CQMS.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnDelete;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
@@ -139,7 +155,7 @@ namespace FineUIPro.Web.CQMS.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// drpUnitId 控件。
/// </summary>
@@ -148,7 +164,7 @@ namespace FineUIPro.Web.CQMS.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label drpUnitId;
/// <summary>
/// txtWelderName 控件。
/// </summary>
@@ -157,7 +173,7 @@ namespace FineUIPro.Web.CQMS.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label txtWelderName;
/// <summary>
/// txtWelderCode 控件。
/// </summary>
@@ -166,7 +182,7 @@ namespace FineUIPro.Web.CQMS.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label txtWelderCode;
/// <summary>
/// rblSex 控件。
/// </summary>
@@ -175,7 +191,7 @@ namespace FineUIPro.Web.CQMS.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label rblSex;
/// <summary>
/// txtBirthday 控件。
/// </summary>
@@ -184,7 +200,7 @@ namespace FineUIPro.Web.CQMS.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label txtBirthday;
/// <summary>
/// txtCertificateCode 控件。
/// </summary>
@@ -193,7 +209,7 @@ namespace FineUIPro.Web.CQMS.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label txtCertificateCode;
/// <summary>
/// txtWelderLevel 控件。
/// </summary>
@@ -202,7 +218,7 @@ namespace FineUIPro.Web.CQMS.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label txtWelderLevel;
/// <summary>
/// cbIsOnDuty 控件。
/// </summary>
@@ -211,7 +227,7 @@ namespace FineUIPro.Web.CQMS.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBox cbIsOnDuty;
/// <summary>
/// txtCertificateLimitTime 控件。
/// </summary>
@@ -220,7 +236,7 @@ namespace FineUIPro.Web.CQMS.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label txtCertificateLimitTime;
/// <summary>
/// Grid1 控件。
/// </summary>
@@ -229,7 +245,7 @@ namespace FineUIPro.Web.CQMS.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Toolbar2 控件。
/// </summary>
@@ -238,7 +254,7 @@ namespace FineUIPro.Web.CQMS.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
/// <summary>
/// txtQualificationItem 控件。
/// </summary>
@@ -247,7 +263,7 @@ namespace FineUIPro.Web.CQMS.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtQualificationItem;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
@@ -256,7 +272,7 @@ namespace FineUIPro.Web.CQMS.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btnNew 控件。
/// </summary>
@@ -265,7 +281,7 @@ namespace FineUIPro.Web.CQMS.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnNew;
/// <summary>
/// ToolbarSeparator1 控件。
/// </summary>
@@ -274,7 +290,7 @@ namespace FineUIPro.Web.CQMS.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
@@ -283,7 +299,7 @@ namespace FineUIPro.Web.CQMS.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
/// <summary>
/// ddlPageSize 控件。
/// </summary>
@@ -292,7 +308,7 @@ namespace FineUIPro.Web.CQMS.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
/// <summary>
/// Window1 控件。
/// </summary>
@@ -301,7 +317,7 @@ namespace FineUIPro.Web.CQMS.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
/// <summary>
/// Menu1 控件。
/// </summary>
@@ -310,7 +326,7 @@ namespace FineUIPro.Web.CQMS.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu1;
/// <summary>
/// btnMenuAudit 控件。
/// </summary>
@@ -319,7 +335,7 @@ namespace FineUIPro.Web.CQMS.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuAudit;
/// <summary>
/// btnMenuEdit 控件。
/// </summary>
@@ -328,7 +344,7 @@ namespace FineUIPro.Web.CQMS.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuEdit;
/// <summary>
/// btnMenuDelete 控件。
/// </summary>
@@ -337,7 +353,7 @@ namespace FineUIPro.Web.CQMS.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuDelete;
/// <summary>
/// btnView 控件。
/// </summary>
@@ -346,7 +362,7 @@ namespace FineUIPro.Web.CQMS.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnView;
/// <summary>
/// Menu2 控件。
/// </summary>
@@ -355,7 +371,7 @@ namespace FineUIPro.Web.CQMS.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu2;
/// <summary>
/// btnMenuTreeAudit 控件。
/// </summary>
@@ -170,7 +170,18 @@ namespace FineUIPro.Web.CQMS.PersonManage
//newWelder.Sex = this.rblSex.SelectedValue;
//newWelder.Birthday = Funs.GetNewDateTime(this.txtBirthday.Text.Trim());
newWelder.IdentityCard = this.txtIdentityCard.Text.Trim();
newWelder.CertificateCode = this.txtCertificateCode.Text.Trim();
if (!string.IsNullOrEmpty(this.txtCertificateCode.Text.Trim()))
{
newWelder.CertificateCode = this.txtCertificateCode.Text.Trim();
}
else
{
var welder = BLL.SitePerson_PersonService.GetSitePersonByProjectIdPersonId(this.CurrUser.LoginProjectId, PersonId);
if (welder != null)
{
newWelder.CertificateCode = welder.IdentityCard;
}
}
//newWelder.CertificateLimitTime = Funs.GetNewDateTime(this.txtCertificateLimitTime.Text.Trim());
newWelder.WelderLevel = this.txtWelderLevel.Text.Trim();
//if (this.cbIsOnDuty.Checked)
@@ -184,10 +195,10 @@ namespace FineUIPro.Web.CQMS.PersonManage
newWelder.Remark = this.txtRemark.Text.Trim();
//newWelder.PhotoUrl = this.PhotoAttachUrl;
newWelder.Isprint = "0";
// newWelder.IsUsed = true;
// newWelder.IsUsed = true;
if (!string.IsNullOrEmpty(PersonId))
{
if (!BLL.WelderService.IsExisWelderCode(PersonId, this.txtWelderCode.Text))
if (!BLL.WelderService.IsExisWelderCode(PersonId, this.txtWelderCode.Text, this.CurrUser.LoginProjectId))
{
newWelder.PersonId = PersonId;
BLL.WelderService.UpdateWelder(newWelder);
@@ -201,7 +212,7 @@ namespace FineUIPro.Web.CQMS.PersonManage
else
{
PersonId = SQLHelper.GetNewID(typeof(Model.SitePerson_Person));
if (!BLL.WelderService.IsExisWelderCode(PersonId, this.txtWelderCode.Text))
if (!BLL.WelderService.IsExisWelderCode(PersonId, this.txtWelderCode.Text, this.CurrUser.LoginProjectId))
{
newWelder.PersonId = PersonId;
// BLL.WelderService.AddWelder(newWelder);
+8
View File
@@ -721,6 +721,7 @@
<Content Include="HJGL\WeldingManage\WeldReport.aspx" />
<Content Include="HJGL\WeldingManage\WeldReportEdit.aspx" />
<Content Include="HJGL\WeldingManage\WeldTask.aspx" />
<Content Include="HJGL\WeldingReport\CheckResult.aspx" />
<Content Include="HJGL\WeldingReport\DefectStatistics.aspx" />
<Content Include="HJGL\WeldingReport\FirstPassRate.aspx" />
<Content Include="HJGL\WeldingReport\IsoCmprehensive.aspx" />
@@ -8977,6 +8978,13 @@
<Compile Include="HJGL\WeldingManage\WeldTask.aspx.designer.cs">
<DependentUpon>WeldTask.aspx</DependentUpon>
</Compile>
<Compile Include="HJGL\WeldingReport\CheckResult.aspx.cs">
<DependentUpon>CheckResult.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="HJGL\WeldingReport\CheckResult.aspx.designer.cs">
<DependentUpon>CheckResult.aspx</DependentUpon>
</Compile>
<Compile Include="HJGL\WeldingReport\DefectStatistics.aspx.cs">
<DependentUpon>DefectStatistics.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@@ -39,6 +39,15 @@
EmptyText="输入查询条件" Width="190px" LabelWidth="80px"
LabelAlign="Right">
</f:TextBox>
</Items>
</f:Toolbar>
<f:Toolbar ID="Toolbar4" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:TextBox ID="txtName" runat="server" Label="焊工姓名"
EmptyText="输入查询条件" Width="190px" LabelWidth="80px"
LabelAlign="Right">
</f:TextBox>
<f:Button ID="btnQuery" ToolTip="查询" Icon="SystemSearch"
EnablePostBack="true" OnClick="btnQuery_Click1" runat="server">
</f:Button>
@@ -37,9 +37,9 @@ namespace FineUIPro.Web.HJGL.PersonManage
Model.SitePerson_Person welder = BLL.SitePerson_PersonService.GetSitePersonByProjectIdPersonId(this.CurrUser.LoginProjectId, this.tvControlItem.SelectedNodeID);
if (welder != null)
{
this.btnEdit.Hidden = false;
this.btnNew.Hidden = false;
this.btnDelete.Hidden = false;
//this.btnEdit.Hidden = false;
//this.btnNew.Hidden = false;
//this.btnDelete.Hidden = false;
this.txtWelderCode.Text = welder.WelderCode;
this.txtWelderName.Text = welder.PersonName;
@@ -191,7 +191,15 @@ namespace FineUIPro.Web.HJGL.PersonManage
rootNode.Text = item.UnitName;
rootNode.EnableClickEvent = true;
this.tvControlItem.Nodes.Add(rootNode);
var getWelders = (from x in Funs.DB.SitePerson_Person where x.ProjectId == this.CurrUser.LoginProjectId && x.WorkPostId == Const.WorkPost_Welder && x.UnitId == item.UnitId && x.WelderCode.Contains(txtQueryWelderCode.Text.Trim()) select x).ToList();
var getWelders = (from x in Funs.DB.SitePerson_Person where x.ProjectId == this.CurrUser.LoginProjectId && x.WorkPostId == Const.WorkPost_Welder && x.UnitId == item.UnitId select x).ToList();
if (!string.IsNullOrEmpty(txtQueryWelderCode.Text.Trim()))
{
getWelders = getWelders.Where(x => x.WelderCode.Contains(txtQueryWelderCode.Text.Trim())).ToList();
}
if (!string.IsNullOrEmpty(txtName.Text.Trim()))
{
getWelders = getWelders.Where(x => x.PersonName.Contains(txtName.Text.Trim())).ToList();
}
foreach (var sitem in getWelders)
{
TreeNode tn = new TreeNode();
@@ -202,7 +210,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
}
else
{
tn.Text = sitem.PersonName+"【"+ sitem.WelderCode + "】";
tn.Text = sitem.PersonName + "【" + sitem.WelderCode + "】";
}
tn.EnableClickEvent = true;
rootNode.Nodes.Add(tn);
@@ -565,6 +573,6 @@ namespace FineUIPro.Web.HJGL.PersonManage
#endregion
}
}
@@ -7,13 +7,11 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.HJGL.PersonManage
{
public partial class WelderManage
{
namespace FineUIPro.Web.HJGL.PersonManage {
public partial class WelderManage {
/// <summary>
/// form1 控件。
/// </summary>
@@ -22,7 +20,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
@@ -31,7 +29,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
@@ -40,7 +38,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// panelLeftRegion 控件。
/// </summary>
@@ -49,7 +47,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelLeftRegion;
/// <summary>
/// Toolbar3 控件。
/// </summary>
@@ -58,7 +56,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar3;
/// <summary>
/// txtQueryWelderCode 控件。
/// </summary>
@@ -67,7 +65,25 @@ namespace FineUIPro.Web.HJGL.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtQueryWelderCode;
/// <summary>
/// Toolbar4 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar4;
/// <summary>
/// txtName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtName;
/// <summary>
/// btnQuery 控件。
/// </summary>
@@ -76,7 +92,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnQuery;
/// <summary>
/// tvControlItem 控件。
/// </summary>
@@ -85,7 +101,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Tree tvControlItem;
/// <summary>
/// panelCenterRegion 控件。
/// </summary>
@@ -94,7 +110,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelCenterRegion;
/// <summary>
/// Toolbar1 控件。
/// </summary>
@@ -103,7 +119,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// ToolbarFill2 控件。
/// </summary>
@@ -112,7 +128,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill2;
/// <summary>
/// btnEdit 控件。
/// </summary>
@@ -121,7 +137,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnEdit;
/// <summary>
/// btnDelete 控件。
/// </summary>
@@ -130,7 +146,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnDelete;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
@@ -139,7 +155,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// drpUnitId 控件。
/// </summary>
@@ -148,7 +164,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label drpUnitId;
/// <summary>
/// txtWelderName 控件。
/// </summary>
@@ -157,7 +173,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label txtWelderName;
/// <summary>
/// txtWelderCode 控件。
/// </summary>
@@ -166,7 +182,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label txtWelderCode;
/// <summary>
/// rblSex 控件。
/// </summary>
@@ -175,7 +191,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label rblSex;
/// <summary>
/// txtBirthday 控件。
/// </summary>
@@ -184,7 +200,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label txtBirthday;
/// <summary>
/// txtCertificateCode 控件。
/// </summary>
@@ -193,7 +209,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label txtCertificateCode;
/// <summary>
/// txtWelderLevel 控件。
/// </summary>
@@ -202,7 +218,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label txtWelderLevel;
/// <summary>
/// cbIsOnDuty 控件。
/// </summary>
@@ -211,7 +227,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBox cbIsOnDuty;
/// <summary>
/// txtCertificateLimitTime 控件。
/// </summary>
@@ -220,7 +236,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label txtCertificateLimitTime;
/// <summary>
/// Grid1 控件。
/// </summary>
@@ -229,7 +245,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Toolbar2 控件。
/// </summary>
@@ -238,7 +254,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
/// <summary>
/// txtQualificationItem 控件。
/// </summary>
@@ -247,7 +263,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtQualificationItem;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
@@ -256,7 +272,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btnNew 控件。
/// </summary>
@@ -265,7 +281,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnNew;
/// <summary>
/// ToolbarSeparator1 控件。
/// </summary>
@@ -274,7 +290,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
@@ -283,7 +299,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
/// <summary>
/// ddlPageSize 控件。
/// </summary>
@@ -292,7 +308,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
/// <summary>
/// Window1 控件。
/// </summary>
@@ -301,7 +317,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
/// <summary>
/// Menu1 控件。
/// </summary>
@@ -310,7 +326,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu1;
/// <summary>
/// btnMenuAudit 控件。
/// </summary>
@@ -319,7 +335,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuAudit;
/// <summary>
/// btnMenuEdit 控件。
/// </summary>
@@ -328,7 +344,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuEdit;
/// <summary>
/// btnMenuDelete 控件。
/// </summary>
@@ -178,7 +178,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
// newWelder.IsUsed = true;
if (!string.IsNullOrEmpty(PersonId))
{
if (!BLL.WelderService.IsExisWelderCode(PersonId, this.txtWelderCode.Text))
if (!BLL.WelderService.IsExisWelderCode(PersonId, this.txtWelderCode.Text, this.CurrUser.LoginProjectId))
{
newWelder.PersonId = PersonId;
BLL.WelderService.UpdateWelder(newWelder);
@@ -192,7 +192,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
else
{
PersonId = SQLHelper.GetNewID(typeof(Model.SitePerson_Person));
if (!BLL.WelderService.IsExisWelderCode(PersonId, this.txtWelderCode.Text))
if (!BLL.WelderService.IsExisWelderCode(PersonId, this.txtWelderCode.Text, this.CurrUser.LoginProjectId))
{
newWelder.PersonId = PersonId;
// BLL.WelderService.AddWelder(newWelder);
@@ -83,6 +83,9 @@
<f:Button ID="btnOut2" runat="server" Text="导出" ToolTip="导出焊口初始数据信息" Hidden="true"
Icon="FolderUp" EnableAjax="false" DisableControlBeforePostBack="false" OnClick="btnOut2_Click">
</f:Button>
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出" ToolTip="导出" Icon="FolderUp"
EnableAjax="false" DisableControlBeforePostBack="false">
</f:Button>
<f:Button ID="btnPrint" Text="打印" Icon="Printer" runat="server"
OnClick="btnPrint_Click">
</f:Button>
@@ -1,8 +1,10 @@
using BLL;
using NPOI.SS.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
using System.Text;
using System.Web;
@@ -839,27 +841,171 @@ namespace FineUIPro.Web.HJGL.WeldingManage
#endregion
#region
/// <summary>
/// 导出焊口信息
/// 导出按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnOut_Click(object sender, EventArgs e)
{
//var iso = BLL.Pipeline_PipelineService.GetPipelineByPipelineId(this.tvControlItem.SelectedNodeID);
//var workArea = BLL.Project_WorkAreaService.GetProject_WorkAreaByWorkAreaId(this.tvControlItem.SelectedNodeID);
//if (iso != null)
//{
// PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("JointInfoOut.aspx?PipelineId={0}", this.tvControlItem.SelectedNodeID, "导出 - ")));
//}
//else if (workArea != null)
//{
// PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("JointInfoOut.aspx?WorkAreaId={0}", this.tvControlItem.SelectedNodeID, "导出 - ")));
//}
//else
//{
// Alert.ShowInTop("请选择"PipelineOrArea, MessageBoxIcon.Warning);
//}
string rootPath = Server.MapPath("~/");
string initTemplatePath = string.Empty;
string uploadfilepath = string.Empty;
string newUrl = string.Empty;
string filePath = string.Empty;
initTemplatePath = Const.JotTwoDesignTemplateUrl;
uploadfilepath = rootPath + initTemplatePath;
string constructionLogId = this.tvControlItem.SelectedNodeID;
Model.SGGLDB db = Funs.DB;
var workEfficiencys = from x in db.ZHGL_ConstructionLogWorkEfficiency
where x.ConstructionLogId == constructionLogId
select x;
var persons = from x in db.ZHGL_ConstructionLogPerson
where x.ConstructionLogId == constructionLogId
select x;
var machines = from x in db.ZHGL_ConstructionLogMachine
where x.ConstructionLogId == constructionLogId
select x;
if (this.Grid1.Rows.Count > 0)
{
newUrl = uploadfilepath.Replace(".xlsx", "(" + string.Format("{0:yyyy-MM-dd}", DateTime.Now) + ")" + ".xlsx");
File.Copy(uploadfilepath, newUrl);
// 第一步:读取文件流
NPOI.SS.UserModel.IWorkbook workbook;
using (FileStream stream = new FileStream(newUrl, FileMode.Open, FileAccess.Read))
{
workbook = new NPOI.XSSF.UserModel.XSSFWorkbook(stream);
}
// 创建单元格样式
NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle();
cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
cellStyle0.WrapText = true;
var font = workbook.CreateFont();
font.FontHeightInPoints = 11;
font.IsBold = false;
cellStyle0.SetFont(font);
// 第二步:创建新数据行
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
int rowCount = 2;
for (int i = 0; i < this.Grid1.Rows.Count; i++)
{
NPOI.SS.UserModel.IRow row1 = sheet.CreateRow(rowCount);
NPOI.SS.UserModel.ICell cell;
cell = row1.CreateCell(0);
cell.CellStyle = cellStyle0;
cell.SetCellValue((i+1).ToString());
cell = row1.CreateCell(1);
cell.CellStyle = cellStyle0;
cell.SetCellValue(this.Grid1.Rows[i].Values[2].ToString());
cell = row1.CreateCell(2);
cell.CellStyle = cellStyle0;
cell.SetCellValue(this.Grid1.Rows[i].Values[3].ToString());
cell = row1.CreateCell(3);
cell.CellStyle = cellStyle0;
cell.SetCellValue(this.Grid1.Rows[i].Values[4].ToString());
cell = row1.CreateCell(4);
cell.CellStyle = cellStyle0;
string date1 = this.Grid1.Rows[i].Values[5].ToString();
if (!string.IsNullOrEmpty(date1))
{
date1 = string.Format("{0:yyyy-MM-dd}",Funs.GetNewDateTime(date1));
}
cell.SetCellValue(date1);
cell = row1.CreateCell(5);
cell.CellStyle = cellStyle0;
cell.SetCellValue(this.Grid1.Rows[i].Values[6].ToString());
cell = row1.CreateCell(6);
cell.CellStyle = cellStyle0;
string date2 = this.Grid1.Rows[i].Values[7].ToString();
if (!string.IsNullOrEmpty(date2))
{
date2 = string.Format("{0:yyyy-MM-dd}", Funs.GetNewDateTime(date2));
}
cell.SetCellValue(date2);
cell = row1.CreateCell(7);
cell.CellStyle = cellStyle0;
string weldJointCode = string.Empty;
var weldJoint = BLL.WeldJointService.GetWeldJointByWeldJointId(this.Grid1.Rows[i].RowID);
if (weldJoint != null)
{
weldJointCode = weldJoint.WeldJointCode;
}
cell.SetCellValue(weldJointCode);
cell = row1.CreateCell(8);
cell.CellStyle = cellStyle0;
cell.SetCellValue(this.Grid1.Rows[i].Values[10].ToString());
cell = row1.CreateCell(9);
cell.CellStyle = cellStyle0;
cell.SetCellValue(this.Grid1.Rows[i].Values[11].ToString());
cell = row1.CreateCell(10);
cell.CellStyle = cellStyle0;
cell.SetCellValue(this.Grid1.Rows[i].Values[12].ToString());
cell = row1.CreateCell(11);
cell.CellStyle = cellStyle0;
cell.SetCellValue(this.Grid1.Rows[i].Values[13].ToString());
cell = row1.CreateCell(12);
cell.CellStyle = cellStyle0;
cell.SetCellValue(this.Grid1.Rows[i].Values[14].ToString());
cell = row1.CreateCell(13);
cell.CellStyle = cellStyle0;
cell.SetCellValue(this.Grid1.Rows[i].Values[15].ToString());
cell = row1.CreateCell(14);
cell.CellStyle = cellStyle0;
cell.SetCellValue(this.Grid1.Rows[i].Values[16].ToString());
cell = row1.CreateCell(15);
cell.CellStyle = cellStyle0;
cell.SetCellValue(this.Grid1.Rows[i].Values[17].ToString());
cell = row1.CreateCell(16);
cell.CellStyle = cellStyle0;
cell.SetCellValue(this.Grid1.Rows[i].Values[18].ToString());
cell = row1.CreateCell(17);
cell.CellStyle = cellStyle0;
cell.SetCellValue(this.Grid1.Rows[i].Values[20].ToString());
cell = row1.CreateCell(18);
cell.CellStyle = cellStyle0;
cell.SetCellValue(this.Grid1.Rows[i].Values[21].ToString());
cell = row1.CreateCell(19);
cell.CellStyle = cellStyle0;
cell.SetCellValue(this.Grid1.Rows[i].Values[22].ToString());
cell = row1.CreateCell(20);
cell.CellStyle = cellStyle0;
cell.SetCellValue(this.Grid1.Rows[i].Values[27].ToString());
rowCount++;
}
// 第三步:写入文件流
using (FileStream stream = new FileStream(newUrl, FileMode.Create, FileAccess.Write))
{
workbook.Write(stream);
workbook.Close();
}
string fileName = Path.GetFileName(newUrl);
FileInfo info = new FileInfo(newUrl);
long fileSize = info.Length;
Response.Clear();
Response.ContentType = "application/x-zip-compressed";
Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
Response.AddHeader("Content-Length", fileSize.ToString());
Response.TransmitFile(newUrl, 0, fileSize);
Response.Flush();
Response.Close();
File.Delete(newUrl);
}
else
{
ShowNotify("无数据可导出!", MessageBoxIcon.Warning);
}
}
/// <summary>
@@ -887,47 +1033,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
// Alert.ShowInTop("请选择"PipelinetFirst, MessageBoxIcon.Warning);
//}
}
/// <summary>
/// 导出方法
/// </summary>
/// <param name="grid"></param>
/// <returns></returns>
private string GetGridTableHtml(Grid grid)
{
StringBuilder sb = new StringBuilder();
sb.Append("<meta http-equiv=\"content-type\" content=\"application/excel; charset=UTF-8\"/>");
sb.Append("<table cellspacing=\"0\" rules=\"all\" border=\"1\" style=\"border-collapse:collapse;\">");
sb.Append("<tr>");
foreach (GridColumn column in grid.Columns)
{
if (column.HeaderText != "序号")
{
sb.AppendFormat("<td>{0}</td>", column.HeaderText);
}
}
sb.Append("</tr>");
foreach (GridRow row in grid.Rows)
{
sb.Append("<tr>");
foreach (GridColumn column in grid.Columns)
{
string html = row.Values[column.ColumnIndex].ToString();
if (column.ColumnID != "tfNumber")
{
//html = (row.FindControl("lblNumber") as AspNet.Label).Text;
sb.AppendFormat("<td>{0}</td>", html);
}
//sb.AppendFormat("<td>{0}</td>", html);
}
sb.Append("</tr>");
}
sb.Append("</table>");
return sb.ToString();
}
#endregion
#region
@@ -201,6 +201,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// </remarks>
protected global::FineUIPro.Button btnOut2;
/// <summary>
/// btnOut 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnOut;
/// <summary>
/// btnPrint 控件。
/// </summary>
@@ -99,7 +99,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
var table = this.GetPagedDataTable(Grid2, tb);
Grid2.DataSource = table;
Grid2.DataBind();
drpVersion.DataSource = BLL.HJGL_DesignBasisDataImportService.GetListVersionByUnitWorkId(Request.Params["UnitWorkId"], DataClassification);
drpVersion.DataSource = BLL.HJGL_DesignBasisDataImportService.GetListVersionByUnitWorkId(Request.Params["UnitWorkId"], DataClassification);
drpVersion.DataBind();
}
@@ -164,10 +164,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage
try
{
var ds = MiniExcel.Query(fileName).ToList();
var columns = MiniExcel.GetColumns(fileName);
var cnt = columns.Count;
var reposedata = AddDatasetToSQL(ds, cnt);
if (reposedata.code==1)
var columns = MiniExcel.GetColumns(fileName);
var cnt = columns.Count;
var reposedata = AddDatasetToSQL(ds, cnt);
if (reposedata.code == 1)
{
State = (int)ButtonState.Import;
ShowNotify("审核完成请点击导入");
@@ -192,7 +192,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
}
#endregion
#region Dataset的数据导入数据库
/// <summary>
@@ -204,7 +204,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
private Model.ResponeData AddDatasetToSQL(List<dynamic> pds, int count)
{
Model.ResponeData responeData = new Model.ResponeData();
// string result = string.Empty;
// string result = string.Empty;
List<string> result = new List<string>();
//pds = BLL.Funs.FilterBlankLines(pds);
if (count < 28)
@@ -245,7 +245,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
string pipeLineId = string.Empty;
if (string.IsNullOrEmpty(col0))
{
result.Add( "第" + (i + 1).ToString() + "行," + "管线号" + "," + "此项为必填项!" + "|");
result.Add("第" + (i + 1).ToString() + "行," + "管线号" + "," + "此项为必填项!" + "|");
}
else
{
@@ -265,8 +265,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
var Medium = getMedium.FirstOrDefault(x => x.MediumCode == col3);
if (Medium == null)
{
// result += "第" + (i + 1).ToString() + "行," + "该介质不存在!" + "|";
result .Add( col3 + "-该介质不存在!" + "|");
// result += "第" + (i + 1).ToString() + "行," + "该介质不存在!" + "|";
result.Add(col3 + "-该介质不存在!" + "|");
}
else
{
@@ -284,7 +284,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
var PipeLineClass = getPipeLineClass.FirstOrDefault(x => x.PipingClassCode == col4);
if (PipeLineClass == null)
{
// result += "第" + (i + 1).ToString() + "行," + "该管道等级不存在!" + "|";
// result += "第" + (i + 1).ToString() + "行," + "该管道等级不存在!" + "|";
result.Add(col4 + "-该管道等级不存在!" + "|");
}
else
@@ -299,7 +299,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
var DetectionRate = getDetectionRate.FirstOrDefault(x => x.DetectionRateValue.ToString() == col5.Replace("%", "") || x.DetectionRateCode == col5);
if (DetectionRate == null)
{
// result += "第" + (i + 1).ToString() + "行," + "该探伤比例不存在!" + "|";
// result += "第" + (i + 1).ToString() + "行," + "该探伤比例不存在!" + "|";
result.Add(col5 + "-该探伤比例不存在!" + "|");
}
else
@@ -316,26 +316,18 @@ namespace FineUIPro.Web.HJGL.WeldingManage
string col6 = pds[i].G;
if (!string.IsNullOrEmpty(col6))
{
string[] types = col6.ToString().Split(',');
foreach (string t in types)
string typeStr = col6.ToString();
var type = getDetectionType.FirstOrDefault(x => x.DetectionTypeCode == typeStr);
if (type == null)
{
var type = getDetectionType.FirstOrDefault(x => x.DetectionTypeCode == t);
if (type == null)
{
//result += "第" + (i + 1).ToString() + "行," + "探伤类型【" + t + "】不存在!" + "|";
result.Add("探伤类型【" + t + "】不存在!" + "|");
}
else
{
pipeline.DetectionType += type.DetectionTypeId + "|";
}
//result += "第" + (i + 1).ToString() + "行," + "探伤类型【" + t + "】不存在!" + "|";
result.Add("探伤类型【" + typeStr + "】不存在!" + "|");
}
if (!string.IsNullOrEmpty(pipeline.DetectionType))
else
{
pipeline.DetectionType = pipeline.DetectionType.Substring(0, pipeline.DetectionType.Length - 1);
pipeline.DetectionType = type.DetectionTypeId;
pipeline.DetectionTypeStr = col6;
}
}
else
{
@@ -378,7 +370,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
var PressurePipingClass = getPressurePipingClass.FirstOrDefault(x => x.PressurePipingClassCode == col11);
if (PressurePipingClass == null)
{
// result += "第" + (i + 1).ToString() + "行," + "该压力管道级别不存在!" + "|";
// result += "第" + (i + 1).ToString() + "行," + "该压力管道级别不存在!" + "|";
result.Add(col11 + "-该压力管道级别不存在!" + "|");
}
else
@@ -447,7 +439,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
var material = getMaterial.FirstOrDefault(x => x.MaterialCode == col17);
if (material == null)
{
// result += "第" + (i + 1).ToString() + "行," + "该材质不存在!" + "|";
// result += "第" + (i + 1).ToString() + "行," + "该材质不存在!" + "|";
result.Add(col17 + "-该材质不存在!" + "|");
}
else
@@ -456,7 +448,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
pipeline.PipeMaterialCode = col17;
}
}
pipeline.FlowingSection= Convert.ToString(pds[i].S);
pipeline.FlowingSection = Convert.ToString(pds[i].S);
pipeline.Remark = Convert.ToString(pds[i].T);
// 以下是焊口信息
@@ -480,17 +472,17 @@ namespace FineUIPro.Web.HJGL.WeldingManage
}
string col20 = "";
if (pds[i].V!=null)
if (pds[i].V != null)
{
col20 = pds[i].V.ToString();
}
if (!string.IsNullOrEmpty(col20))
{
var material = getMaterial.FirstOrDefault(x => x.MaterialCode == col20);
if (material == null)
{
// result += "第" + (i + 1).ToString() + "行," + "该材质1不存在!" + "|";
// result += "第" + (i + 1).ToString() + "行," + "该材质1不存在!" + "|";
result.Add(col20 + "-该材质1不存在!" + "|");
}
else
@@ -505,11 +497,11 @@ namespace FineUIPro.Web.HJGL.WeldingManage
}
string col21 = "";
if (pds[i].W!=null)
if (pds[i].W != null)
{
col21 = pds[i].W.ToString();
}
if (!string.IsNullOrEmpty(col21))
{
var material = getMaterial.FirstOrDefault(x => x.MaterialCode == col21);
@@ -530,10 +522,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage
}
string col22 = Convert.ToString(pds[i].X);
string col27 = "";
if (pds[i].AC!=null)
string col27 = "";
if (pds[i].AC != null)
{
col27= pds[i].AC.ToString();
col27 = pds[i].AC.ToString();
}
if (rbDiaType.SelectedValue == "1")
{
@@ -576,7 +568,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
var col23 = Convert.ToString(pds[i].Y);
if (col23!=null)
if (col23 != null)
{
try
{
@@ -594,8 +586,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
}
var col24 = Convert.ToString(pds[i].Z);
if (col24!=null)
{
if (col24 != null)
{
// var Thickness = Convert.ToDecimal(col24);
decimal Thickness = 0;
string thickness = col24.ToString();
@@ -603,12 +595,12 @@ namespace FineUIPro.Web.HJGL.WeldingManage
{
if (rbDiaType.SelectedValue == "1")//外径
{
Thickness = (decimal)BLL.Base_DNCompareService.GetThicknessByDia(pipeline.Dia,thickness);
Thickness = (decimal)BLL.Base_DNCompareService.GetThicknessByDia(pipeline.Dia, thickness);
pipeline.Thickness = Thickness;
}
else //DN直径
{
Thickness = (decimal)BLL.Base_DNCompareService.GetThicknessByDNDia(int.Parse( pipeline.DNDia.Replace("DN","")), thickness);
Thickness = (decimal)BLL.Base_DNCompareService.GetThicknessByDNDia(int.Parse(pipeline.DNDia.Replace("DN", "")), thickness);
pipeline.Thickness = Thickness;
}
}
@@ -635,7 +627,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
}
}
}
else
{
@@ -658,7 +650,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
var weldType = getWeldType.FirstOrDefault(x => x.WeldTypeCode == col25);
if (weldType == null)
{
// result += "第" + (i + 1).ToString() + "行," + "该焊缝类型不存在!" + "|";
// result += "第" + (i + 1).ToString() + "行," + "该焊缝类型不存在!" + "|";
result.Add(col25 + "-该焊缝类型不存在!" + "|");
}
else
@@ -746,7 +738,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
pipeline.ProjectId = this.CurrUser.LoginProjectId;
PipelineList.Add(pipeline);
}
}
if (result.Count > 0)
@@ -840,21 +832,21 @@ namespace FineUIPro.Web.HJGL.WeldingManage
{
string rootPath = Server.MapPath("~/");
string oldefilePath = rootPath+initPath + this.hdFileName.Text;
string oldefilePath = rootPath + initPath + this.hdFileName.Text;
string unitworkId = Request.Params["UnitWorkId"];
string filePath = rootPath+ Const.DesignBasisDataImportPath + this.hdFileName.Text;
string filePath = rootPath + Const.DesignBasisDataImportPath + this.hdFileName.Text;
if (oldefilePath != string.Empty && System.IO.File.Exists(oldefilePath))
{
if (!Directory.Exists(rootPath + Const.DesignBasisDataImportPath))
{
Directory.CreateDirectory(rootPath + Const.DesignBasisDataImportPath);
}
File.Move(oldefilePath, filePath);
File.Move(oldefilePath, filePath);
//System.IO.File.Delete(oldefilePath);//删除上传的XLS文件
}
string FileName = this.fuAttachUrl.FileName;
if (DrpType.SelectedValue == "1")//更新导入
{
@@ -863,8 +855,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
BLL.PipelineService.DeletePipelineByUnitworkId(unitworkId);//删除原有管线
AddView_HJGL_WeldJoint(PipelineList);//导入数据
Model .HJGL_DesignBasisDataImport hJGL_DesignBasisDataImport = new Model .HJGL_DesignBasisDataImport();
hJGL_DesignBasisDataImport.DesignBasisDataImportId= SQLHelper.GetNewID();
Model.HJGL_DesignBasisDataImport hJGL_DesignBasisDataImport = new Model.HJGL_DesignBasisDataImport();
hJGL_DesignBasisDataImport.DesignBasisDataImportId = SQLHelper.GetNewID();
hJGL_DesignBasisDataImport.ProjectId = this.CurrUser.LoginProjectId;
hJGL_DesignBasisDataImport.UnitWorkId = unitworkId;
hJGL_DesignBasisDataImport.ImportType = "1";
@@ -872,14 +864,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage
hJGL_DesignBasisDataImport.FileName = FileName;
hJGL_DesignBasisDataImport.FilePath = filePath.Replace(rootPath, "");
hJGL_DesignBasisDataImport.FileType = BLL.HJGL_DesignBasisDataImportService.GetFileType(FileName);
hJGL_DesignBasisDataImport.Version = BLL.HJGL_DesignBasisDataImportService.GetNewVersionByUnitWorkId(unitworkId,DataClassification);
hJGL_DesignBasisDataImport.Version = BLL.HJGL_DesignBasisDataImportService.GetNewVersionByUnitWorkId(unitworkId, DataClassification);
hJGL_DesignBasisDataImport.Remark = txtRemark.Text;
hJGL_DesignBasisDataImport.CreateMan = this.CurrUser.PersonId;
hJGL_DesignBasisDataImport.CreateDate = DateTime.Now.ToString("yyyy-MM-dd HH-mm-ss");
BLL.HJGL_DesignBasisDataImportService.AddHJGL_DesignBasisDataImport(hJGL_DesignBasisDataImport);
BLL.HJGL_DesignBasisDataImportVerSionLogService.UpdateVersion(this.CurrUser.LoginProjectId, unitworkId, (decimal)hJGL_DesignBasisDataImport.Version, DataClassification);
}
else //补充导入
@@ -95,7 +95,7 @@
</f:Button>
<f:Button ID="btnUpdateImport" Text="更新导入" ToolTip="更新导入" Icon="PackageIn" runat="server" Hidden="true" OnClick="btnUpdateImport_Click">
</f:Button>
<f:Button ID="btnPDMSImport" Text="PDMS导入" ToolTip="PDMS导入" Icon="PackageIn" runat="server" OnClick="btnPDMSImport_Click">
<f:Button ID="btnPDMSImport" Text="导入" ToolTip="导入" Icon="PackageIn" runat="server" OnClick="btnPDMSImport_Click">
</f:Button>
<f:Button ID="btnMatImport" Text="材料导入" ToolTip="材料导入" Icon="PackageIn" runat="server" OnClick="btnMatImport_Click" Hidden="true">
</f:Button>
@@ -11,6 +11,16 @@
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Form runat="server" ShowBorder="true" ShowHeader="false">
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Right">
<Items>
<f:Button ID="btnAttachUrl" Text="详情" ToolTip="附件上传及查看" Icon="TableCell" runat="server"
OnClick="btnAttachUrl_Click" ValidateForms="SimpleForm1">
</f:Button>
<f:ToolbarFill runat="server"/>
</Items>
</f:Toolbar>
</Toolbars>
<Items>
<f:GroupPanel ID="GroupPanel3" Layout="Anchor" Title="管线数据" runat="server">
<Items>
@@ -139,6 +149,10 @@
</Items>
</f:Form>
<f:Window ID="WindowAtt" Title="附件" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
Height="500px">
</f:Window>
</form>
</body>
</html>
@@ -160,5 +160,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage
}
}
protected void btnAttachUrl_Click(object sender, EventArgs e)
{
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/WeldJoint&menuId={1}&type=-1", Request.Params["WeldJointId"], BLL.Const.HJGL_WeldJointMenuId)));
}
}
}
@@ -30,6 +30,24 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// btnAttachUrl 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAttachUrl;
/// <summary>
/// GroupPanel3 控件。
/// </summary>
@@ -281,5 +299,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox hdGrooveType;
/// <summary>
/// WindowAtt 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window WindowAtt;
}
}
@@ -0,0 +1,99 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CheckResult.aspx.cs" Inherits="FineUIPro.Web.HJGL.WeldingReport.CheckResult" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>检测结果汇总</title>
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="焊工一次合格率"
EnableCollapse="true" runat="server" BoxFlex="1" EnableColumnLines="true" DataKeyNames="WelderCode"
AllowCellEditing="true" ClicksToEdit="2" DataIDField="WelderCode" AllowSorting="true"
SortField="WelderCode" SortDirection="ASC" OnSort="Grid1_Sort" AllowPaging="true"
IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange"
EnableTextSelection="True">
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:DropDownList ID="drpUnitId" runat="server" Label="单位名称"
LabelAlign="Right" Width="240px" LabelWidth="80px" >
</f:DropDownList>
<f:DropDownList ID="drpDetectionType" runat="server" Label="探伤类型"
LabelAlign="Right" Width="240px" LabelWidth="80px">
</f:DropDownList>
<f:DatePicker runat="server" Label="日期" ID="txtStarTime" LabelAlign="Right"
Width="180px" LabelWidth="80px">
</f:DatePicker>
<f:Label ID="Label1" runat="server" Text="至">
</f:Label>
<f:DatePicker runat="server" ID="txtEndTime" LabelAlign="Right" Width="180px" LabelWidth="80px">
</f:DatePicker>
</Items>
</f:Toolbar>
<f:Toolbar ID="Toolbar3" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:Button ID="BtnAnalyse" Text="统计" Icon="ChartPie"
runat="server" OnClick="BtnAnalyse_Click">
</f:Button>
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出"
Icon="TableGo" EnableAjax="false" DisableControlBeforePostBack="false">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号"
Width="60px" HeaderTextAlign="Center" TextAlign="Center" ColumnID="tfNumber" />
<f:RenderField HeaderText="施工单位" ColumnID="UnitName"
DataField="UnitName" SortField="UnitName" FieldType="String" HeaderTextAlign="Center"
Width="250px">
</f:RenderField>
<f:RenderField HeaderText="焊口号" ColumnID="WeldJointCode"
DataField="WeldJointCode" SortField="WeldJointCode" FieldType="String" HeaderTextAlign="Center"
Width="150px">
</f:RenderField>
<f:RenderField HeaderText="探伤类型" ColumnID="DetectionTypeCode"
DataField="DetectionTypeCode" FieldType="String" HeaderTextAlign="Center"
Width="90px">
</f:RenderField>
<f:RenderField HeaderText="拍片数量" ColumnID="TotalFilm"
DataField="TotalFilm" FieldType="String" HeaderTextAlign="Center"
Width="90px">
</f:RenderField>
<f:RenderField HeaderText="合格片数" ColumnID="PassFilm"
DataField="PassFilm" FieldType="String" HeaderTextAlign="Center"
Width="90px">
</f:RenderField>
<f:RenderField HeaderText="检测结果" ColumnID="CheckResult"
DataField="CheckResult" FieldType="String" HeaderTextAlign="Center"
Width="120px">
</f:RenderField>
</Columns>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
<f:ListItem Text="10" Value="10" />
<f:ListItem Text="15" Value="15" />
<f:ListItem Text="20" Value="20" />
<f:ListItem Text="25" Value="25" />
</f:DropDownList>
</PageItems>
</f:Grid>
</Items>
</f:Panel>
</form>
</body>
</html>
@@ -0,0 +1,174 @@
using BLL;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Text;
using AspNet = System.Web.UI.WebControls;
namespace FineUIPro.Web.HJGL.WeldingReport
{
public partial class CheckResult : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(this.drpUnitId, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, true);
BLL.Base_DetectionTypeService.InitDetectionTypeDropDownList(drpDetectionType, true, string.Empty);
}
}
#region
/// <summary>
/// 绑定数据
/// </summary>
private void BindGrid()
{
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@projectId", this.CurrUser.LoginProjectId));
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
{
listStr.Add(new SqlParameter("@unitcode", this.drpUnitId.SelectedValue));
}
else
{
listStr.Add(new SqlParameter("@unitcode", null));
}
if (this.drpDetectionType.SelectedValue != BLL.Const._Null)
{
listStr.Add(new SqlParameter("@detectionTypeId", this.drpDetectionType.SelectedValue));
}
else
{
listStr.Add(new SqlParameter("@detectionTypeId", null));
}
if (!string.IsNullOrEmpty(this.txtStarTime.Text))
{
listStr.Add(new SqlParameter("@date1", this.txtStarTime.Text.Trim()));
}
else
{
listStr.Add(new SqlParameter("@date1", null));
}
if (!string.IsNullOrEmpty(this.txtEndTime.Text))
{
listStr.Add(new SqlParameter("@date2", this.txtEndTime.Text.Trim()));
}
else
{
listStr.Add(new SqlParameter("@date2", null));
}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunProc("sp_rpt_WelderFirstPassRate", parameter);
this.Grid1.RecordCount = tb.Rows.Count;
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
}
/// <summary>
/// 改变索引事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
{
BindGrid();
}
/// <summary>
/// 分页下拉选择事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
BindGrid();
}
/// <summary>
/// 排序
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e)
{
this.BindGrid();
}
#endregion
#region
/// <summary>
/// 统计
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void BtnAnalyse_Click(object sender, EventArgs e)
{
BindGrid();
}
#endregion
#region
/// 导出按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnOut_Click(object sender, EventArgs e)
{
Response.ClearContent();
string filename = Funs.GetNewFileName();
Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("焊工一次合格率" + filename, System.Text.Encoding.UTF8) + ".xls");
Response.ContentType = "application/excel";
Response.ContentEncoding = System.Text.Encoding.UTF8;
Response.Write(GetGridTableHtml(Grid1));
Response.End();
}
/// <summary>
/// 导出方法
/// </summary>
/// <param name="grid"></param>
/// <returns></returns>
private string GetGridTableHtml(Grid grid)
{
StringBuilder sb = new StringBuilder();
sb.Append("<meta http-equiv=\"content-type\" content=\"application/excel; charset=UTF-8\"/>");
sb.Append("<table cellspacing=\"0\" rules=\"all\" border=\"1\" style=\"border-collapse:collapse;\">");
sb.Append("<tr>");
grid.PageSize = 10000;
BindGrid();
foreach (GridColumn column in grid.Columns)
{
sb.AppendFormat("<td>{0}</td>", column.HeaderText);
}
sb.Append("</tr>");
foreach (GridRow row in grid.Rows)
{
sb.Append("<tr>");
foreach (GridColumn column in grid.Columns)
{
string html = row.Values[column.ColumnIndex].ToString();
if (column.ColumnID == "tfNumber")
{
html = (row.FindControl("labNumber") as AspNet.Label).Text;
}
sb.AppendFormat("<td>{0}</td>", html);
}
sb.Append("</tr>");
}
sb.Append("</table>");
return sb.ToString();
}
#endregion
}
}
@@ -0,0 +1,168 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.HJGL.WeldingReport {
public partial class CheckResult {
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// Grid1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// drpUnitId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpUnitId;
/// <summary>
/// drpDetectionType 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpDetectionType;
/// <summary>
/// txtStarTime 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtStarTime;
/// <summary>
/// Label1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label1;
/// <summary>
/// txtEndTime 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtEndTime;
/// <summary>
/// Toolbar3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar3;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// BtnAnalyse 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button BtnAnalyse;
/// <summary>
/// btnOut 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnOut;
/// <summary>
/// ToolbarSeparator1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
/// <summary>
/// ddlPageSize 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
}
}