/// <summary> /// 报告预览 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnReportView_Click(object sender, EventArgs e) { if (gdOrders.SelectedRowIndexArray.Length != 1) { MessageBoxShow("请选择一项进行预览!"); return; } //判断是否总检完成 if (CheckIsFinishCheck(gdOrders.DataKeys[gdOrders.SelectedRowIndexArray[0]][1])) { MessageBoxShow("选中订单没有[完成总检],不能预览"); return; } PageContext.RegisterStartupScript(WinReportView.GetShowReference("../report/RepShowView.aspx?reportType=1&order_num=" + gdOrders.DataKeys[gdOrders.SelectedRowIndexArray[0]][0])); }
/// <summary> /// 预览报告单事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnPreview_Click(object sender, EventArgs e) { if (gdOrders.SelectedRowIndexArray.Length != 1) { MessageBoxShow("请选择一项进行预览!"); return; } string reportstatus = dropReportStatus.SelectedValue; string str = string.Empty; string ordernum = gdOrders.DataKeys[gdOrders.SelectedRowIndexArray[0]][0].ToString(); if (reportstatus == "1" || reportstatus == "2")//异常报告预览 { string rt = reportstatus == "1" ? "迟发" : "退单"; WinReportView.Title = rt + "报告预览"; //判断是否有异常报告记录 Hashtable ht = new Hashtable(); ht.Add("ordernum", ordernum); ht.Add("reportstatus", reportstatus); if (ordersService.GetOrderExceptionReport(ht) == 0) { MessageBoxShow(string.Format("选中订单未查询到标本{0}记录,不能预览{0}报告", rt)); return; } str = "AnaFocusPrintDetail.aspx?reportType=" + reportstatus + "&order_num=" + ordernum; } else//正常报告预览 { //判断是否总检完成 if (CheckIsFinishCheck(gdOrders.DataKeys[gdOrders.SelectedRowIndexArray[0]][1])) { MessageBoxShow("选中订单没有[完成总检],不能预览"); return; } //判断是否财务审核 if (IsNeedFinanceAudit && gdOrders.DataKeys[gdOrders.SelectedRowIndexArray[0]][5].ToString() != "1") { MessageBoxShow("选中订单没有[财务审核],不能预览"); return; } str = "../report/RepShowView.aspx?reportType=1&order_num=" + ordernum; } PageContext.RegisterStartupScript(WinReportView.GetShowReference(str)); }