This commit is contained in:
2024-09-27 18:17:21 +08:00
parent be070f85e2
commit 064a849b97
73 changed files with 3248 additions and 589 deletions
@@ -1288,5 +1288,49 @@ namespace FineUIPro.Web.HJGL.WeldingManage
}
}
}
protected void btnPrintJoint_Click(object sender, EventArgs e)
{
var rows = Grid1.SelectedRowIndexArray;
List<string> jointids = new List<string>();
foreach (int rowIndex in rows)
{
string jointid = Grid1.DataKeys[rowIndex][1].ToString();
jointids.Add(jointid);
}
if (jointids.Any())
{
BLL.FastReportService.ResetData();
var result = Funs.DB.View_HJGL_WeldJoint.Where(x => jointids.Contains(x.WeldJointId)).Select(x => new
{
pipelineCode = x.PipelineCode,
Mat = x.MaterialCode,
WeldJointId = x.WeldJointId,
Spec = x.Specification,
SortIndex = x.WeldJointCode.Replace(x.PipelineCode + "/", ""),
}).ToList();
var tb = LINQToDataTable(result);
if (tb != null && tb.Rows.Count > 0)
{
tb.TableName = "Table1";
}
BLL.FastReportService.AddFastreportTable(tb);
string initTemplatePath = "";
string rootPath = Server.MapPath("~/");
initTemplatePath = "File\\Fastreport\\焊口打印.frx";
if (File.Exists(rootPath + initTemplatePath))
{
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("~/Controls/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath)));
}
}
else
{
ShowNotify("请选择焊口", MessageBoxIcon.Question);
}
}
}
}