56 lines
1.7 KiB
C#
56 lines
1.7 KiB
C#
using EAS.Services;
|
|
using FastReport;
|
|
using SOH.BLL;
|
|
using SOH.Entities;
|
|
using SOH.Kernel;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Windows.Forms;
|
|
|
|
namespace SOH.JianYan
|
|
{
|
|
[ModuleAttribute(ModuleID = "9D18F408-7D52-450B-865A-9168E45B876E", ModuleName = "检验项目查询")]
|
|
public partial class frmTJXMCX : SOH.Window.baseChildForm
|
|
{
|
|
public frmTJXMCX()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void frmTJXMCX_Load(object sender, EventArgs e)
|
|
{
|
|
var vser = ServiceContainer.GetService<SOH.BLL.IJianYan>();
|
|
List<jy_yiqi> yqs = vser.getYQ();
|
|
cbb_yiqi.DataSource = yqs.Select(t => new yiqi { yq = t.yq, yqmc = t.yq + "(" + t.yqmc + ")" }).ToList();
|
|
}
|
|
class yiqi
|
|
{
|
|
public string yq { get; set; }
|
|
public string yqmc { get; set; }
|
|
}
|
|
|
|
private void btn_cx_Click(object sender, EventArgs e)
|
|
{
|
|
var vser = ServiceContainer.GetService<IJianYan>();
|
|
string jg = vser.getyiqijyxm(dtp_rq.Value.Date, cbb_yiqi.SelectedValue.ToString());
|
|
DataTable dt = Newtonsoft.Json.JsonConvert.DeserializeObject<DataTable>(jg);
|
|
if(dt.Rows.Count>0)
|
|
{
|
|
Report r = new Report();
|
|
r.Load(System.Windows.Forms.Application.StartupPath + "\\report\\hycx.frx");
|
|
r.RegisterData(dt, "jycx");
|
|
//r.RegisterData(dtxm, "tj_xmmx");
|
|
r.Preview = printpreview;
|
|
r.Refresh();
|
|
//r.Print();
|
|
r.Show();
|
|
}
|
|
}
|
|
}
|
|
}
|