Merge branch 'master' of http://47.104.102.122:3000/gaofei/HJGL_DS
This commit is contained in:
@@ -218,6 +218,7 @@
|
||||
<Compile Include="HJGL\MaterialManage\HJGL_EMaterialRegistService.cs" />
|
||||
<Compile Include="HJGL\MaterialManage\HJGL_EMInventoryRecordsService.cs" />
|
||||
<Compile Include="HJGL\MaterialManage\HJGL_EWeldRHRecordService.cs" />
|
||||
<Compile Include="HJGL\MaterialManage\QualityCertificateService.cs" />
|
||||
<Compile Include="HJGL\MaterialManage\TemperatureAndHumidityProjectService.cs" />
|
||||
<Compile Include="HJGL\PersonManage\HJGL_PersonManageService.cs" />
|
||||
<Compile Include="HJGL\PersonManage\HJGL_WelderQualifiedProjectService.cs" />
|
||||
@@ -244,6 +245,7 @@
|
||||
<Compile Include="HJGL\WeldingManage\WelderOKRateService.cs" />
|
||||
<Compile Include="HJGL\WeldingManage\WelderOKRateStatisticsService.cs" />
|
||||
<Compile Include="HJGL\WeldingManage\WeldRecordInService.cs" />
|
||||
<Compile Include="JGZL\CommencementReportService.cs" />
|
||||
<Compile Include="JsonHelper.cs" />
|
||||
<Compile Include="libFace.cs" />
|
||||
<Compile Include="libOpenCV.cs" />
|
||||
|
||||
@@ -1682,6 +1682,11 @@ namespace BLL
|
||||
#endregion
|
||||
|
||||
#region 焊条烘烤记录
|
||||
/// <summary>
|
||||
/// 焊材质保书
|
||||
/// </summary>
|
||||
public const string CLGL_QualityCertificateMenuId = "19FC40C2-4FDC-44DC-A785-85491BACAC6D";
|
||||
|
||||
/// <summary>
|
||||
/// 焊条烘烤记录
|
||||
/// </summary>
|
||||
@@ -1749,6 +1754,13 @@ namespace BLL
|
||||
|
||||
#endregion
|
||||
|
||||
#region 交工资料菜单Id
|
||||
/// <summary>
|
||||
/// 工程施工开工报告
|
||||
/// </summary>
|
||||
public const string JGZL_CommencementReportMenuId = "A4B2E5A9-96A8-460F-885A-BE5FF9B5019E";
|
||||
#endregion
|
||||
|
||||
#region 报表对应ID
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public static class QualityCertificateService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据焊材质保书Id获取焊材质保书信息
|
||||
/// </summary>
|
||||
/// <param name="qualityCertificateId">焊材质保书Id</param>
|
||||
/// <returns></returns>
|
||||
public static Model.Weld_QualityCertificate GetQualityCertificateByQualityCertificateId(string qualityCertificateId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var QualityCertificate = db.Weld_QualityCertificate.FirstOrDefault(e => e.QualityCertificateId == qualityCertificateId);
|
||||
return QualityCertificate;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加焊材质保书
|
||||
/// </summary>
|
||||
/// <param name="qualityCertificate"></param>
|
||||
public static void AddQualityCertificate(Model.Weld_QualityCertificate qualityCertificate)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Weld_QualityCertificate newQualityCertificate = new Model.Weld_QualityCertificate();
|
||||
|
||||
newQualityCertificate.QualityCertificateId = qualityCertificate.QualityCertificateId;
|
||||
newQualityCertificate.WeldId = qualityCertificate.WeldId;
|
||||
newQualityCertificate.HeartNo = qualityCertificate.HeartNo;
|
||||
newQualityCertificate.Warrantybook = qualityCertificate.Warrantybook;
|
||||
newQualityCertificate.CompileMan = qualityCertificate.CompileMan;
|
||||
newQualityCertificate.CompileDate = qualityCertificate.CompileDate;
|
||||
|
||||
db.Weld_QualityCertificate.InsertOnSubmit(newQualityCertificate);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改焊丝烘烤记录
|
||||
/// </summary>
|
||||
/// <param name="qualityCertificate"></param>
|
||||
public static void UpdateQualityCertificate(Model.Weld_QualityCertificate qualityCertificate)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Weld_QualityCertificate newQualityCertificate = db.Weld_QualityCertificate.First(e => e.QualityCertificateId == qualityCertificate.QualityCertificateId);
|
||||
|
||||
newQualityCertificate.WeldId = qualityCertificate.WeldId;
|
||||
newQualityCertificate.HeartNo = qualityCertificate.HeartNo;
|
||||
newQualityCertificate.Warrantybook = qualityCertificate.Warrantybook;
|
||||
newQualityCertificate.CompileMan = qualityCertificate.CompileMan;
|
||||
newQualityCertificate.CompileDate = qualityCertificate.CompileDate;
|
||||
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除焊丝烘烤记录
|
||||
/// </summary>
|
||||
/// <param name="eletrodeId"></param>
|
||||
public static void DeleteQualityCertificate(string qualityCertificateId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Weld_QualityCertificate qualityCertificate = db.Weld_QualityCertificate.First(e => e.QualityCertificateId == qualityCertificateId);
|
||||
db.Weld_QualityCertificate.DeleteOnSubmit(qualityCertificate);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 工程施工开工报告
|
||||
/// </summary>
|
||||
public class CommencementReportService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取工程施工开工报告
|
||||
/// </summary>
|
||||
/// <param name="commencementReportId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.JGZL_CommencementReport GetCommencementReportById(string commencementReportId)
|
||||
{
|
||||
return Funs.DB.JGZL_CommencementReport.FirstOrDefault(e => e.CommencementReportId == commencementReportId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加工程施工开工报告
|
||||
/// </summary>
|
||||
/// <param name="commencementReport"></param>
|
||||
public static void AddCommencementReport(Model.JGZL_CommencementReport commencementReport)
|
||||
{
|
||||
SGGLDB db = Funs.DB;
|
||||
Model.JGZL_CommencementReport newCommencementReport = new Model.JGZL_CommencementReport();
|
||||
newCommencementReport.CommencementReportId = commencementReport.CommencementReportId;
|
||||
newCommencementReport.ProjectId = commencementReport.ProjectId;
|
||||
newCommencementReport.ContractNumber = commencementReport.ContractNumber;
|
||||
newCommencementReport.DesignUnit = commencementReport.DesignUnit;
|
||||
newCommencementReport.PlannedStartDate = commencementReport.PlannedStartDate;
|
||||
newCommencementReport.PlannedEndDate = commencementReport.PlannedEndDate;
|
||||
newCommencementReport.ProjectContent = commencementReport.ProjectContent;
|
||||
newCommencementReport.Conditions = commencementReport.Conditions;
|
||||
newCommencementReport.ReviewOpinion = commencementReport.ReviewOpinion;
|
||||
newCommencementReport.QualitySupervisionOpinion = commencementReport.QualitySupervisionOpinion;
|
||||
newCommencementReport.CompileMan = commencementReport.CompileMan;
|
||||
newCommencementReport.CompileDate = commencementReport.CompileDate;
|
||||
db.JGZL_CommencementReport.InsertOnSubmit(newCommencementReport);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改工程施工报告
|
||||
/// </summary>
|
||||
/// <param name="commencementReport"></param>
|
||||
public static void UpdateCommencementReport(Model.JGZL_CommencementReport commencementReport)
|
||||
{
|
||||
SGGLDB db = Funs.DB;
|
||||
Model.JGZL_CommencementReport newCommencementReport = db.JGZL_CommencementReport.FirstOrDefault(e => e.CommencementReportId == commencementReport.CommencementReportId);
|
||||
if (newCommencementReport != null)
|
||||
{
|
||||
newCommencementReport.ContractNumber = commencementReport.ContractNumber;
|
||||
newCommencementReport.DesignUnit = commencementReport.DesignUnit;
|
||||
newCommencementReport.PlannedStartDate = commencementReport.PlannedStartDate;
|
||||
newCommencementReport.PlannedEndDate = commencementReport.PlannedEndDate;
|
||||
newCommencementReport.ProjectContent = commencementReport.ProjectContent;
|
||||
newCommencementReport.Conditions = commencementReport.Conditions;
|
||||
newCommencementReport.ReviewOpinion = commencementReport.ReviewOpinion;
|
||||
newCommencementReport.QualitySupervisionOpinion = commencementReport.QualitySupervisionOpinion;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除工程施工开工报告
|
||||
/// </summary>
|
||||
/// <param name="commencementReportId"></param>
|
||||
public static void DeleteCommencementReportById(string commencementReportId)
|
||||
{
|
||||
SGGLDB db = Funs.DB;
|
||||
Model.JGZL_CommencementReport commencementReport = db.JGZL_CommencementReport.FirstOrDefault(e => e.CommencementReportId == commencementReportId);
|
||||
if (commencementReport != null)
|
||||
{
|
||||
db.JGZL_CommencementReport.DeleteOnSubmit(commencementReport);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
@@ -77,5 +78,45 @@ namespace BLL
|
||||
{
|
||||
return (from x in Funs.DB.Weld_StockInit where x.WeldId == weldId select x).Count();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 加载批号下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName"></param>
|
||||
/// <param name="isShowPlease"></param>
|
||||
public static void InitHeartNo(FineUIPro.DropDownList dropName, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "Value";
|
||||
dropName.DataTextField = "Text";
|
||||
dropName.DataSource = GetHeartNoList();
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取施工部用户
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <returns></returns>
|
||||
public static ListItem[] GetHeartNoList()
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var ls = (from x in db.Weld_StockIn
|
||||
select new {
|
||||
x.HeartNo,
|
||||
x.Warrantybook
|
||||
}).Distinct().ToList();
|
||||
ListItem[] lis = new ListItem[ls.Count()];
|
||||
for (int i = 0; i < ls.Count(); i++)
|
||||
{
|
||||
lis[i] = new ListItem(ls[i].HeartNo ?? "", ls[i].Warrantybook.ToString());
|
||||
}
|
||||
return lis;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,3 +35,26 @@ IP地址:::1
|
||||
|
||||
出错时间:11/11/2025 15:17:16
|
||||
|
||||
|
||||
错误信息开始=====>
|
||||
错误类型:IndexOutOfRangeException
|
||||
错误信息:无法找到列 CompileDate。
|
||||
错误堆栈:
|
||||
在 System.Data.DataTable.ParseSortString(String sortString)
|
||||
在 System.Data.DataView.CheckSort(String sort)
|
||||
在 System.Data.DataView.set_Sort(String value)
|
||||
在 FineUIPro.Web.PageBase.GetPagedDataTable(Grid Grid1, DataTable tb) 位置 D:\工作\鼎盛\HJGL_DS\HJGL_DS\FineUIPro.Web\common\PageBase.cs:行号 328
|
||||
在 FineUIPro.Web.HJGL.MaterialManage.QualityCertificate.BindGrid() 位置 D:\工作\鼎盛\HJGL_DS\HJGL_DS\FineUIPro.Web\HJGL\MaterialManage\QualityCertificate.aspx.cs:行号 63
|
||||
在 FineUIPro.Web.HJGL.MaterialManage.QualityCertificate.Page_Load(Object sender, EventArgs e) 位置 D:\工作\鼎盛\HJGL_DS\HJGL_DS\FineUIPro.Web\HJGL\MaterialManage\QualityCertificate.aspx.cs:行号 31
|
||||
在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
|
||||
在 System.EventHandler.Invoke(Object sender, EventArgs e)
|
||||
在 System.Web.UI.Control.OnLoad(EventArgs e)
|
||||
在 System.Web.UI.Control.LoadRecursive()
|
||||
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
|
||||
出错时间:12/09/2025 16:42:15
|
||||
出错文件:http://localhost:64304/HJGL/MaterialManage/QualityCertificate.aspx
|
||||
IP地址:::1
|
||||
操作人员:管理员
|
||||
|
||||
出错时间:12/09/2025 16:42:15
|
||||
|
||||
|
||||
@@ -0,0 +1,125 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Report ScriptLanguage="CSharp" ReportInfo.Created="12/09/2025 11:39:20" ReportInfo.Modified="12/09/2025 14:32:25" ReportInfo.CreatorVersion="2017.1.16.0">
|
||||
<Dictionary>
|
||||
<Parameter Name="ProjectName" DataType="System.String"/>
|
||||
<Parameter Name="ContractNumber" DataType="System.String"/>
|
||||
<Parameter Name="DesignUnit" DataType="System.String"/>
|
||||
<Parameter Name="PlannedStartDate" DataType="System.String"/>
|
||||
<Parameter Name="PlannedEndDate" DataType="System.String"/>
|
||||
<Parameter Name="ProjectContent" DataType="System.String"/>
|
||||
<Parameter Name="Conditions" DataType="System.String"/>
|
||||
<Parameter Name="ReviewOpinion" DataType="System.String"/>
|
||||
<Parameter Name="QualitySupervisionOpinion" DataType="System.String"/>
|
||||
</Dictionary>
|
||||
<ReportPage Name="Page1" RawPaperSize="9" LeftMargin="25" TopMargin="20" RightMargin="20" BottomMargin="21" Guides="0,623.7,160.65,69.3,59.85,374.85,107.1,31.5,100.8,267.75,248.85,211.05,422.1">
|
||||
<PageHeaderBand Name="PageHeader1" Width="623.7" Height="788.26" Guides="0,788.26,86.21,20.06,66.15,125.17,38.96,164.13,360.69,196.56,503.6,142.91,635.9,132.3,749.3,113.4">
|
||||
<TableObject Name="Table1" Width="623.7" Height="788.26">
|
||||
<TableColumn Name="Column1" Width="31.5"/>
|
||||
<TableColumn Name="Column2" Width="69.3"/>
|
||||
<TableColumn Name="Column3" Width="59.85"/>
|
||||
<TableColumn Name="Column4" Width="107.1"/>
|
||||
<TableColumn Name="Column5" Width="107.1"/>
|
||||
<TableColumn Name="Column6" Width="248.85"/>
|
||||
<TableRow Name="Row1" Height="20.06">
|
||||
<TableCell Name="Cell1" Border.Lines="All" Text="SH/T 3503—J105A" HorzAlign="Center" VertAlign="Center" Font="黑体, 10.5pt" ColSpan="3" RowSpan="2"/>
|
||||
<TableCell Name="Cell2" Border.Lines="All"/>
|
||||
<TableCell Name="Cell3" Border.Lines="All"/>
|
||||
<TableCell Name="Cell4" Border.Lines="All" Text="工程施工开工报告" HorzAlign="Center" VertAlign="Center" Font="宋体, 16pt, style=Bold" ColSpan="2" RowSpan="2"/>
|
||||
<TableCell Name="Cell5" Border.Lines="All"/>
|
||||
<TableCell Name="Cell26" Border.Lines="Left, Right, Top" Text="工程名称:" Font="宋体, 10.5pt"/>
|
||||
</TableRow>
|
||||
<TableRow Name="Row9" Height="66.15">
|
||||
<TableCell Name="Cell57" Border.Lines="All"/>
|
||||
<TableCell Name="Cell58" Border.Lines="All"/>
|
||||
<TableCell Name="Cell59" Border.Lines="All"/>
|
||||
<TableCell Name="Cell60" Border.Lines="All"/>
|
||||
<TableCell Name="Cell61" Border.Lines="All"/>
|
||||
<TableCell Name="Cell62" Border.Lines="Left, Right, Bottom" Text="[ProjectName]" Font="楷体, 10.5pt"/>
|
||||
</TableRow>
|
||||
<TableRow Name="Row2" Height="38.96">
|
||||
<TableCell Name="Cell6" Border.Lines="All" Text="施工合同编号" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt" ColSpan="2"/>
|
||||
<TableCell Name="Cell7" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell8" Border.Lines="All" Text="[ContractNumber]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt" ColSpan="2"/>
|
||||
<TableCell Name="Cell9" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
|
||||
<TableCell Name="Cell10" Border.Lines="All" Text="设计单位" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell28" Border.Lines="All" Text="[DesignUnit]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
|
||||
</TableRow>
|
||||
<TableRow Name="Row3" Height="38.96">
|
||||
<TableCell Name="Cell11" Border.Lines="All" Text="计划开工日期" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt" ColSpan="2"/>
|
||||
<TableCell Name="Cell12" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell13" Border.Lines="All" Text="[PlannedStartDate]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt" ColSpan="2"/>
|
||||
<TableCell Name="Cell14" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
|
||||
<TableCell Name="Cell15" Border.Lines="All" Text="计划交工日期" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell30" Border.Lines="All" Text="[PlannedEndDate]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
|
||||
</TableRow>
|
||||
<TableRow Name="Row4" Height="196.56">
|
||||
<TableCell Name="Cell16" Border.Lines="All" Text="工 程 内 容" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell17" Border.Lines="All" Text="[ProjectContent]" Font="楷体, 10.5pt" ColSpan="5"/>
|
||||
<TableCell Name="Cell18" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell19" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell20" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell32" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
</TableRow>
|
||||
<TableRow Name="Row5" Height="142.91">
|
||||
<TableCell Name="Cell21" Border.Lines="All" Text="开 工 条 件" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell22" Border.Lines="All" Text="[Conditions]" Font="楷体, 10.5pt" ColSpan="5"/>
|
||||
<TableCell Name="Cell23" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell24" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell25" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell34" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
</TableRow>
|
||||
<TableRow Name="Row6" Height="132.3">
|
||||
<TableCell Name="Cell36" Border.Lines="All" Text="审 查 意 见" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell37" Border.Lines="All" Text="[ReviewOpinion]" Font="楷体, 10.5pt" ColSpan="5"/>
|
||||
<TableCell Name="Cell38" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell39" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell40" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell41" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
</TableRow>
|
||||
<TableRow Name="Row7" Height="113.4">
|
||||
<TableCell Name="Cell43" Border.Lines="All" Text="质 量 监 督 意 见" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt" RowSpan="2"/>
|
||||
<TableCell Name="Cell44" Border.Lines="Left, Right, Top" Text="[QualitySupervisionOpinion]" Font="楷体, 10.5pt" ColSpan="5"/>
|
||||
<TableCell Name="Cell45" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell46" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell47" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell48" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
</TableRow>
|
||||
<TableRow Name="Row8" Height="38.96">
|
||||
<TableCell Name="Cell50" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell51" Border.Lines="Left, Right, Bottom" Text=" 工程质量监督站长/组长:(监督站/组章)年月日" VertAlign="Center" Font="宋体, 10.5pt" ColSpan="5"/>
|
||||
<TableCell Name="Cell52" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell53" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell54" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell55" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
</TableRow>
|
||||
</TableObject>
|
||||
</PageHeaderBand>
|
||||
<PageFooterBand Name="PageFooter1" Top="792.26" Width="623.7" Height="179.52" Guides="0,179.52,35.43,99.21,144.09">
|
||||
<TableObject Name="Table2" Width="623.7" Height="179.52" Border.Lines="Left, Right, Bottom">
|
||||
<TableColumn Name="Column7" Width="211.05"/>
|
||||
<TableColumn Name="Column8" Width="211.05"/>
|
||||
<TableColumn Name="Column9" Width="201.6"/>
|
||||
<TableRow Name="Row10" Height="35.43">
|
||||
<TableCell Name="Cell63" Border.Lines="All" Text="建设单位" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell64" Border.Lines="All" Text="监理单位" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell65" Border.Lines="All" Text="施工单位" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
</TableRow>
|
||||
<TableRow Name="Row11" Height="63.78">
|
||||
<TableCell Name="Cell68" Border.Lines="Left, Right, Top" Text="(项目部章)" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell69" Border.Lines="Left, Right, Top" Text="(项目部章)" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell70" Border.Lines="Left, Right, Top" Text="(项目部章)" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
</TableRow>
|
||||
<TableRow Name="Row12" Height="44.88">
|
||||
<TableCell Name="Cell73" Border.Lines="Left, Right" Text="项目经理:" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell74" Border.Lines="Left, Right" Text="项目总监:" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell75" Border.Lines="Left, Right" Text="项目经理:" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
</TableRow>
|
||||
<TableRow Name="Row13" Height="35.43">
|
||||
<TableCell Name="Cell78" Border.Lines="Left, Right, Bottom" Text="日期: 年 月 日" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell79" Border.Lines="Left, Right, Bottom" Text="日期: 年 月 日" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
<TableCell Name="Cell80" Border.Lines="Left, Right, Bottom" Text="日期: 年 月 日" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||
</TableRow>
|
||||
</TableObject>
|
||||
</PageFooterBand>
|
||||
</ReportPage>
|
||||
</Report>
|
||||
BIN
Binary file not shown.
@@ -1136,6 +1136,8 @@
|
||||
<Content Include="HJGL\MaterialManage\EWeldRHRecordNew.aspx" />
|
||||
<Content Include="HJGL\MaterialManage\EWeldRHRecordNewSelect.aspx" />
|
||||
<Content Include="HJGL\MaterialManage\FluxReleaseRecords.aspx" />
|
||||
<Content Include="HJGL\MaterialManage\QualityCertificate.aspx" />
|
||||
<Content Include="HJGL\MaterialManage\QualityCertificateEdit.aspx" />
|
||||
<Content Include="HJGL\MaterialManage\SolderBakingRecordProject.aspx" />
|
||||
<Content Include="HJGL\MaterialManage\SolderBakingRecordProjectSelect.aspx" />
|
||||
<Content Include="HJGL\MaterialManage\WeldingWireRecovery.aspx" />
|
||||
@@ -1239,6 +1241,8 @@
|
||||
<Content Include="Images\SINOPEC.gif" />
|
||||
<Content Include="Images\UnitLogo.jpg" />
|
||||
<Content Include="Images\wrong.jpg" />
|
||||
<Content Include="JGZL\CommencementReport.aspx" />
|
||||
<Content Include="JGZL\CommencementReportEdit.aspx" />
|
||||
<Content Include="Login.aspx" />
|
||||
<Content Include="AttachFile\fileupload.ashx" />
|
||||
<Content Include="Captcha\captcha.ashx" />
|
||||
@@ -5895,6 +5899,20 @@
|
||||
<Compile Include="HJGL\MaterialManage\FluxReleaseRecords.aspx.designer.cs">
|
||||
<DependentUpon>FluxReleaseRecords.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HJGL\MaterialManage\QualityCertificate.aspx.cs">
|
||||
<DependentUpon>QualityCertificate.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="HJGL\MaterialManage\QualityCertificate.aspx.designer.cs">
|
||||
<DependentUpon>QualityCertificate.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HJGL\MaterialManage\QualityCertificateEdit.aspx.cs">
|
||||
<DependentUpon>QualityCertificateEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="HJGL\MaterialManage\QualityCertificateEdit.aspx.designer.cs">
|
||||
<DependentUpon>QualityCertificateEdit.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HJGL\MaterialManage\SolderBakingRecordProject.aspx.cs">
|
||||
<DependentUpon>SolderBakingRecordProject.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
@@ -6504,6 +6522,20 @@
|
||||
<Compile Include="HJGL\WeldingReport\WeldInspectionCheckRecordItem.aspx.designer.cs">
|
||||
<DependentUpon>WeldInspectionCheckRecordItem.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="JGZL\CommencementReport.aspx.cs">
|
||||
<DependentUpon>CommencementReport.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="JGZL\CommencementReport.aspx.designer.cs">
|
||||
<DependentUpon>CommencementReport.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="JGZL\CommencementReportEdit.aspx.cs">
|
||||
<DependentUpon>CommencementReportEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="JGZL\CommencementReportEdit.aspx.designer.cs">
|
||||
<DependentUpon>CommencementReportEdit.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Login.aspx.cs">
|
||||
<DependentUpon>Login.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<UseIISExpress>true</UseIISExpress>
|
||||
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
|
||||
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
||||
<Use64BitIISExpress />
|
||||
<IISExpressSSLPort />
|
||||
<IISExpressAnonymousAuthentication />
|
||||
|
||||
@@ -0,0 +1,134 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="QualityCertificate.aspx.cs" Inherits="FineUIPro.Web.HJGL.MaterialManage.QualityCertificate" %>
|
||||
|
||||
<!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" />
|
||||
<style>
|
||||
.customlabel span {
|
||||
color: red;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
</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" DataKeyNames="QualityCertificateId" AllowCellEditing="true" ClicksToEdit="2"
|
||||
DataIDField="QualityCertificateId" AllowSorting="true" SortField="CompileDate" SortDirection="DESC"
|
||||
OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true" PageSize="15" ForceFit="true"
|
||||
OnPageIndexChange="Grid1_PageIndexChange" AllowFilters="true" OnFilterChange="Grid1_FilterChange"
|
||||
EnableTextSelection="True" EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server">
|
||||
<Items>
|
||||
<f:TextBox runat="server" Label="焊材牌号" ID="txtWeldName" EmptyText="输入查询条件" AutoPostBack="true"
|
||||
OnTextChanged="TextBox_TextChanged" Width="300px" LabelAlign="right">
|
||||
</f:TextBox>
|
||||
<f:DropDownList ID="drpWeldType" runat="server" Label="焊材类型" LabelAlign="Right" AutoPostBack="true" EnableEdit="true"
|
||||
OnSelectedIndexChanged="TextBox_TextChanged" LabelWidth="75px">
|
||||
</f:DropDownList>
|
||||
<f:TextBox runat="server" Label="批号" ID="txtHeartNo" EmptyText="输入查询条件" AutoPostBack="true"
|
||||
OnTextChanged="TextBox_TextChanged" Width="300px" LabelAlign="right">
|
||||
</f:TextBox>
|
||||
<f:TextBox runat="server" Label="入库自编号" ID="txtWarrantybook" EmptyText="输入查询条件" AutoPostBack="true"
|
||||
OnTextChanged="TextBox_TextChanged" Width="300px" LabelAlign="right">
|
||||
</f:TextBox>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnNew" Text="增加" Icon="Add" runat="server" OnClick="btnNew_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:TemplateField ColumnID="tfNumber" Width="50px" HeaderText="序号" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField Width="150px" ColumnID="WeldName" DataField="WeldName" FieldType="String"
|
||||
HeaderText="焊材牌号" HeaderTextAlign="Center" TextAlign="Center" SortField="WeldName">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="WeldCode" DataField="WeldCode" FieldType="String"
|
||||
HeaderText="焊材型号" HeaderTextAlign="Center" TextAlign="Center" SortField="WeldCode">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="WeldSpec" DataField="WeldSpec" FieldType="String"
|
||||
HeaderText="规格" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="90px" ColumnID="WeldTypeName" DataField="WeldTypeName" FieldType="String"
|
||||
HeaderText="类型" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="HeartNo" DataField="HeartNo" FieldType="String"
|
||||
HeaderText="批号" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="Warrantybook" DataField="Warrantybook" FieldType="String"
|
||||
HeaderText="入库自编号" HeaderTextAlign="Center" TextAlign="Center" SortField="Warrantybook">
|
||||
</f:RenderField>
|
||||
<f:WindowField TextAlign="Center" Width="60px" WindowID="WindowAtt" HeaderText="附件" Text="附件" ToolTip="附件上传查看"
|
||||
DataIFrameUrlFields="QualityCertificateId" DataIFrameUrlFormatString="../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/WeldMat/QualityCertificate&menuId=19FC40C2-4FDC-44DC-A785-85491BACAC6D"
|
||||
HeaderTextAlign="Center" />
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
</Listeners>
|
||||
<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="15" Value="15" />
|
||||
<f:ListItem Text="20" Value="20" />
|
||||
<f:ListItem Text="25" Value="25" />
|
||||
</f:DropDownList>
|
||||
</PageItems>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Window ID="Window1" Title="编辑焊材质保书" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="true" runat="server" OnClose="Window1_Close" IsModal="true"
|
||||
Width="800px" Height="350px">
|
||||
</f:Window>
|
||||
<f:Window ID="Window2" Title="移库" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="true" runat="server" OnClose="Window1_Close" IsModal="true"
|
||||
Width="1000px" Height="600px">
|
||||
</f:Window>
|
||||
<f:Window ID="Window3" Title="导入焊材入库" Hidden="true" EnableIFrame="true" EnableMaximize="false"
|
||||
Target="Parent" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true"
|
||||
Width="600px" Height="280px">
|
||||
</f:Window>
|
||||
<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>
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true"
|
||||
runat="server" Text="编辑" Icon="Pencil">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
|
||||
ConfirmText="删除选中行?" ConfirmTarget="Top" runat="server" Text="删除" Icon="Delete">
|
||||
</f:MenuButton>
|
||||
</f:Menu>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
var menuID = '<%= Menu1.ClientID %>';
|
||||
// 返回false,来阻止浏览器右键菜单
|
||||
function onRowContextMenu(event, rowId) {
|
||||
F(menuID).show(); //showAt(event.pageX, event.pageY);
|
||||
return false;
|
||||
}
|
||||
|
||||
function reloadGrid() {
|
||||
__doPostBack(null, 'reloadGrid');
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,288 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.SqlClient;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using BLL;
|
||||
|
||||
namespace FineUIPro.Web.HJGL.MaterialManage
|
||||
{
|
||||
public partial class QualityCertificate : PageBase
|
||||
{
|
||||
#region 加载页面
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
|
||||
this.drpWeldType.DataTextField = "WeldTypeName";
|
||||
this.drpWeldType.DataValueField = "WeldTypeId";
|
||||
this.drpWeldType.DataSource = BLL.WeldTypeService.GetWeldTypeList();
|
||||
this.drpWeldType.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpWeldType);
|
||||
|
||||
// 绑定表格
|
||||
BindGrid();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = @"SELECT QC.QualityCertificateId,QC.WeldId,QC.Warrantybook,Weld.WeldCode,Weld.WeldName,Weld.WeldSpec,QC.HeartNo,QC.CompileDate,
|
||||
WeldType.WeldTypeName
|
||||
FROM dbo.Weld_QualityCertificate AS QC
|
||||
LEFT JOIN dbo.Weld_WeldInfo AS Weld ON Weld.WeldId=QC.WeldId
|
||||
LEFT JOIN dbo.Weld_WeldType AS WeldType ON WeldType.WeldTypeId = Weld.WeldTypeId
|
||||
WHERE 1=1 ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
|
||||
if (!string.IsNullOrEmpty(this.txtWeldName.Text.Trim()))
|
||||
{
|
||||
strSql += " AND Weld.WeldName LIKE @WeldName";
|
||||
listStr.Add(new SqlParameter("@WeldName", "%" + this.txtWeldName.Text.Trim() + "%"));
|
||||
}
|
||||
if (drpWeldType.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND Weld.WeldTypeId = @WeldTypeId";
|
||||
listStr.Add(new SqlParameter("@WeldTypeId", drpWeldType.SelectedValue));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtHeartNo.Text.Trim()))
|
||||
{
|
||||
strSql += " AND QC.HeartNo LIKE @HeartNo";
|
||||
listStr.Add(new SqlParameter("@HeartNo", "%" + this.txtHeartNo.Text.Trim() + "%"));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtWarrantybook.Text.Trim()))
|
||||
{
|
||||
strSql += " AND QC.Warrantybook LIKE @Warrantybook";
|
||||
listStr.Add(new SqlParameter("@Warrantybook", "%" + this.txtWarrantybook.Text.Trim() + "%"));
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
//tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 表头过滤
|
||||
protected void Grid1_FilterChange(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 页索引改变事件
|
||||
/// <summary>
|
||||
/// 页索引改变事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
{
|
||||
Grid1.PageIndex = e.NewPageIndex;
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 排序
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_Sort(object sender, GridSortEventArgs e)
|
||||
{
|
||||
Grid1.SortDirection = e.SortDirection;
|
||||
Grid1.SortField = e.SortField;
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 分页选择下拉改变事件
|
||||
/// <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();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 弹出编辑窗口关闭事件
|
||||
/// <summary>
|
||||
/// 弹出编辑窗体关闭事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Window1_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 查询
|
||||
/// <summary>
|
||||
/// 查询
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void TextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 增加按钮
|
||||
/// <summary>
|
||||
/// 增加按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnNew_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.CLGL_QualityCertificateMenuId, BLL.Const.BtnAdd))
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("QualityCertificateEdit.aspx?QualityCertificateId={0}", string.Empty, "编辑 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 编辑
|
||||
/// <summary>
|
||||
/// 双击Grid事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
||||
{
|
||||
this.EditData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 编辑按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.EditData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 编辑数据方法
|
||||
/// </summary>
|
||||
private void EditData()
|
||||
{
|
||||
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.CLGL_QualityCertificateMenuId, BLL.Const.BtnModify))
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
string id = Grid1.SelectedRowID;
|
||||
if (!string.IsNullOrEmpty(id))
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("QualityCertificateEdit.aspx?QualityCertificateId={0}", id, "编辑 - ")));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 删除
|
||||
/// <summary>
|
||||
/// 右键删除事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.DeleteData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除方法
|
||||
/// </summary>
|
||||
private void DeleteData()
|
||||
{
|
||||
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.CLGL_QualityCertificateMenuId, BLL.Const.BtnDelete))
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 1)
|
||||
{
|
||||
string rowID = Grid1.SelectedRowID.ToString();
|
||||
if (this.judgementDelete(rowID))
|
||||
{
|
||||
CommonService.DeleteAttachFileById(rowID);//删除附件
|
||||
BLL.QualityCertificateService.DeleteQualityCertificate(rowID);
|
||||
BLL.Sys_LogService.AddLog(BLL.Const.System_7, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "删除焊材质保书");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("请选择要删除的记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
this.BindGrid();
|
||||
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 判断是否可删除
|
||||
/// </summary>
|
||||
/// <param name="rowID"></param>
|
||||
/// <param name="isShow"></param>
|
||||
/// <returns></returns>
|
||||
private bool judgementDelete(string rowID)
|
||||
{
|
||||
string content = string.Empty;
|
||||
//var q = from x in Funs.DB.Weld_UsingMat where x.StockInId == rowID select x;
|
||||
//if (q.Count() > 0)
|
||||
//{
|
||||
// content = "该入库材料已有领用,不能删除!";
|
||||
//}
|
||||
if (string.IsNullOrEmpty(content))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop(content);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
+213
@@ -0,0 +1,213 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HJGL.MaterialManage {
|
||||
|
||||
|
||||
public partial class QualityCertificate {
|
||||
|
||||
/// <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>
|
||||
/// Toolbar2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// txtWeldName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtWeldName;
|
||||
|
||||
/// <summary>
|
||||
/// drpWeldType 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpWeldType;
|
||||
|
||||
/// <summary>
|
||||
/// txtHeartNo 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtHeartNo;
|
||||
|
||||
/// <summary>
|
||||
/// txtWarrantybook 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtWarrantybook;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
/// <summary>
|
||||
/// btnNew 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnNew;
|
||||
|
||||
/// <summary>
|
||||
/// lblNumber 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblNumber;
|
||||
|
||||
/// <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;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
/// <summary>
|
||||
/// Window2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window2;
|
||||
|
||||
/// <summary>
|
||||
/// Window3 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window3;
|
||||
|
||||
/// <summary>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window WindowAtt;
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu1;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuEdit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuEdit;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuDelete 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuDelete;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="QualityCertificateEdit.aspx.cs" Inherits="FineUIPro.Web.HJGL.MaterialManage.QualityCertificateEdit" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title>编辑焊材质保书</title>
|
||||
<style>
|
||||
.customlabel span {
|
||||
color: red;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Form2" runat="server" />
|
||||
<f:Form ID="Form2" ShowBorder="False" BodyPadding="5px" ShowHeader="False" runat="server"
|
||||
RedStarPosition="BeforeText">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:HiddenField ID="hdWeldId" runat="server">
|
||||
</f:HiddenField>
|
||||
<f:HiddenField ID="hdQualityCertificateId" runat="server"></f:HiddenField>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow ColumnWidths="45% 5% 50%">
|
||||
<Items>
|
||||
<f:TextBox ID="txtWeldName" runat="server" Label="焊材牌号" LabelAlign="Right" Readonly="true"
|
||||
ShowRedStar="true">
|
||||
</f:TextBox>
|
||||
<f:Button runat="server" ID="btnSelect" Icon="Find" OnClick="btnSelect_Click" ToolTip="查找焊材信息">
|
||||
</f:Button>
|
||||
<f:TextBox ID="txtWeldSpec" runat="server" Label="规格" LabelAlign="Right" Readonly="true">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpHeartNo" runat="server" Label="批号" LabelAlign="Right" AutoPostBack="true" EnableEdit="true"
|
||||
OnSelectedIndexChanged="drpHeartNo_SelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
<f:TextBox ID="txtWeldType" runat="server" Label="类型" LabelAlign="Right" Readonly="true">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Label runat="server" ID="txtWarrantybook" Label="入库自编号" LabelAlign="Right"></f:Label>
|
||||
<f:LinkButton ID="UploadAttach2" runat="server" Label="质保书附件" Text="上传和查看" OnClick="btnAttachUrl2_Click"
|
||||
LabelAlign="Right">
|
||||
</f:LinkButton>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ValidateForms="Form2"
|
||||
OnClick="btnSave_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnClose" EnablePostBack="false" Text="关闭" runat="server" Icon="SystemClose">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Form>
|
||||
<f:Window ID="Window1" Title="查找焊材信息" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="true" runat="server" OnClose="Window1_Close" IsModal="true"
|
||||
Width="800px" Height="600px">
|
||||
</f:Window>
|
||||
<f:Window ID="Window2" Title="文件上传" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="true" runat="server" IsModal="true" Width="680px"
|
||||
Height="480px">
|
||||
</f:Window>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,216 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using BLL;
|
||||
|
||||
namespace FineUIPro.Web.HJGL.MaterialManage
|
||||
{
|
||||
public partial class QualityCertificateEdit : PageBase
|
||||
{
|
||||
#region 定义项
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
private string QualityCertificateId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["QualityCertificateId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["QualityCertificateId"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 加载
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
this.QualityCertificateId = Request.Params["QualityCertificateId"];
|
||||
StockInitService.InitHeartNo(this.drpHeartNo, true);
|
||||
if (!string.IsNullOrEmpty(this.QualityCertificateId))
|
||||
{
|
||||
this.hdQualityCertificateId.Text = this.QualityCertificateId;
|
||||
Model.Weld_QualityCertificate qc = BLL.QualityCertificateService.GetQualityCertificateByQualityCertificateId(this.QualityCertificateId);
|
||||
if (qc != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(qc.WeldId))
|
||||
{
|
||||
this.hdWeldId.Text = qc.WeldId;
|
||||
var weld = BLL.WeldInfoService.GetWeldInfoById(qc.WeldId);
|
||||
if (weld != null)
|
||||
{
|
||||
//this.txtWeldCode.Text = weld.WeldCode;
|
||||
this.txtWeldName.Text = weld.WeldName;
|
||||
this.txtWeldSpec.Text = weld.WeldSpec;
|
||||
if (!string.IsNullOrEmpty(weld.WeldTypeId))
|
||||
{
|
||||
var weldType = BLL.WeldTypeService.GetWeldTypeById(weld.WeldTypeId);
|
||||
if (weldType != null)
|
||||
{
|
||||
this.txtWeldType.Text = weldType.WeldTypeName;
|
||||
}
|
||||
}
|
||||
}
|
||||
this.drpHeartNo.SelectedItem.Text = qc.HeartNo;
|
||||
this.txtWarrantybook.Text = qc.Warrantybook;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 保存
|
||||
/// <summary>
|
||||
/// 保存按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.hdWeldId.Text == string.Empty)
|
||||
{
|
||||
Alert.ShowInTop("请选择焊材牌号!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (this.drpHeartNo.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
Alert.ShowInTop("请选择批号!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(this.hdQualityCertificateId.Text.Trim()))
|
||||
{
|
||||
Alert.ShowInTop("请上传质保书附件!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
SaveData();
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存数据
|
||||
/// </summary>
|
||||
private void SaveData()
|
||||
{
|
||||
Model.Weld_QualityCertificate qc = new Model.Weld_QualityCertificate();
|
||||
if (!string.IsNullOrEmpty(this.hdWeldId.Text.Trim()))
|
||||
{
|
||||
qc.WeldId = this.hdWeldId.Text.Trim();
|
||||
}
|
||||
|
||||
qc.Warrantybook = this.txtWarrantybook.Text.Trim();
|
||||
//qc.Number = txtNumber.Text.Trim();
|
||||
qc.HeartNo = drpHeartNo.SelectedItem.Text.Trim();
|
||||
qc.Warrantybook = txtWarrantybook.Text.Trim();
|
||||
qc.CompileMan = this.CurrUser.UserId;
|
||||
qc.CompileDate = DateTime.Now;
|
||||
if (!string.IsNullOrEmpty(this.QualityCertificateId))
|
||||
{
|
||||
qc.QualityCertificateId = this.QualityCertificateId;
|
||||
BLL.QualityCertificateService.UpdateQualityCertificate(qc);
|
||||
BLL.Sys_LogService.AddLog(Const.System_7, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "修改焊材质保书");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(this.hdQualityCertificateId.Text.Trim()))
|
||||
{
|
||||
qc.QualityCertificateId = SQLHelper.GetNewID(typeof(Model.Weld_QualityCertificate));
|
||||
}
|
||||
else
|
||||
{
|
||||
qc.QualityCertificateId = this.hdQualityCertificateId.Text.Trim();
|
||||
}
|
||||
BLL.QualityCertificateService.AddQualityCertificate(qc);
|
||||
BLL.Sys_LogService.AddLog(Const.System_7, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "添加焊材质保书");
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 附件上传
|
||||
/// <summary>
|
||||
/// 上传附件资源
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAttachUrl2_Click(object sender, EventArgs e)
|
||||
{
|
||||
string edit = "0"; // 表示能打开附件上传窗口,但不能上传附件
|
||||
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.CLGL_QualityCertificateMenuId, BLL.Const.BtnSave))
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.hdQualityCertificateId.Text.Trim()))
|
||||
{
|
||||
this.hdQualityCertificateId.Text = SQLHelper.GetNewID();
|
||||
}
|
||||
edit = "1";
|
||||
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/WeldMat/QualityCertificate&menuId={1}&edit={2}", this.hdQualityCertificateId.Text, Const.CLGL_QualityCertificateMenuId, edit)));
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 查找焊材信息
|
||||
/// <summary>
|
||||
/// 查找焊材信息
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSelect_Click(object sender, EventArgs e)
|
||||
{
|
||||
string window = String.Format("../../WeldMat/Stock/ShowWeldInfo.aspx", "编辑 - ");
|
||||
PageContext.RegisterStartupScript(Window1.GetSaveStateReference(this.hdWeldId.ClientID) + Window1.GetShowReference(window));
|
||||
}
|
||||
|
||||
#region 弹出编辑窗口关闭事件
|
||||
/// <summary>
|
||||
/// 弹出编辑窗体关闭事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Window1_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.hdWeldId.Text))
|
||||
{
|
||||
var weld = BLL.WeldInfoService.GetWeldInfoById(this.hdWeldId.Text);
|
||||
if (weld != null)
|
||||
{
|
||||
//this.txtWeldCode.Text = weld.WeldCode;
|
||||
this.txtWeldName.Text = weld.WeldName;
|
||||
this.txtWeldSpec.Text = weld.WeldSpec;
|
||||
if (!string.IsNullOrEmpty(weld.WeldTypeId))
|
||||
{
|
||||
var weldType = BLL.WeldTypeService.GetWeldTypeById(weld.WeldTypeId);
|
||||
if (weldType != null)
|
||||
{
|
||||
this.txtWeldType.Text = weldType.WeldTypeName;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
protected void drpHeartNo_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.txtWarrantybook.Text = string.Empty;
|
||||
if (this.drpHeartNo.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
this.txtWarrantybook.Text = this.drpHeartNo.SelectedValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+168
@@ -0,0 +1,168 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HJGL.MaterialManage {
|
||||
|
||||
|
||||
public partial class QualityCertificateEdit {
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// Form2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form Form2;
|
||||
|
||||
/// <summary>
|
||||
/// hdWeldId 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdWeldId;
|
||||
|
||||
/// <summary>
|
||||
/// hdQualityCertificateId 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdQualityCertificateId;
|
||||
|
||||
/// <summary>
|
||||
/// txtWeldName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtWeldName;
|
||||
|
||||
/// <summary>
|
||||
/// btnSelect 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSelect;
|
||||
|
||||
/// <summary>
|
||||
/// txtWeldSpec 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtWeldSpec;
|
||||
|
||||
/// <summary>
|
||||
/// drpHeartNo 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpHeartNo;
|
||||
|
||||
/// <summary>
|
||||
/// txtWeldType 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtWeldType;
|
||||
|
||||
/// <summary>
|
||||
/// txtWarrantybook 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label txtWarrantybook;
|
||||
|
||||
/// <summary>
|
||||
/// UploadAttach2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.LinkButton UploadAttach2;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// btnClose 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnClose;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
/// <summary>
|
||||
/// Window2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window2;
|
||||
}
|
||||
}
|
||||
@@ -200,14 +200,15 @@
|
||||
this.ddlCheckFlag.Text = "未检测";
|
||||
if (!string.IsNullOrEmpty(this.JOT_ID))
|
||||
{
|
||||
var hotItems = from x in BLL.Funs.DB.HJGL_CH_HotProessTrustItem where x.JOT_ID == JOT_ID select x;
|
||||
//var hotItems = from x in BLL.Funs.DB.HJGL_CH_HotProessTrustItem where x.JOT_ID == JOT_ID select x;
|
||||
var batchDetail = BLL.HJGL_BO_BatchDetailService.GetBatchDetailByJotId(JOT_ID);
|
||||
var batch = (from x in Funs.DB.HJGL_BO_Batch
|
||||
join y in Funs.DB.HJGL_BO_BatchDetail
|
||||
on x.BatchId equals y.BatchId
|
||||
where y.JOT_ID == this.JOT_ID
|
||||
select x).FirstOrDefault();
|
||||
if ((batchDetail != null || hotItems.Count() > 0) && this.CurrUser.UserId != BLL.Const.GlyId)
|
||||
//if ((batchDetail != null || hotItems.Count() > 0) && this.CurrUser.UserId != BLL.Const.GlyId)
|
||||
if ((batchDetail != null) && this.CurrUser.UserId != BLL.Const.GlyId)
|
||||
{
|
||||
this.TextIsReadOnly(true);
|
||||
var trustItem = (from x in Funs.DB.HJGL_CH_TrustItem
|
||||
@@ -262,16 +263,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
if (hotItems.Count() > 0)
|
||||
{
|
||||
drpIS_Proess.Enabled = false;
|
||||
//drpProessTypes.Enabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
drpIS_Proess.Enabled = true;
|
||||
//drpProessTypes.Enabled = true;
|
||||
}
|
||||
//if (hotItems.Count() > 0)
|
||||
//{
|
||||
// drpIS_Proess.Enabled = false;
|
||||
// //drpProessTypes.Enabled = false;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// drpIS_Proess.Enabled = true;
|
||||
// //drpProessTypes.Enabled = true;
|
||||
//}
|
||||
|
||||
//热处理后只能增加热处理类型,或者去除还未委托的热处理类型
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="统计样表" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" EnableColumnLines="true" AllowSorting="true"
|
||||
SortField="ISO_IsoNo" SortDirection="ASC" OnSort="Grid1_Sort" AllowPaging="true"
|
||||
SortField="ISO_IsoNo,JOTY_Group,Sort1,Sort2,Sort3,Sort4,Sort5" SortDirection="ASC" OnSort="Grid1_Sort" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange">
|
||||
<Columns>
|
||||
<f:RowNumberField />
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CommencementReport.aspx.cs" Inherits="FineUIPro.Web.JGZL.CommencementReport" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>工程施工开工报告</title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
|
||||
<Items>
|
||||
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
|
||||
EnableCollapse="true" Width="220px" Title="工程施工开工报告" ShowBorder="true" Layout="VBox"
|
||||
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:DropDownList ID="drpProjectId" runat="server" Label="项目" LabelAlign="Right" AutoPostBack="true" EnableEdit="true"
|
||||
OnSelectedIndexChanged="drpProjectId_SelectedIndexChanged" LabelWidth="50px">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Items>
|
||||
<f:Tree ID="tvControlItem" ShowHeader="false" Title="工程施工开工报告节点树" OnNodeCommand="tvControlItem_NodeCommand"
|
||||
runat="server" ShowBorder="false" EnableCollapse="true" EnableSingleClickExpand="true"
|
||||
AutoLeafIdentification="true" EnableSingleExpand="true" EnableTextSelection="true">
|
||||
</f:Tree>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
|
||||
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" Title="工程施工开工报告"
|
||||
TitleToolTip="工程施工开工报告" AutoScroll="true">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
|
||||
<Items>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnAdd" runat="server" Icon="Add" Text="增加" OnClick="btnAdd_Click"></f:Button>
|
||||
<f:Button ID="btnPrint" Text="工程施工开工报告打印" Icon="Printer" runat="server" OnClick="btnPrint_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="工程施工开工报告" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="CommencementReportId" AllowCellEditing="true"
|
||||
EnableColumnLines="true" ClicksToEdit="1" DataIDField="CommencementReportId" AllowSorting="true"
|
||||
SortField="ContractNumber" SortDirection="DESC" OnSort="Grid1_Sort" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
EnableTextSelection="True" AutoScroll="true" EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick">
|
||||
<Columns>
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center"
|
||||
TextAlign="Center" />
|
||||
<f:RenderField HeaderText="施工合同编号" ColumnID="ContractNumber" DataField="ContractNumber" SortField="ContractNumber"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="120px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="设计单位" ColumnID="DesignUnit" DataField="DesignUnit" SortField="DesignUnit"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="200px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="计划开工日期" ColumnID="PlannedStartDate" DataField="PlannedStartDate" SortField="PlannedStartDate"
|
||||
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="计划交工日期" ColumnID="PlannedEndDate" DataField="PlannedEndDate" SortField="PlannedEndDate"
|
||||
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="工程内容" ColumnID="ProjectContent" DataField="ProjectContent" SortField="ProjectContent"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="180px" ExpandUnusedSpace="true">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="开工条件" ColumnID="Conditions" DataField="Conditions" SortField="Conditions"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="180px" ExpandUnusedSpace="true">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
</Listeners>
|
||||
<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>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Window ID="Window1" Title="工程施工开工报告" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="top" EnableResize="true" runat="server" OnClose="Window1_Close" IsModal="true"
|
||||
Width="1100px" Height="620px">
|
||||
</f:Window>
|
||||
<f:Window ID="WindowPrint" Title="打印工程施工开工报告" Hidden="true" EnableIFrame="true" EnableMaximize="false"
|
||||
Target="Top" EnableResize="true" runat="server" IsModal="true" Width="1024px"
|
||||
Height="600px">
|
||||
</f:Window>
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true"
|
||||
runat="server" Text="编辑" Icon="TableEdit">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
|
||||
ConfirmText="删除选中行?" ConfirmTarget="Top" runat="server" Text="删除" Icon="Delete">
|
||||
</f:MenuButton>
|
||||
</f:Menu>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
var menuID = '<%= Menu1.ClientID %>';
|
||||
// 返回false,来阻止浏览器右键菜单
|
||||
function onRowContextMenu(event, rowId) {
|
||||
F(menuID).show(); //showAt(event.pageX, event.pageY);
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,388 @@
|
||||
using BLL;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.SqlClient;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.IO;
|
||||
using Org.BouncyCastle.Bcpg.OpenPgp;
|
||||
|
||||
namespace FineUIPro.Web.JGZL
|
||||
{
|
||||
public partial class CommencementReport : PageBase
|
||||
{
|
||||
#region 加载页面
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
|
||||
|
||||
this.drpProjectId.DataTextField = "ProjectCode";
|
||||
this.drpProjectId.DataValueField = "ProjectId";
|
||||
this.drpProjectId.DataSource = BLL.Base_ProjectService.GetOnProjectListByUserId(this.CurrUser.UserId, "1");
|
||||
this.drpProjectId.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpProjectId);
|
||||
|
||||
this.InitTreeMenu();//加载树
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 加载树项目
|
||||
/// <summary>
|
||||
/// 加载树
|
||||
/// </summary>
|
||||
private void InitTreeMenu()
|
||||
{
|
||||
this.tvControlItem.Nodes.Clear();
|
||||
TreeNode rootNode = new TreeNode();
|
||||
rootNode.Text = "项目";
|
||||
rootNode.ToolTip = "项目";
|
||||
rootNode.NodeID = "0";
|
||||
rootNode.Expanded = true;
|
||||
this.tvControlItem.Nodes.Add(rootNode);
|
||||
|
||||
List<Model.Base_Project> projects = BLL.Base_ProjectService.GetOnProjectListByUserId(this.CurrUser.UserId, "1");
|
||||
if (this.drpProjectId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
projects = projects.Where(e => e.ProjectId == this.drpProjectId.SelectedValue).ToList();
|
||||
}
|
||||
foreach (var item in projects)
|
||||
{
|
||||
TreeNode rootProjectNode = new TreeNode();//定义根节点
|
||||
rootProjectNode.Text = item.ProjectCode;
|
||||
rootProjectNode.NodeID = item.ProjectId;
|
||||
rootProjectNode.EnableClickEvent = true;
|
||||
rootProjectNode.Expanded = true;
|
||||
rootProjectNode.ToolTip = item.ProjectName;
|
||||
rootProjectNode.CommandName = "项目名称";
|
||||
rootNode.Nodes.Add(rootProjectNode);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 点击TreeView
|
||||
/// <summary>
|
||||
/// 点击TreeView
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
|
||||
{
|
||||
if (this.tvControlItem.SelectedNodeID != "0")
|
||||
{
|
||||
this.BindGrid();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 数据绑定
|
||||
/// <summary>
|
||||
/// 数据绑定
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
//string projectIds = BLL.Base_ProjectService.GetStrOnProjectIds(this.CurrUser.UserId, "1");
|
||||
string strSql = @"SELECT * from JGZL_CommencementReport where 1=1";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
||||
{
|
||||
strSql += " AND ProjectId = @ProjectId";
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.tvControlItem.SelectedNodeID));
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// strSql += " AND CHARINDEX(ProjectId,@ProjectId)>0 ";
|
||||
// listStr.Add(new SqlParameter("@ProjectId", projectIds));
|
||||
//}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
// 2.获取当前分页数据
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
//tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 分页排序
|
||||
#region 页索引改变事件
|
||||
/// <summary>
|
||||
/// 页索引改变事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 排序
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_Sort(object sender, GridSortEventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 分页选择下拉改变事件
|
||||
/// <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();
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region 查询
|
||||
///<summary>
|
||||
///查询
|
||||
///</summary>
|
||||
///<param name="sender"></param>
|
||||
///<param name="e"></param>
|
||||
protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.InitTreeMenu();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void TextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 打印
|
||||
/// <summary>
|
||||
/// 打印
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnPrint_Click(object sender, EventArgs e)
|
||||
{
|
||||
string projectId = this.tvControlItem.SelectedNodeID;
|
||||
|
||||
if (projectId != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID))
|
||||
{
|
||||
string initTemplatePath = "";
|
||||
string rootPath = Server.MapPath("~/");
|
||||
BLL.Common.FastReportService.ResetData();
|
||||
|
||||
var report = BLL.CommencementReportService.GetCommencementReportById(this.Grid1.SelectedRowID);
|
||||
if (report != null)
|
||||
{
|
||||
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
|
||||
keyValuePairs.Add("ProjectName", BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName);
|
||||
keyValuePairs.Add("ContractNumber", report.ContractNumber);
|
||||
keyValuePairs.Add("DesignUnit", report.DesignUnit);
|
||||
keyValuePairs.Add("PlannedStartDate", report.PlannedStartDate.HasValue ? string.Format("{0:yyyy年MM月dd日}",report.PlannedStartDate) : "");
|
||||
keyValuePairs.Add("PlannedEndDate", report.PlannedEndDate.HasValue ? string.Format("{0:yyyy年MM月dd日}",report.PlannedEndDate) : "");
|
||||
keyValuePairs.Add("ProjectContent", report.ProjectContent);
|
||||
keyValuePairs.Add("Conditions", report.Conditions);
|
||||
keyValuePairs.Add("ReviewOpinion", report.ReviewOpinion);
|
||||
keyValuePairs.Add("QualitySupervisionOpinion", report.QualitySupervisionOpinion);
|
||||
BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs);
|
||||
}
|
||||
initTemplatePath = "File\\Fastreport\\JGZL\\工程施工开工报告.frx";
|
||||
if (File.Exists(rootPath + initTemplatePath))
|
||||
{
|
||||
PageContext.RegisterStartupScript(WindowPrint.GetShowReference(String.Format("../common/ReportPrint/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath)));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 维护
|
||||
/// <summary>
|
||||
/// 增加
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CommencementReportEdit.aspx?projectId={0}", this.tvControlItem.SelectedNodeID, "新增 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 双击编辑
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
||||
{
|
||||
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_CommencementReportMenuId, BLL.Const.BtnModify))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID))
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CommencementReportEdit.aspx?commencementReportId={0}", this.Grid1.SelectedRowID, "编辑 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 右键编辑
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_CommencementReportMenuId, BLL.Const.BtnModify))
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CommencementReportEdit.aspx?commencementReportId={0}", Grid1.SelectedRowID, "维护 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 右键删除
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.JGZL_CommencementReportMenuId, Const.BtnDelete))
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
bool isShow = true;
|
||||
if (Grid1.SelectedRowIndexArray.Length > 1)
|
||||
{
|
||||
isShow = false;
|
||||
}
|
||||
bool isDelete = false;
|
||||
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
||||
{
|
||||
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
||||
if (judgementDelete(rowID, isShow))
|
||||
{
|
||||
isDelete = true;
|
||||
BLL.CommencementReportService.DeleteCommencementReportById(rowID);
|
||||
BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "删除工程施工开工报告");
|
||||
}
|
||||
}
|
||||
if (isDelete)
|
||||
{
|
||||
ShowNotify("删除成功!", MessageBoxIcon.Success);
|
||||
}
|
||||
this.BindGrid();
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
#region 判断是否可删除
|
||||
/// <summary>
|
||||
/// 判断是否可以删除
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private bool judgementDelete(string id, bool isShow)
|
||||
{
|
||||
string content = string.Empty;
|
||||
|
||||
if (string.IsNullOrEmpty(content))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (isShow)
|
||||
{
|
||||
Alert.ShowInTop(content, MessageBoxIcon.Error);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region 关闭弹出窗口及刷新页面
|
||||
/// <summary>
|
||||
/// 关闭弹出窗口
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Window1_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
this.InitTreeMenu();//加载树
|
||||
this.BindGrid();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,206 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.JGZL
|
||||
{
|
||||
|
||||
|
||||
public partial class CommencementReport
|
||||
{
|
||||
|
||||
/// <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>
|
||||
/// panelLeftRegion 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelLeftRegion;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// drpProjectId 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpProjectId;
|
||||
|
||||
/// <summary>
|
||||
/// tvControlItem 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Tree tvControlItem;
|
||||
|
||||
/// <summary>
|
||||
/// panelCenterRegion 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelCenterRegion;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
/// <summary>
|
||||
/// btnAdd 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAdd;
|
||||
|
||||
/// <summary>
|
||||
/// btnPrint 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnPrint;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <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;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
/// <summary>
|
||||
/// WindowPrint 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window WindowPrint;
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu1;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuEdit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuEdit;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuDelete 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuDelete;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CommencementReportEdit.aspx.cs" Inherits="FineUIPro.Web.JGZL.CommencementReportEdit" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>编辑工程施工开工报告</title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Form ID="SimpleForm1" ShowBorder="true" ShowHeader="false" AutoScroll="true" BodyPadding="10px"
|
||||
runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" runat="server" ToolbarAlign="Right">
|
||||
<Items>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ValidateForms="SimpleForm1"
|
||||
OnClick="btnSave_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtContractNumber" runat="server" Label="施工合同编号" LabelAlign="Right" LabelWidth="110px" MaxLength="100" Required="true" ShowRedStar="true"></f:TextBox>
|
||||
<f:TextBox ID="txtDesignUnit" runat="server" Label="设计单位" LabelAlign="Right" LabelWidth="110px" MaxLength="50" Required="true" ShowRedStar="true"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DatePicker ID="txtPlannedStartDate" runat="server" Label="计划开工日期" LabelAlign="Right" LabelWidth="110px"></f:DatePicker>
|
||||
<f:DatePicker ID="txtPlannedEndDate" runat="server" Label="计划交工日期" LabelAlign="Right" LabelWidth="110px"></f:DatePicker>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea ID="txtProjectContent" runat="server" Label="工程内容" LabelAlign="Right" LabelWidth="110px" MaxLength="2000" Required="true" ShowRedStar="true"></f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea ID="txtConditions" runat="server" Label="开工条件" LabelAlign="Right" LabelWidth="110px" MaxLength="1000"></f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea ID="txtReviewOpinion" runat="server" Label="审查意见" LabelAlign="Right" LabelWidth="110px" MaxLength="1000"></f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea ID="txtQualitySupervisionOpinion" runat="server" Label="质量监督意见" LabelAlign="Right" LabelWidth="110px" MaxLength="1000"></f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
</f:Form>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,121 @@
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.JGZL
|
||||
{
|
||||
public partial class CommencementReportEdit :PageBase
|
||||
{
|
||||
#region 定义项
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
private string CommencementReportId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["CommencementReportId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["CommencementReportId"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 项目Id
|
||||
/// </summary>
|
||||
private string ProjectId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["ProjectId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ProjectId"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 加载页面
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.ProjectId = Request.Params["projectId"];
|
||||
this.CommencementReportId = Request.Params["commencementReportId"];
|
||||
if (!string.IsNullOrEmpty(this.CommencementReportId))
|
||||
{
|
||||
var report = BLL.CommencementReportService.GetCommencementReportById(this.CommencementReportId);
|
||||
if (report!=null)
|
||||
{
|
||||
this.txtContractNumber.Text = report.ContractNumber;
|
||||
this.txtDesignUnit.Text = report.DesignUnit;
|
||||
this.txtPlannedStartDate.Text = report.PlannedStartDate.HasValue ? string.Format("{0:yyyy-MM-dd}", report.PlannedStartDate) : "";
|
||||
this.txtPlannedEndDate.Text = report.PlannedEndDate.HasValue ? string.Format("{0:yyyy-MM-dd}", report.PlannedEndDate) : "";
|
||||
this.txtConditions.Text = report.Conditions;
|
||||
this.txtProjectContent.Text = report.ProjectContent;
|
||||
this.txtReviewOpinion.Text = report.ReviewOpinion;
|
||||
this.txtQualitySupervisionOpinion.Text = report.QualitySupervisionOpinion;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 提交按钮
|
||||
/// <summary>
|
||||
/// 提交按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.JGZL_CommencementReportMenuId, Const.BtnSave))
|
||||
{
|
||||
Model.JGZL_CommencementReport newReport = new Model.JGZL_CommencementReport();
|
||||
newReport.ContractNumber = this.txtContractNumber.Text.Trim();
|
||||
newReport.DesignUnit = this.txtDesignUnit.Text.Trim();
|
||||
newReport.PlannedStartDate = Funs.GetNewDateTime(this.txtPlannedStartDate.Text);
|
||||
newReport.PlannedEndDate = Funs.GetNewDateTime(this.txtPlannedEndDate.Text);
|
||||
newReport.ProjectContent = this.txtProjectContent.Text;
|
||||
newReport.Conditions = this.txtConditions.Text;
|
||||
newReport.ReviewOpinion =this.txtReviewOpinion.Text;
|
||||
newReport.QualitySupervisionOpinion = this.txtQualitySupervisionOpinion.Text;
|
||||
if (!string.IsNullOrEmpty(this.CommencementReportId))
|
||||
{
|
||||
newReport.CommencementReportId = this.CommencementReportId;
|
||||
BLL.CommencementReportService.UpdateCommencementReport(newReport);
|
||||
}
|
||||
else
|
||||
{
|
||||
newReport.ProjectId = this.ProjectId;
|
||||
newReport.CompileMan = this.CurrUser.UserId;
|
||||
newReport.CompileDate = DateTime.Now;
|
||||
newReport.CommencementReportId = SQLHelper.GetNewID(typeof(Model.JGZL_CommencementReport));
|
||||
this.CommencementReportId = newReport.CommencementReportId;
|
||||
BLL.CommencementReportService.AddCommencementReport(newReport);
|
||||
}
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,143 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.JGZL
|
||||
{
|
||||
|
||||
|
||||
public partial class CommencementReportEdit
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// SimpleForm1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// txtContractNumber 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtContractNumber;
|
||||
|
||||
/// <summary>
|
||||
/// txtDesignUnit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtDesignUnit;
|
||||
|
||||
/// <summary>
|
||||
/// txtPlannedStartDate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtPlannedStartDate;
|
||||
|
||||
/// <summary>
|
||||
/// txtPlannedEndDate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtPlannedEndDate;
|
||||
|
||||
/// <summary>
|
||||
/// txtProjectContent 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtProjectContent;
|
||||
|
||||
/// <summary>
|
||||
/// txtConditions 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtConditions;
|
||||
|
||||
/// <summary>
|
||||
/// txtReviewOpinion 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtReviewOpinion;
|
||||
|
||||
/// <summary>
|
||||
/// txtQualitySupervisionOpinion 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtQualitySupervisionOpinion;
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@
|
||||
<FineUIPro DebugMode="false" Theme="Cupertino"/>
|
||||
<appSettings>
|
||||
<!--连接字符串-->
|
||||
<add key="ConnectionString" value="Server=.\MSSQLSERVER01;Database=HJGLDB_DS;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Max Pool Size = 1000;Connect Timeout=1200"/>
|
||||
<add key="ConnectionString" value="Server=.\SQL2022;Database=HJGLDB_DS;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Max Pool Size = 1000;Connect Timeout=1200"/>
|
||||
<!--系统名称-->
|
||||
<add key="SystemName" value="诺必达焊接管理系统"/>
|
||||
<add key="ChartImageHandler" value="storage=file;timeout=20;url=~/Images/;"/>
|
||||
|
||||
@@ -45,7 +45,8 @@
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtHeartNo" runat="server" Label="批号" LabelAlign="Right" >
|
||||
<f:TextBox ID="txtHeartNo" runat="server" Label="批号" LabelAlign="Right" Required="true"
|
||||
ShowRedStar="true">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtWeldUnit" runat="server" Label="计量单位" LabelAlign="Right" Readonly="true">
|
||||
</f:TextBox>
|
||||
|
||||
@@ -73,6 +73,9 @@
|
||||
<f:RenderField Width="80px" ColumnID="Amount" DataField="Amount" FieldType="Float"
|
||||
HeaderText="移入数量" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="90px" ColumnID="MoveInMan" DataField="MoveInMan" FieldType="String"
|
||||
HeaderText="操作人" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="MoveInDate" DataField="MoveInDate" FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd HH:mm:ss"
|
||||
HeaderText="操作时间" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
|
||||
@@ -53,6 +53,7 @@ namespace FineUIPro.Web.WeldMat.Stock
|
||||
WeldType.WeldTypeName,
|
||||
(unit2.UnitName+'('+unitStoreMoveIn.UnitStoreName+')') as UnitStoreMoveInName,
|
||||
StockIn.Amount,
|
||||
us.UserName as MoveInMan,
|
||||
StockIn.MoveInDate
|
||||
from Weld_StockIn as stockIn
|
||||
left join Weld_UnitStore as unitStore on unitStore.UnitStoreId=stockIn.MoveInStoreId
|
||||
@@ -61,6 +62,7 @@ namespace FineUIPro.Web.WeldMat.Stock
|
||||
LEFT JOIN dbo.Weld_WeldType AS WeldType ON WeldType.WeldTypeId = Weld.WeldTypeId
|
||||
left join Weld_UnitStore as unitStoreMoveIn on unitStoreMoveIn.UnitStoreId=stockIn.UnitStoreId
|
||||
left join Base_Unit as unit2 on unit2.UnitId = unitStoreMoveIn.UnitId
|
||||
left join Sys_User as us on us.UserId=stockIn.MoveInManId
|
||||
where stockIn.Flag='1'
|
||||
and MoveInStoreId is not null ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
|
||||
+1046
-1
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
|
||||
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
||||
<NameOfLastUsedPublishProfile>FolderProfile</NameOfLastUsedPublishProfile>
|
||||
<UseIISExpress>true</UseIISExpress>
|
||||
<Use64BitIISExpress />
|
||||
|
||||
Reference in New Issue
Block a user