Files
ZHJA_HJGL/HJGL_ZH/Backup/HJGL/TrustManage/TrustManageEdit.aspx.cs
T
2026-02-10 15:55:39 +08:00

717 lines
30 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using BLL;
using Newtonsoft.Json.Linq;
namespace FineUIPro.Web.HJGL.TrustManage
{
public partial class TrustManageEdit : PageBase
{
#region 定义项
/// <summary>
/// 无损委托主键
/// </summary>
public string CH_TrustID
{
get
{
return (string)ViewState["CH_TrustID"];
}
set
{
ViewState["CH_TrustID"] = value;
}
}
#endregion
#region 加载页面
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.drpIsProjectClosed.DataTextField = "Text";
this.drpIsProjectClosed.DataValueField = "Value";
this.drpIsProjectClosed.DataSource = BLL.DropListService.IsTrueOrFalseDrpList();
this.drpIsProjectClosed.DataBind();
Funs.FineUIPleaseSelect(this.drpIsProjectClosed);
this.drpIsProjectClosed.SelectedValue = BLL.Const._False;
this.drpProjectId.DataTextField = "ProjectCode";
this.drpProjectId.DataValueField = "ProjectId";
this.drpProjectId.DataSource = BLL.Base_ProjectService.GetProjectListByUserIdAndState(this.CurrUser.UserId, this.drpIsProjectClosed.SelectedValue, "1");
this.drpProjectId.DataBind();
Funs.FineUIPleaseSelect(this.drpProjectId);
this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId;
//var projects = BLL.Base_ProjectService.GetProjectListByUserIdAndState(this.CurrUser.UserId, this.drpIsProjectClosed.SelectedValue, "1");
//RadioButtonList1.DataTextField = "ProjectCode";
//RadioButtonList1.DataValueField = "ProjectId";
//RadioButtonList1.DataSource = projects;
//RadioButtonList1.DataBind();
this.drpNdtType.DataTextField = "NDT_Code";
this.drpNdtType.DataValueField = "NDT_ID";
this.drpNdtType.DataSource = BLL.HJGL_TestingService.GetNDTTypeNameList();
this.drpNdtType.DataBind();
Funs.FineUIPleaseSelect(this.drpNdtType);
this.drpIsPrint.DataTextField = "Text";
this.drpIsPrint.DataValueField = "Value";
this.drpIsPrint.DataSource = BLL.DropListService.IsTrueOrFalseDrpList();
this.drpIsPrint.DataBind();
Funs.FineUIPleaseSelect(this.drpIsPrint);
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
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.HJGL_CH_Trust> trustLists = new List<Model.HJGL_CH_Trust>();
List<Model.Base_Project> projects = BLL.Base_ProjectService.GetProjectListByUserIdAndState(this.CurrUser.UserId, this.drpIsProjectClosed.SelectedValue, "1");
if (this.drpProjectId.SelectedValue != null && this.drpProjectId.SelectedValue != "null")
{
projects = projects.Where(x => x.ProjectId == this.drpProjectId.SelectedValue).ToList();
}
//string selectProjectIds = String.Join("|", DropDownBox1.Values); //选择显示的项目
//List<Model.Base_Project> projects = BLL.Base_ProjectService.GetProjectListByUserIdAndState(this.CurrUser.UserId, this.drpIsProjectClosed.SelectedValue, "1");
//if (selectProjectIds.Length > 6) //勾选了显示项目
//{
// projects = projects.Where(x => selectProjectIds.Contains(x.ProjectId)).ToList();
//}
foreach (var item in projects)
{
TreeNode rootProjectNode = new TreeNode();//定义根节点
rootProjectNode.Text = item.ProjectCode;
rootProjectNode.NodeID = item.ProjectId;
rootProjectNode.Expanded = true;
rootProjectNode.ToolTip = "项目名称";
rootNode.Nodes.Add(rootProjectNode);
trustLists = (from x in Funs.DB.HJGL_CH_Trust
where x.ProjectId == item.ProjectId //&& x.CH_TrustType == "1"
select x).ToList();
// 筛选关闭的批
if (this.drpIsPrint.SelectedValue != "null")
{
if (Convert.ToBoolean(drpIsPrint.SelectedValue))
{
trustLists = (from x in trustLists where x.CH_PrintDate != null select x).ToList();
}
else
{
trustLists = (from x in trustLists where x.CH_PrintDate == null select x).ToList();
}
}
// 筛选探伤类型
if (this.drpNdtType.SelectedValue != "null")
{
trustLists = (from x in trustLists where x.CH_NDTMethod == drpNdtType.SelectedValue select x).ToList();
}
this.BindNodes(rootProjectNode, trustLists);
}
}
#endregion
#region 绑定树节点
/// <summary>
/// 绑定树节点
/// </summary>
/// <param name="node"></param>
private void BindNodes(TreeNode node, List<Model.HJGL_CH_Trust> trustLists)
{
if (node.ToolTip == "项目名称")
{
var trustMonth = (from x in trustLists select string.Format("{0:yyyy-MM}", x.CH_TrustDate)).Distinct();
foreach (var item in trustMonth)
{
TreeNode newNode = new TreeNode();
newNode.Text = item;
newNode.NodeID = item + "|" + node.NodeID;
newNode.ToolTip = "月份";
node.Nodes.Add(newNode);
this.BindNodes(newNode, trustLists);
}
}
else if (node.ToolTip == "月份")
{
var dReports = from x in trustLists
where string.Format("{0:yyyy-MM}", x.CH_TrustDate) == node.Text
orderby x.CH_TrustCode descending
select x;
foreach (var item in dReports)
{
TreeNode newNode = new TreeNode();
if (!string.IsNullOrEmpty(item.CH_TrustCode))
{
newNode.Text = string.Format("{0:yyyy-MM-dd}", item.CH_TrustDate) + " " + item.CH_TrustCode;
}
else
{
newNode.Text = "未知";
}
newNode.NodeID = item.CH_TrustID;
newNode.EnableClickEvent = true;
node.Nodes.Add(newNode);
}
}
}
#endregion
#region 点击TreeView
/// <summary>
/// 点击TreeView
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
{
this.SetTextTemp();
this.CH_TrustID = tvControlItem.SelectedNodeID;
this.PageInfoLoad(); ///页面输入提交信息
e.Node.ParentNode.Expanded = true;
}
#endregion
#region 数据绑定
/// <summary>
/// 数据绑定
/// </summary>
private void BindGrid()
{
string strSql = @"SELECT TrustItem.CH_TrustItemID
,TrustItem.CH_TrustID
,TrustItem.JOT_ID
,TrustItem.CHT_CheckItemId
,TrustItem.CH_CheckMethod
,TrustItem.CH_UnitNo
,TrustItem.CH_CheckResult
,TrustItem.CH_RepairLocation
,(CASE WHEN (TrustItem.CH_Remark IS NULL OR TrustItem.CH_Remark='') AND jotR.JOT_JointNo IS NOT NULL
THEN isoR.ISO_IsoNo+','+jotR.JOT_JointNo+' 返修' ELSE TrustItem.CH_Remark END) AS CH_Remark
,IsoInfo.ISO_IsoNo
,(CASE WHEN batchDetail.PointType=2 THEN JointInfo.JOT_JointNo+'K' ELSE JointInfo.JOT_JointNo END) AS JOT_JointNo
,CAST(JointInfo.JOT_Dia AS Decimal(18,2)) AS JOT_Dia
,JointInfo.JOT_Sch
,JointInfo.WLO_Code
,WeldMethod.WME_Name
,batch.BatchCode
,JointInfo.Sort1,JointInfo.Sort2,JointInfo.Sort3,JointInfo.Sort4,JointInfo.Sort5
FROM HJGL_CH_TrustItem AS TrustItem
LEFT JOIN HJGL_CH_Trust AS Trust ON Trust.CH_TrustID = TrustItem.CH_TrustID
LEFT JOIN dbo.HJGL_PW_JointInfo AS JointInfo ON JointInfo.JOT_ID = TrustItem.JOT_ID
LEFT JOIN dbo.HJGL_PW_IsoInfo AS IsoInfo ON JointInfo.ISO_ID = IsoInfo.ISO_ID
LEFT JOIN dbo.HJGL_BS_WeldMethod AS WeldMethod ON WeldMethod.WME_ID=JointInfo.WME_ID
LEFT JOIN dbo.HJGL_BO_Batch AS batch ON batch.BatchId=Trust.BatchId
LEFT JOIN dbo.HJGL_BO_BatchDetail AS batchDetail ON batchDetail.BatchDetailId = TrustItem.BatchDetailId
LEFT JOIN dbo.HJGL_CH_RepairItemRecord AS repair ON batchDetail.ToRepairId=repair.RepairItemRecordId
LEFT JOIN dbo.HJGL_PW_JointInfo AS jotR ON jotR.JOT_ID = repair.JOT_ID
LEFT JOIN dbo.HJGL_PW_IsoInfo AS isoR ON isoR.ISO_ID = repair.ISO_ID
WHERE TrustItem.CH_TrustID=@CH_TrustID";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@CH_TrustID", this.CH_TrustID));
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
// 2.获取当前分页数据
//var table = this.GetPagedDataTable(Grid1, tb1);
Grid1.RecordCount = tb.Rows.Count;
tb = GetFilteredTable(Grid1.FilteredData, tb);
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
}
#region 加载页面输入提交信息
/// <summary>
/// 加载页面输入提交信息
/// </summary>
private void PageInfoLoad()
{
var trust = BLL.HJGL_TrustManageEditService.GetCH_TrustByID(this.CH_TrustID);
if (trust != null)
{
var ndtInfo = BLL.HJGL_TestingService.GetTestingByTestingId(trust.CH_NDTMethod);
this.txtCH_TrustCode.Text = trust.CH_TrustCode;
if (!string.IsNullOrEmpty(trust.CH_TrustUnit))
{
var unit = BLL.Base_UnitService.GetUnit(trust.CH_TrustUnit);
if (unit != null)
{
this.drpCH_TrustUnit.Text = unit.UnitName;
}
}
if (!string.IsNullOrEmpty(trust.InstallationId))
{
var install = BLL.Project_InstallationService.GetInstallationByInstallationId(trust.InstallationId);
if (install != null)
{
this.drpInstallationId.Text = install.InstallationName;
}
}
this.txtCH_TrustType.Text = trust.CH_TrustType == "1" ? "委托" : "扩透";
this.txtCH_TrustDate.Text = string.Format("{0:yyyy-MM-dd}", trust.CH_TrustDate);
if (trust.CH_PrintDate != null)
{
ckbIsPrint.Checked = true;
this.lbPrintDate.Text = trust.CH_PrintDate.Value.ToString();
this.lbPrinter.Text = trust.CH_Printer.Trim();
}
if (!string.IsNullOrEmpty(trust.CH_TrustMan))
{
var hotHardMan = BLL.Sys_UserService.GetUsersByUserId(trust.CH_TrustMan);
if (hotHardMan != null)
{
this.drpCH_TrustMan.Text = hotHardMan.UserName;
}
}
if (!string.IsNullOrEmpty(trust.CH_CheckUnit))
{
var checkUnit = BLL.Base_UnitService.GetUnit(trust.CH_CheckUnit);
if (checkUnit != null)
{
this.drpCH_CheckUnit.Text = checkUnit.UnitName;
}
}
if (!string.IsNullOrEmpty(trust.BatchId))
{
var batch = BLL.HJGL_BO_BatchService.GetBatchById(trust.BatchId);
if (batch != null)
{
if (!string.IsNullOrEmpty(batch.NDTR_ID))
{
var ndt = BLL.HJGL_DetectionService.GetNDTRateByNDTRID(batch.NDTR_ID);
if (ndt != null)
{
this.drpCH_NDTRate.Text = ndt.NDTR_Name;
}
}
}
}
if (!string.IsNullOrEmpty(trust.CH_NDTMethod))
{
var test = BLL.HJGL_TestingService.GetTestingByTestingId(trust.CH_NDTMethod);
if (test != null)
{
this.drpCH_NDTMethod.Text = test.NDT_Name;
}
}
if (!string.IsNullOrEmpty(trust.CH_AcceptGrade))
{
//var acceptGrade = BLL.HJGL_TrustManageEditService.GetAcceptGradeList().FirstOrDefault(x => x.Value == trust.CH_AcceptGrade);
//if (acceptGrade != null)
//{
// this.drpCH_AcceptGrade.Text = acceptGrade.Text;
//}
var jot = from x in Funs.DB.HJGL_PW_JointInfo
join y in Funs.DB.HJGL_CH_TrustItem on x.JOT_ID equals y.JOT_ID
where y.CH_TrustID == this.CH_TrustID
select x;
if (jot.Count() > 0)
{
var joty = BLL.HJGL_WeldService.GetJointTypeByID(jot.First().JOTY_ID);
if ((ndtInfo.NDT_Code == "MT" || ndtInfo.NDT_Code == "PT") && joty.JOTY_Group == "1")
{
this.drpCH_AcceptGrade.Text = "Ⅰ";
}
else
{
this.drpCH_AcceptGrade.Text = (from x in Funs.DB.HJGL_PW_JointInfo
join y in Funs.DB.HJGL_CH_TrustItem on x.JOT_ID equals y.JOT_ID
where y.CH_TrustID == this.CH_TrustID
select x.JOT_QualifiedLevel).FirstOrDefault();
}
}
}
this.txtCH_NDTCriteria.Text = trust.CH_NDTCriteria;
if (!string.IsNullOrEmpty(trust.CH_SlopeType))
{
var slopeType = BLL.HJGL_GrooveService.GetSlopeTypeByJSTID(trust.CH_SlopeType);
if (slopeType != null)
{
this.drpCH_SlopeType.Text = slopeType.JST_Name;
}
}
if (!string.IsNullOrEmpty(trust.CH_WeldMethod))
{
var weldMethod = BLL.HJGL_WeldingMethodService.GetWeldMethodByWMEID(trust.CH_WeldMethod);
if (weldMethod != null)
{
this.drpCH_WeldMethod.Text = weldMethod.WME_Name;
}
}
this.txtCH_Remark.Text = trust.CH_Remark;
BindGrid();
}
}
#endregion
#endregion
#region 清空文本框
/// <summary>
/// 清空文本框
/// </summary>
private void SetTextTemp()
{
this.txtCH_TrustCode.Text = string.Empty;
this.drpCH_TrustUnit.Text = string.Empty;
this.drpInstallationId.Text = string.Empty;
this.txtCH_TrustType.Text = string.Empty;
this.txtCH_TrustDate.Text = string.Empty;
this.drpCH_TrustMan.Text = string.Empty;
this.lbPrintDate.Text = string.Empty;
this.lbPrinter.Text = string.Empty;
this.drpCH_CheckUnit.Text = string.Empty;
this.drpCH_NDTRate.Text = string.Empty;
this.drpCH_NDTMethod.Text = string.Empty;
this.drpCH_AcceptGrade.Text = string.Empty;
this.txtCH_NDTCriteria.Text = string.Empty;
this.drpCH_SlopeType.Text = string.Empty;
this.drpCH_WeldMethod.Text = string.Empty;
this.txtCH_Remark.Text = string.Empty;
}
#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 无损委托 维护事件
#region 编辑无损委托
/// <summary>
/// 编辑无损委托
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnEdit_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_TrustManageEditMenuId, Const.BtnSave))
{
var trustManage = BLL.HJGL_TrustManageEditService.GetCH_TrustByID(this.CH_TrustID);
if (trustManage != null)
{
if (trustManage.CH_AuditDate.HasValue)
{
Alert.ShowInTop("此委托单已审核!", MessageBoxIcon.Warning);
return;
}
string window = String.Format("TrustManageItemEdit.aspx?TrustID={0}", this.CH_TrustID, "编辑 - ");
PageContext.RegisterStartupScript(Window1.GetSaveStateReference(this.CH_TrustID)
+ Window1.GetShowReference(window));
}
else
{
Alert.ShowInTop("请选择要修改的无损委托记录!", MessageBoxIcon.Warning);
}
}
else
{
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
}
}
#endregion
#region 删除无损委托
/// <summary>
/// 删除无损委托
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnDelete_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_TrustManageEditMenuId, Const.BtnDelete))
{
var trust = BLL.HJGL_TrustManageEditService.GetCH_TrustByID(this.CH_TrustID);
if (trust != null)
{
if (trust.CH_AuditDate.HasValue)
{
Alert.ShowInTop("此委托单已审核!", MessageBoxIcon.Warning);
return;
}
BLL.HJGL_TrustManageEditService.DeleteCH_TrustItemByCH_TrustID(this.CH_TrustID);
BLL.HJGL_TrustManageEditService.DeleteCH_TrustByCH_TrustID(this.CH_TrustID);
BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "删除无损委托");
ShowNotify("删除成功!", MessageBoxIcon.Success);
this.InitTreeMenu();
this.PageInfoLoad();
}
else
{
Alert.ShowInTop("请选择要删除的无损委托记录!", MessageBoxIcon.Warning);
}
}
else
{
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
return;
}
}
#endregion
#endregion
#region 关闭弹出窗口及刷新页面
/// <summary>
/// 关闭弹出窗口
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Window1_Close(object sender, WindowCloseEventArgs e)
{
this.InitTreeMenu();//加载树
this.PageInfoLoad();
}
#endregion
#region 查询
/// <summary>
/// 查询
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
//protected void Tree_TextChanged(object sender, EventArgs e)
//{
// this.InitTreeMenu();
// this.PageInfoLoad();
//}
protected void drpIsProjectClosed_SelectedIndexChanged(object sender, EventArgs e)
{
this.drpProjectId.Items.Clear();
this.drpProjectId.DataTextField = "ProjectCode";
this.drpProjectId.DataValueField = "ProjectId";
this.drpProjectId.DataSource = BLL.Base_ProjectService.GetProjectListByUserIdAndState(this.CurrUser.UserId, this.drpIsProjectClosed.SelectedValue, "1");
this.drpProjectId.DataBind();
Funs.FineUIPleaseSelect(this.drpProjectId);
this.InitTreeMenu();
}
protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e)
{
this.InitTreeMenu();
}
//protected void DropDownBox1_TextChanged(object sender, EventArgs e)
//{
// this.InitTreeMenu();
//}
protected void drpNdtType_SelectedIndexChanged(object sender, EventArgs e)
{
this.InitTreeMenu();
}
protected void drpIsPrint_SelectedIndexChanged(object sender, EventArgs e)
{
this.InitTreeMenu();
}
#endregion
/// <summary>
/// 打印信息修改
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ckbIsPrint_OnCheckedChanged(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(this.CH_TrustID))
{
Model.HJGL_CH_Trust trust = BLL.HJGL_TrustManageEditService.GetCH_TrustByID(this.CH_TrustID);
if (ckbIsPrint.Checked)
{
trust.CH_PrintDate = DateTime.Now.Date;
trust.CH_Printer = this.CurrUser.UserName;
}
else
{
trust.CH_PrintDate = null;
trust.CH_Printer = null;
}
BLL.HJGL_TrustManageEditService.PrintCH_Trust(trust);
this.SetTextTemp();
this.PageInfoLoad();
}
else
{
Alert.ShowInTop("请选择委托单", MessageBoxIcon.Information);
return;
}
}
#region 报表打印
/// <summary>
/// 报表打印
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnPrint_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
{
Model.HJGL_CH_Trust trust = BLL.HJGL_TrustManageEditService.GetCH_TrustByID(this.CH_TrustID);
trust.CH_PrintDate = DateTime.Now.Date;
trust.CH_Printer = this.CurrUser.UserName;
BLL.HJGL_TrustManageEditService.PrintCH_Trust(trust);
this.SetTextTemp();
this.PageInfoLoad();
string projectId = string.Empty;
string project = tvControlItem.SelectedNode.ParentNode.NodeID;
if (!string.IsNullOrEmpty(project))
{
string[] ps = project.Split('|');
if (ps.Count() > 1)
{
projectId = ps[1];
}
}
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../../Common/ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId=0", BLL.Const.HJGL_TrustReportId, this.tvControlItem.SelectedNodeID, null, "打印 - ")));
}
else
{
Alert.ShowInTop("请选择委托单", MessageBoxIcon.Information);
return;
}
}
/// <summary>
/// 报表打印
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnPrint2_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
{
Model.HJGL_CH_Trust trust = BLL.HJGL_TrustManageEditService.GetCH_TrustByID(this.CH_TrustID);
trust.CH_PrintDate = DateTime.Now.Date;
trust.CH_Printer = this.CurrUser.UserName;
BLL.HJGL_TrustManageEditService.PrintCH_Trust(trust);
this.SetTextTemp();
this.PageInfoLoad();
string projectId = string.Empty;
string project = tvControlItem.SelectedNode.ParentNode.NodeID;
if (!string.IsNullOrEmpty(project))
{
string[] ps = project.Split('|');
if (ps.Count() > 1)
{
projectId = ps[1];
}
}
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../../Common/ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId=0", BLL.Const.HJGL_SubUnitTrustReportId, this.tvControlItem.SelectedNodeID, null, "打印 - ")));
}
else
{
Alert.ShowInTop("请选择委托单", MessageBoxIcon.Information);
return;
}
}
protected void btnPrint3_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
{
Model.HJGL_CH_Trust trust = BLL.HJGL_TrustManageEditService.GetCH_TrustByID(this.CH_TrustID);
trust.CH_PrintDate = DateTime.Now.Date;
trust.CH_Printer = this.CurrUser.UserName;
BLL.HJGL_TrustManageEditService.PrintCH_Trust(trust);
this.SetTextTemp();
this.PageInfoLoad();
string projectId = string.Empty;
string project = tvControlItem.SelectedNode.ParentNode.NodeID;
if (!string.IsNullOrEmpty(project))
{
string[] ps = project.Split('|');
if (ps.Count() > 1)
{
projectId = ps[1];
}
}
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../../Common/ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId=0", BLL.Const.HJGL_TrustReport3Id, this.tvControlItem.SelectedNodeID, null, "打印 - ")));
}
else
{
Alert.ShowInTop("请选择委托单", MessageBoxIcon.Information);
return;
}
}
#endregion
}
}