111
This commit is contained in:
commit
05801d8e58
|
@ -162,7 +162,7 @@
|
||||||
</site>
|
</site>
|
||||||
<site name="WebApi" id="2">
|
<site name="WebApi" id="2">
|
||||||
<application path="/" applicationPool="Clr4IntegratedAppPool">
|
<application path="/" applicationPool="Clr4IntegratedAppPool">
|
||||||
<virtualDirectory path="/" physicalPath="E:\MyProject\ZJ_BSF\Basf_TCC7\HJGL\WebApi" />
|
<virtualDirectory path="/" physicalPath="E:\湛江巴斯夫\Basf_TCC7\HJGL\WebApi" />
|
||||||
</application>
|
</application>
|
||||||
<bindings>
|
<bindings>
|
||||||
<binding protocol="http" bindingInformation="*:3862:localhost" />
|
<binding protocol="http" bindingInformation="*:3862:localhost" />
|
||||||
|
@ -250,7 +250,7 @@
|
||||||
</site>
|
</site>
|
||||||
<site name="FineUIPro.Web(10)" id="13">
|
<site name="FineUIPro.Web(10)" id="13">
|
||||||
<application path="/" applicationPool="Clr4IntegratedAppPool">
|
<application path="/" applicationPool="Clr4IntegratedAppPool">
|
||||||
<virtualDirectory path="/" physicalPath="E:\MyProject\ZJ_BSF\Basf_TCC7\HJGL\FineUIPro.Web" />
|
<virtualDirectory path="/" physicalPath="E:\湛江巴斯夫\Basf_TCC7\HJGL\FineUIPro.Web" />
|
||||||
</application>
|
</application>
|
||||||
<bindings>
|
<bindings>
|
||||||
<binding protocol="http" bindingInformation="*:13960:localhost" />
|
<binding protocol="http" bindingInformation="*:13960:localhost" />
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ProjectView>ProjectFiles</ProjectView>
|
<ProjectView>ShowAllFiles</ProjectView>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ProjectView>ShowAllFiles</ProjectView>
|
<ProjectView>ProjectFiles</ProjectView>
|
||||||
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
||||||
<UseIISExpress>true</UseIISExpress>
|
<UseIISExpress>true</UseIISExpress>
|
||||||
<Use64BitIISExpress />
|
<Use64BitIISExpress />
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -21,7 +21,7 @@
|
||||||
<Items>
|
<Items>
|
||||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="<%$ Resources:Lan,JointComprehensive %>"
|
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="<%$ Resources:Lan,JointComprehensive %>"
|
||||||
EnableCollapse="true" runat="server" BoxFlex="1" EnableColumnLines="true"
|
EnableCollapse="true" runat="server" BoxFlex="1" EnableColumnLines="true"
|
||||||
AllowSorting="true" SortField="PipelineCode,WeldJointCode" OnSort="Grid1_Sort"
|
AllowSorting="true" DataKeyNames="WeldJointId" SortField="PipelineCode,WeldJointCode" OnSort="Grid1_Sort"
|
||||||
AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange"
|
AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange"
|
||||||
EnableTextSelection="True" EnableCheckBoxSelect="true" EnableSummary="true" SummaryPosition="Flow">
|
EnableTextSelection="True" EnableCheckBoxSelect="true" EnableSummary="true" SummaryPosition="Flow">
|
||||||
<Toolbars>
|
<Toolbars>
|
||||||
|
@ -65,6 +65,7 @@
|
||||||
<f:Button ID="BtnAnalyse" Text="<%$ Resources:Lan,Statistics %>" Icon="ChartPie"
|
<f:Button ID="BtnAnalyse" Text="<%$ Resources:Lan,Statistics %>" Icon="ChartPie"
|
||||||
runat="server" OnClick="BtnAnalyse_Click">
|
runat="server" OnClick="BtnAnalyse_Click">
|
||||||
</f:Button>
|
</f:Button>
|
||||||
|
<f:Button ID="btnAuditAll" runat="server" Text="批量审核" ConfirmText="确定要批量审核吗?" ConfirmTarget="Top" OnClick="btnAuditAll_Click" Icon="Accept"></f:Button>
|
||||||
<f:Button ID="btnAudit" runat="server" Text="审核" ConfirmText="确定要审核这些日报吗?" ConfirmTarget="Top" OnClick="btnAudit_Click" Icon="Accept"></f:Button>
|
<f:Button ID="btnAudit" runat="server" Text="审核" ConfirmText="确定要审核这些日报吗?" ConfirmTarget="Top" OnClick="btnAudit_Click" Icon="Accept"></f:Button>
|
||||||
<f:Button ID="btnCancel" runat="server" Text="取消审核" ConfirmText="确定要取消审核这些日报吗?" ConfirmTarget="Top" OnClick="btnCancel_Click" Icon="Cancel"></f:Button>
|
<f:Button ID="btnCancel" runat="server" Text="取消审核" ConfirmText="确定要取消审核这些日报吗?" ConfirmTarget="Top" OnClick="btnCancel_Click" Icon="Cancel"></f:Button>
|
||||||
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="<%$ Resources:Lan,Export %>"
|
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="<%$ Resources:Lan,Export %>"
|
||||||
|
|
|
@ -250,13 +250,35 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//获取焊口ID集合
|
//批量审核
|
||||||
|
|
||||||
|
|
||||||
|
protected void btnAuditAll_Click(object sender,EventArgs e)
|
||||||
|
{
|
||||||
|
var data = this.GetDataTable();
|
||||||
|
if (string.IsNullOrEmpty(txtStarTime.Text) && string.IsNullOrEmpty(txtEndTime.Text))
|
||||||
|
{
|
||||||
|
ShowNotify("请按照日期选择要审核的日报!",MessageBoxIcon.Warning);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
List<string> ids = new List<string>();
|
||||||
|
foreach (DataRow dr in data.Rows)
|
||||||
|
{
|
||||||
|
ids.Add(dr["WeldJointId"].ToString());
|
||||||
|
}
|
||||||
|
ModifyAuditStatus(ids, 1);
|
||||||
|
this.BindGrid();
|
||||||
|
ShowNotify("批量审核成功!", MessageBoxIcon.Success);
|
||||||
|
}
|
||||||
//审核
|
//审核
|
||||||
protected void btnAudit_Click(object sender,EventArgs e)
|
protected void btnAudit_Click(object sender,EventArgs e)
|
||||||
{
|
{
|
||||||
ModifyAuditStatus(1);
|
var listIds = GetWeldJointIdList();
|
||||||
|
if (listIds.Count == 0)
|
||||||
|
{
|
||||||
|
ShowNotify("请选择要审核的焊接日报数据", MessageBoxIcon.Warning);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
ModifyAuditStatus(listIds,1);
|
||||||
this.BindGrid();
|
this.BindGrid();
|
||||||
|
|
||||||
ShowNotify("批量审核成功!", MessageBoxIcon.Success);
|
ShowNotify("批量审核成功!", MessageBoxIcon.Success);
|
||||||
|
@ -264,10 +286,17 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
|
||||||
//取消审核
|
//取消审核
|
||||||
protected void btnCancel_Click(object sender, EventArgs e)
|
protected void btnCancel_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
ModifyAuditStatus(0);
|
var listIds = GetWeldJointIdList();
|
||||||
|
if (listIds.Count == 0)
|
||||||
|
{
|
||||||
|
ShowNotify("请选择要取消审核的焊接日报数据", MessageBoxIcon.Warning);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
ModifyAuditStatus(listIds,0);
|
||||||
this.BindGrid();
|
this.BindGrid();
|
||||||
ShowNotify("批量取消审核成功!", MessageBoxIcon.Success);
|
ShowNotify("批量取消审核成功!", MessageBoxIcon.Success);
|
||||||
}
|
}
|
||||||
|
|
||||||
//发送邮件
|
//发送邮件
|
||||||
protected void btnSendEmail_Click(object sender,EventArgs e)
|
protected void btnSendEmail_Click(object sender,EventArgs e)
|
||||||
{
|
{
|
||||||
|
@ -288,6 +317,8 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
|
||||||
}
|
}
|
||||||
string ReportFileName = filePath + $"焊接日报_{DateTime.Now.ToString("yyyyMMddhhmmss")}.xlsx";
|
string ReportFileName = filePath + $"焊接日报_{DateTime.Now.ToString("yyyyMMddhhmmss")}.xlsx";
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
FileStream file = new FileStream(TempletFileName, FileMode.Open, FileAccess.Read);
|
FileStream file = new FileStream(TempletFileName, FileMode.Open, FileAccess.Read);
|
||||||
XSSFWorkbook hssfworkbook = new XSSFWorkbook(file);
|
XSSFWorkbook hssfworkbook = new XSSFWorkbook(file);
|
||||||
|
|
||||||
|
@ -469,6 +500,12 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
|
||||||
|
|
||||||
this.GetEmailTemplateAndSendEmail(ReportFileName);
|
this.GetEmailTemplateAndSendEmail(ReportFileName);
|
||||||
File.Delete(ReportFileName);
|
File.Delete(ReportFileName);
|
||||||
|
ShowNotify("焊接日报发送成功!", MessageBoxIcon.Success);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
ShowNotify($"发送失败,原因:{ex.Message}", MessageBoxIcon.Error);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
protected void Window1_Close(object sender, EventArgs e)
|
protected void Window1_Close(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
@ -870,19 +907,16 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
|
||||||
private List<string> GetWeldJointIdList()
|
private List<string> GetWeldJointIdList()
|
||||||
{
|
{
|
||||||
List<string> listIds = new List<string>();
|
List<string> listIds = new List<string>();
|
||||||
for (int i = 0; i < Grid1.Rows.Count; i++)
|
int[] selections = Grid1.SelectedRowIndexArray;
|
||||||
|
foreach (int rowIndex in selections)
|
||||||
{
|
{
|
||||||
AspNet.HiddenField WeldJointIdVal = Grid1.Rows[i].FindControl("hidId") as AspNet.HiddenField;
|
string rowId = Grid1.DataKeys[rowIndex][0].ToString();
|
||||||
if (WeldJointIdVal != null)
|
listIds.Add(rowId);
|
||||||
{
|
|
||||||
listIds.Add(WeldJointIdVal.Value);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return listIds;
|
return listIds;
|
||||||
}
|
}
|
||||||
private void ModifyAuditStatus(int auditStatus)
|
private void ModifyAuditStatus(List<string> listIds, int auditStatus)
|
||||||
{
|
{
|
||||||
var listIds = GetWeldJointIdList();
|
|
||||||
var result = Funs.DB.Pipeline_WeldJoint.Where(t => listIds.Contains(t.WeldJointId)).ToList();
|
var result = Funs.DB.Pipeline_WeldJoint.Where(t => listIds.Contains(t.WeldJointId)).ToList();
|
||||||
foreach (var item in result)
|
foreach (var item in result)
|
||||||
{
|
{
|
||||||
|
|
|
@ -158,6 +158,15 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Button BtnAnalyse;
|
protected global::FineUIPro.Button BtnAnalyse;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnAuditAll 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Button btnAuditAll;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// btnAudit 控件。
|
/// btnAudit 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Reference in New Issue