626 lines
24 KiB
C#
626 lines
24 KiB
C#
|
|
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;
|
|||
|
|
using SOH.Kernel;
|
|||
|
|
using EAS.Services;
|
|||
|
|
using SOH.BLL;
|
|||
|
|
using SOH.Entities;
|
|||
|
|
using SOH.Data;
|
|||
|
|
using SOH.Common;
|
|||
|
|
using System.Text.RegularExpressions;
|
|||
|
|
|
|||
|
|
namespace SOH.KeFu
|
|||
|
|
{
|
|||
|
|
public partial class frmTiJanFenXiLuRu : Form
|
|||
|
|
{
|
|||
|
|
public frmTiJanFenXiLuRu()
|
|||
|
|
{
|
|||
|
|
InitializeComponent();
|
|||
|
|
}
|
|||
|
|
DataRowView drvs;
|
|||
|
|
frmTiJianJieGuoFenXi ftj;
|
|||
|
|
DataTable dtTjjd;
|
|||
|
|
List<t_jglr> jgs;
|
|||
|
|
string jcjg = "";
|
|||
|
|
string xmmc = "";
|
|||
|
|
string fxys = "";
|
|||
|
|
|
|||
|
|
private int y;
|
|||
|
|
|
|||
|
|
string tmztzs = "";
|
|||
|
|
|
|||
|
|
public frmTiJanFenXiLuRu(DataRowView drv, frmTiJianJieGuoFenXi h)
|
|||
|
|
{
|
|||
|
|
drvs = drv;
|
|||
|
|
ftj = h;
|
|||
|
|
InitializeComponent();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
protected override Point ScrollToControl(Control activeControl)
|
|||
|
|
{
|
|||
|
|
// return base.ScrollToControl(activeControl);
|
|||
|
|
return this.AutoScrollPosition;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
private void pictureBox1_Paint(object sender, PaintEventArgs e)
|
|||
|
|
{
|
|||
|
|
Graphics g = e.Graphics;
|
|||
|
|
Rectangle rect = new Rectangle(0, 0, 750, 600);
|
|||
|
|
int h = 0;
|
|||
|
|
int x = 0;
|
|||
|
|
int i = 1;
|
|||
|
|
jgs.ForEach(t =>
|
|||
|
|
{
|
|||
|
|
Font namef = new Font("宋体", 10, FontStyle.Bold);
|
|||
|
|
if (t.flag == 2)
|
|||
|
|
{
|
|||
|
|
xmmc = t.xmmc;
|
|||
|
|
jcjg = "";
|
|||
|
|
}
|
|||
|
|
else if (t.flag == 1)
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
if (t.jcbm == 104 || t.jcbm == 1 || t.jcbm == 2 || t.jcbm == 310 || t.jcbm == 3903 || t.jcbm == 3904 || t.jcbm == 3905 || t.jcbm == 3906 || t.jcbm == 3909 || t.jcbm == 3910)
|
|||
|
|
{
|
|||
|
|
jcjg += t.xmmc + ":" + t.zcjg.Trim() + ";";
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
if (t.cksx != "" && t.ckxx != "")
|
|||
|
|
{
|
|||
|
|
if (Convert.ToDecimal(t.cksx) > 0 && Convert.ToDecimal(t.ckxx) > 0)
|
|||
|
|
{
|
|||
|
|
try
|
|||
|
|
{
|
|||
|
|
if (Convert.ToDecimal(t.zcjg) > Convert.ToDecimal(t.cksx) || Convert.ToDecimal(t.zcjg) < Convert.ToDecimal(t.ckxx))
|
|||
|
|
{
|
|||
|
|
jcjg += t.xmmc + ":" + t.zcjg.Trim() + "(参考范围:" + t.cksx + "-" + t.ckxx + " " + t.dw + ")" + ";";
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
catch
|
|||
|
|
{
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
if (t.zcjg.Trim() != "(-)" && t.zcjg.Trim() != "未见异常" && t.zcjg.Trim() != "未见明显异常" && t.zcjg.Trim() != "正常" && t.zcjg.Trim() != t.dw.Trim())
|
|||
|
|
{
|
|||
|
|
jcjg += t.xmmc + ":" + t.zcjg + ";";
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
if (t.zcjg.Trim() != "(-)" && t.zcjg.Trim() != "未见异常" && t.zcjg.Trim() != "未见明显异常" && t.zcjg.Trim() != "正常" && t.zcjg.Trim() != t.dw.Trim())
|
|||
|
|
{
|
|||
|
|
jcjg += t.xmmc + ":" + t.zcjg + ";";
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
else if (t.flag == 3)
|
|||
|
|
{
|
|||
|
|
string tempZdjg = t.zcjg.Replace((char)13, (char)0);
|
|||
|
|
string tempZdjg1 = tempZdjg.Replace((char)10, (char)0);
|
|||
|
|
if (tempZdjg1.Trim() != "未见异常" && tempZdjg1.Trim() != "未见明显异常" && tempZdjg1.Trim() != "正常心电图" && tempZdjg1.Trim() != "" && tempZdjg1.Trim() != "大致正常心电图")
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
if (jcjg != "")
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
g.DrawString("【" + xmmc + "】", namef, Brushes.Blue, new Point(5, x));
|
|||
|
|
x += 20;
|
|||
|
|
|
|||
|
|
string tempStr = jcjg.Replace((char)13, (char)0);
|
|||
|
|
string tempStr1 = tempStr.Replace((char)10, (char)0);
|
|||
|
|
|
|||
|
|
if (tempStr1.Length > 50)
|
|||
|
|
{
|
|||
|
|
int jcjgLenght = tempStr1.Length;
|
|||
|
|
int rows = Convert.ToInt32(Math.Ceiling((double)tempStr1.Length / 50));
|
|||
|
|
int bj = 0;
|
|||
|
|
string jcjgStr = "";
|
|||
|
|
for (int r = 1; r <= rows; r++)
|
|||
|
|
{
|
|||
|
|
if (r == rows)
|
|||
|
|
{
|
|||
|
|
jcjgStr = tempStr1.Substring(bj, tempStr1.Length - bj - 1);
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
if (bj == 0)
|
|||
|
|
{
|
|||
|
|
jcjgStr = tempStr1.Substring(bj, 50);
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
jcjgStr = tempStr1.Substring(bj, 50);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
g.DrawString(jcjgStr, namef, Brushes.Black, new Point(5, x));
|
|||
|
|
x += 20;
|
|||
|
|
bj += 50;
|
|||
|
|
jcjgStr = "";
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
g.DrawString(tempStr1, namef, Brushes.Black, new Point(5, x));
|
|||
|
|
x += 20;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
tempStr = "";
|
|||
|
|
tempStr1 = "";
|
|||
|
|
|
|||
|
|
if (tempZdjg1.Length > 50)
|
|||
|
|
{
|
|||
|
|
int zdjgLenght = tempZdjg1.Length;
|
|||
|
|
int rows = Convert.ToInt32(Math.Ceiling((double)tempZdjg1.Length / 50));
|
|||
|
|
int bj = 0;
|
|||
|
|
string zdjgStr = "";
|
|||
|
|
for (int r = 1; r <= rows; r++)
|
|||
|
|
{
|
|||
|
|
if (r == rows)
|
|||
|
|
{
|
|||
|
|
zdjgStr = tempZdjg1.Substring(bj, tempZdjg1.Length - bj - 1);
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
if (bj == 0)
|
|||
|
|
{
|
|||
|
|
zdjgStr = tempZdjg1.Substring(bj, 50);
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
zdjgStr = tempZdjg1.Substring(bj, 50);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
if (r == 1)
|
|||
|
|
{
|
|||
|
|
g.DrawString("结论:" + zdjgStr, namef, Brushes.Pink, new Point(5, x));
|
|||
|
|
x += 20;
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
g.DrawString(zdjgStr, namef, Brushes.Pink, new Point(5, x));
|
|||
|
|
x += 20;
|
|||
|
|
}
|
|||
|
|
bj += 50;
|
|||
|
|
zdjgStr = "";
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
g.DrawString("结论:" + tempZdjg1, namef, Brushes.Pink, new Point(5, x));
|
|||
|
|
x += 20;
|
|||
|
|
}
|
|||
|
|
tempZdjg = "";
|
|||
|
|
tempZdjg1 = "";
|
|||
|
|
|
|||
|
|
jcjg = "";
|
|||
|
|
xmmc = "";
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
g.DrawString("【" + xmmc + "】", namef, Brushes.Blue, new Point(5, x));
|
|||
|
|
x += 20;
|
|||
|
|
|
|||
|
|
g.DrawString(tempZdjg1, namef, Brushes.Black, new Point(5, x));
|
|||
|
|
x += 20;
|
|||
|
|
|
|||
|
|
g.DrawString("结论:" + tempZdjg1, namef, Brushes.Pink, new Point(5, x));
|
|||
|
|
x += 20;
|
|||
|
|
|
|||
|
|
xmmc = "";
|
|||
|
|
tempZdjg1 = "";
|
|||
|
|
tempZdjg = "";
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
i++;
|
|||
|
|
if (i > jgs.Count)
|
|||
|
|
{
|
|||
|
|
g.DrawString(" ", namef, Brushes.Pink, new Point(5, x+200));
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public void leftList(string bm)
|
|||
|
|
{
|
|||
|
|
var vservice1 = ServiceContainer.GetService<IZongJian>();
|
|||
|
|
String data = vservice1.getAllKss(bm);
|
|||
|
|
DataTable dt = Newtonsoft.Json.JsonConvert.DeserializeObject(data, typeof(DataTable)) as DataTable;
|
|||
|
|
|
|||
|
|
DataTable dtCopy = dt.Copy();
|
|||
|
|
|
|||
|
|
DataView dv = dt.DefaultView;
|
|||
|
|
dv.Sort = "xssx";
|
|||
|
|
dtCopy = dv.ToTable();
|
|||
|
|
|
|||
|
|
List<int> kss = new List<int>();
|
|||
|
|
for (int i = 0; i < dtCopy.Rows.Count; i++)
|
|||
|
|
{
|
|||
|
|
kss.Add(Convert.ToInt32(dtCopy.Rows[i]["ksbm"].ToString()));
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
var vservice = ServiceContainer.GetService<It_tempdjxm>();
|
|||
|
|
String dataXb = vservice.getXb(Convert.ToInt32(bm));
|
|||
|
|
DataTable dtXb = Newtonsoft.Json.JsonConvert.DeserializeObject(dataXb, typeof(DataTable)) as DataTable;
|
|||
|
|
int xb = Convert.ToInt32(dtXb.Rows[0]["xb"]);
|
|||
|
|
|
|||
|
|
jgs = vservice1.getjcjgs(Convert.ToInt32(bm), kss,xb);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private void frmTiJanFenXiLuRu_Load(object sender, EventArgs e)
|
|||
|
|
{
|
|||
|
|
y = 0;
|
|||
|
|
leftList(drvs.Row["tm"].ToString());
|
|||
|
|
|
|||
|
|
|
|||
|
|
this.FormBorderStyle = FormBorderStyle.SizableToolWindow;
|
|||
|
|
this.WindowState = FormWindowState.Maximized;
|
|||
|
|
if (drvs != null)
|
|||
|
|
{
|
|||
|
|
this.txtTm.Text = drvs.Row["tm"].ToString();
|
|||
|
|
this.labXm.Text = drvs.Row["xm"].ToString();
|
|||
|
|
this.labXb.Text = drvs.Row["xb"].ToString() == "0" ? "男" : "女";
|
|||
|
|
this.labNl.Text = drvs.Row["nl"].ToString();
|
|||
|
|
this.labBj.Text = drvs.Row["bj"].ToString();
|
|||
|
|
this.labHyzk.Text = drvs.Row["hyzk"].ToString() == "0" ? "未婚" : (drvs.Row["hyzk"].ToString() == "1" ? "已婚" : "未知 ");
|
|||
|
|
|
|||
|
|
tmztzs = drvs.Row["tmztz"].ToString();
|
|||
|
|
|
|||
|
|
if (tmztzs== "10")
|
|||
|
|
{
|
|||
|
|
//创建汇总分析表datatable
|
|||
|
|
string hzfxString = ServiceContainer.GetService<IZongJian>().GetHzfxByTm(int.Parse(drvs.Row["tm"].ToString().Trim()));
|
|||
|
|
|
|||
|
|
DataTable hzfxDt = Newtonsoft.Json.JsonConvert.DeserializeObject(hzfxString, typeof(DataTable)) as DataTable;
|
|||
|
|
|
|||
|
|
var vserver = ServiceContainer.GetService<IZongJian>();
|
|||
|
|
|
|||
|
|
if (hzfxDt.Rows.Count != 0)
|
|||
|
|
{
|
|||
|
|
string lsdt = vserver.GetZjysXm(hzfxDt.Rows[0][4].ToString());
|
|||
|
|
fxys = hzfxDt.Rows[0][4].ToString();
|
|||
|
|
DataTable dtZjys = Newtonsoft.Json.JsonConvert.DeserializeObject(lsdt, typeof(DataTable)) as DataTable;
|
|||
|
|
|
|||
|
|
this.labZjys.Text = dtZjys.Rows[0][0].ToString();
|
|||
|
|
this.labZjys.Visible = true;
|
|||
|
|
this.labFxys.Visible = true;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
var vservice = ServiceContainer.GetService<IZongJian>();
|
|||
|
|
String tjjdList = vservice.GetTjjdList(Convert.ToInt32(drvs.Row["tm"]),Convert.ToInt32(LoginUser.yydm));
|
|||
|
|
dtTjjd = Newtonsoft.Json.JsonConvert.DeserializeObject(tjjdList, typeof(DataTable)) as DataTable;
|
|||
|
|
string tjjdlist = vservice.gethzfxbytm1(this.txtTm.Text);
|
|||
|
|
|
|||
|
|
string tjjyStr = "";
|
|||
|
|
string strZyzd = "";
|
|||
|
|
|
|||
|
|
if (tjjdlist == "")
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
if (tjjdList.Length > 2)
|
|||
|
|
{
|
|||
|
|
tjjdlist = "体检所见:" + "\r\n";
|
|||
|
|
int bj = 1;
|
|||
|
|
foreach (DataRow dr in dtTjjd.Rows)
|
|||
|
|
{
|
|||
|
|
tjjdlist += "\r\n" + dr[0] + ":" + dr[1] + "\r\n";
|
|||
|
|
string[] tjzdResult = dr[1].ToString().Split('\r', '\n');
|
|||
|
|
|
|||
|
|
|
|||
|
|
foreach (string str in tjzdResult)
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
if (str.IndexOf(':') != -1)
|
|||
|
|
{
|
|||
|
|
string[] strArray = str.Split(':');
|
|||
|
|
if (strArray[0].Trim() != "")
|
|||
|
|
{
|
|||
|
|
String jyList1 = vservice.GetJianYiByZyzd3(strArray[0].Trim());
|
|||
|
|
DataTable dt1 = Newtonsoft.Json.JsonConvert.DeserializeObject(jyList1, typeof(DataTable)) as DataTable;
|
|||
|
|
if (dt1.Rows.Count != 0)
|
|||
|
|
{
|
|||
|
|
strZyzd += "\r\n" + strArray[0] + "\r\n" + "【建议】" + dt1.Rows[0]["jcjy"].ToString() + "\r\n";
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
String jyList2 = vservice.GetJianYiByZyzd1(strArray[0].Trim());
|
|||
|
|
DataTable dt2 = Newtonsoft.Json.JsonConvert.DeserializeObject(jyList1, typeof(DataTable)) as DataTable;
|
|||
|
|
if (dt2.Rows.Count != 0)
|
|||
|
|
{
|
|||
|
|
strZyzd += "\r\n" + strArray[0] + "\r\n" + "【建议】" + dt2.Rows[0]["jcjy"].ToString() + "\r\n";
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
if (str.Trim() != "")
|
|||
|
|
{
|
|||
|
|
String jyList1 = vservice.GetJianYiByZyzd3(str.Trim());
|
|||
|
|
DataTable dt1 = Newtonsoft.Json.JsonConvert.DeserializeObject(jyList1, typeof(DataTable)) as DataTable;
|
|||
|
|
|
|||
|
|
if (dt1.Rows.Count != 0)
|
|||
|
|
{
|
|||
|
|
strZyzd += "\r\n" + str + "\r\n" + "【建议】" + dt1.Rows[0]["jcjy"].ToString() + "\r\n";
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
String jyList2 = vservice.GetJianYiByZyzd1(str.Trim());
|
|||
|
|
DataTable dt2 = Newtonsoft.Json.JsonConvert.DeserializeObject(jyList1, typeof(DataTable)) as DataTable;
|
|||
|
|
if (dt2.Rows.Count != 0)
|
|||
|
|
{
|
|||
|
|
//tjjyStr += "\r\n" + bj + "、" + dr[0] + ":" + str + "\r\n" + "【建议】" + dt2.Rows[0]["jcjy"].ToString() + "\r\n";
|
|||
|
|
strZyzd += "\r\n" + str + "\r\n" + "【建议】" + dt2.Rows[0]["jcjy"].ToString() + "\r\n";
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
if (strZyzd.Length > 0)
|
|||
|
|
{
|
|||
|
|
tjjyStr += "\r\n" + bj + "、" + dr[0] + "\r\n" + strZyzd;
|
|||
|
|
bj++;
|
|||
|
|
strZyzd = "";
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if (tjjdlist.Length < 1)
|
|||
|
|
{
|
|||
|
|
this.txtHzfx.Text = "*.您好:您本次体检所做项目,经检查目前未见明显异常。";
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
if (tjjyStr.Length > 0)
|
|||
|
|
{
|
|||
|
|
this.txtHzfx.Text = tjjdlist + "\r\n" + "\r\n" + "专家建议与指导:" + "\r\n" + tjjyStr;
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
this.txtHzfx.Text = tjjdlist;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
this.txtHzfx.Text = tjjdlist;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
int[] jbtj = ServiceContainer.GetService<IZongJian>().GetJbtjListByTm(int.Parse(this.txtTm.Text.Trim())).ToArray();
|
|||
|
|
|
|||
|
|
tjbkBindingSource1.DataSource = ServiceContainer.GetService<IZongJian>().GetJbkByJbbm(jbtj);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
tjbkBindingSource.DataSource = ServiceContainer.GetService<IZongJian>().GetAllJiBing();
|
|||
|
|
//tzhxmBindingSource.DataSource = ServiceContainer.GetService<It_zhxm>().GetzhxmByddfzbm(o.ddfzbm);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private void txtHzfx_CausesValidationChanged(object sender, EventArgs e)
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private void button2_Click(object sender, EventArgs e)
|
|||
|
|
{
|
|||
|
|
frmTiJianJianYiChaXun cz = new frmTiJianJianYiChaXun();
|
|||
|
|
cz.ShowDialog();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private void dgvAllJb_DoubleClick(object sender, EventArgs e)
|
|||
|
|
{
|
|||
|
|
if (dgvAllJb.CurrentRow.Index < 0)
|
|||
|
|
{
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
t_jbk k = dgvAllJb.Rows[dgvAllJb.CurrentRow.Index].DataBoundItem as t_jbk;
|
|||
|
|
|
|||
|
|
List<t_jbk> kl = ((System.Windows.Forms.BindingSource)(dgvTjrJb.DataSource)).List as List<t_jbk>;
|
|||
|
|
|
|||
|
|
//List<t_jbk> kl = new List<t_jbk>();
|
|||
|
|
|
|||
|
|
bool f = true;
|
|||
|
|
|
|||
|
|
foreach (t_jbk b in kl)
|
|||
|
|
{
|
|||
|
|
if (b.jbbm != k.jbbm)
|
|||
|
|
{
|
|||
|
|
f = true;
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{ f = false; return; }
|
|||
|
|
}
|
|||
|
|
if (f == true) { tjbkBindingSource1.Add(k); };
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private void butCa_Click(object sender, EventArgs e)
|
|||
|
|
{
|
|||
|
|
string zjm = this.txtZjm.Text;
|
|||
|
|
tjbkBindingSource.DataSource = ServiceContainer.GetService<IZongJian>().SelectJbk(zjm);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private void button4_Click(object sender, EventArgs e)
|
|||
|
|
{
|
|||
|
|
if (tmztzs == "5")
|
|||
|
|
{
|
|||
|
|
MessageBox.Show("请先进行汇总分析,再做审核操作!");
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if (MessageBox.Show("是否确认完成此份汇总!确认数据将进入打印流程!", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Asterisk) == DialogResult.No)
|
|||
|
|
{
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
var service = ServiceContainer.GetService<IZongJian>();
|
|||
|
|
t_hzfx h = new t_hzfx();
|
|||
|
|
|
|||
|
|
h.tm = int.Parse(this.txtTm.Text.Trim());
|
|||
|
|
h.fx = this.txtHzfx.Text;
|
|||
|
|
h.zt = 2;
|
|||
|
|
h.wcsj = Convert.ToDateTime(DateTime.Now.ToString("d"));
|
|||
|
|
h.czy = fxys;
|
|||
|
|
h.shr = LoginUser.username;
|
|||
|
|
h.upflag = 1;
|
|||
|
|
h.fddm = Convert.ToInt16(LoginUser.yydm);
|
|||
|
|
|
|||
|
|
List<t_jbtj1> jbtj1list = new List<t_jbtj1>();
|
|||
|
|
List<t_jbk> jbks = ((System.Windows.Forms.BindingSource)(dgvTjrJb.DataSource)).List as List<t_jbk>;
|
|||
|
|
foreach (t_jbk jbk in jbks)
|
|||
|
|
{
|
|||
|
|
t_jbtj1 jbtj = new t_jbtj1();
|
|||
|
|
jbtj.jbbm = jbk.jbbm;
|
|||
|
|
jbtj.tm = int.Parse(this.txtTm.Text.Trim());
|
|||
|
|
jbtj.upflag = 1;
|
|||
|
|
jbtj.fddm = Convert.ToInt16(LoginUser.yydm);
|
|||
|
|
jbtj1list.Add(jbtj);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
MessageBox.Show(service.Delete(h).Message);
|
|||
|
|
|
|||
|
|
MessageBox.Show(service.Insert(h, jbtj1list, this.txtTm.Text, true).Message);
|
|||
|
|
|
|||
|
|
ftj.GetAllDfxList();
|
|||
|
|
this.Close();
|
|||
|
|
|
|||
|
|
//List<t_grgzb> g = ServiceContainer.GetService<IZongJian>().GetGrgzbByTm(Convert.ToInt32(this.txtTm.Text));
|
|||
|
|
//List<t_ttgzb> t = ServiceContainer.GetService<IZongJian>().GetTtgzbByTm(Convert.ToInt32(this.txtTm.Text));
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private void button1_Click(object sender, EventArgs e)
|
|||
|
|
{
|
|||
|
|
frmtjjg tjjg = new frmtjjg(int.Parse(this.txtTm.Text.Trim()));
|
|||
|
|
tjjg.ShowDialog();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private void button3_Click(object sender, EventArgs e)
|
|||
|
|
{
|
|||
|
|
frmShowBaoGao fsbg = new frmShowBaoGao();
|
|||
|
|
fsbg.init(this.txtTm.Text.Trim(),0);
|
|||
|
|
fsbg.re.Show();
|
|||
|
|
fsbg.ShowDialog();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private void dgvTjrJb_DoubleClick(object sender, EventArgs e)
|
|||
|
|
{
|
|||
|
|
if (dgvTjrJb.CurrentRow.Index < 0)
|
|||
|
|
{
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
t_jbk k = dgvTjrJb.Rows[dgvTjrJb.CurrentRow.Index].DataBoundItem as t_jbk;
|
|||
|
|
tjbkBindingSource1.Remove(k);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private void button5_Click(object sender, EventArgs e)
|
|||
|
|
{
|
|||
|
|
var service = ServiceContainer.GetService<IZongJian>();
|
|||
|
|
t_hzfx h = new t_hzfx();
|
|||
|
|
h.tm = int.Parse(this.txtTm.Text.Trim());
|
|||
|
|
h.fx = this.txtHzfx.Text;
|
|||
|
|
h.zt = 1;
|
|||
|
|
h.wcsj = Convert.ToDateTime(DateTime.Now.ToString("d"));
|
|||
|
|
h.czy = LoginUser.username;
|
|||
|
|
h.upflag = 1;
|
|||
|
|
h.fddm = Convert.ToInt16(LoginUser.yydm);
|
|||
|
|
|
|||
|
|
List<t_jbtj1> jbtjlist = new List<t_jbtj1>();
|
|||
|
|
List<t_jbk> jbks = ((System.Windows.Forms.BindingSource)(dgvTjrJb.DataSource)).List as List<t_jbk>;
|
|||
|
|
foreach (t_jbk jbk in jbks)
|
|||
|
|
{
|
|||
|
|
t_jbtj1 jbtj = new t_jbtj1();
|
|||
|
|
jbtj.jbbm = jbk.jbbm;
|
|||
|
|
jbtj.tm = int.Parse(this.txtTm.Text.Trim());
|
|||
|
|
jbtj.upflag = 1;
|
|||
|
|
jbtj.fddm = Convert.ToInt16(LoginUser.yydm);
|
|||
|
|
jbtjlist.Add(jbtj);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
MessageBox.Show(service.Delete(h).Message);
|
|||
|
|
|
|||
|
|
MessageBox.Show(service.Insert(h, jbtjlist, this.txtTm.Text, false).Message);
|
|||
|
|
|
|||
|
|
ftj.GetAllDfxList();
|
|||
|
|
// this.Close();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private void txtHzfx_MouseClick(object sender, MouseEventArgs e)
|
|||
|
|
{
|
|||
|
|
if (e.Button == MouseButtons.Right)
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
//frmTiJianJianYiChaXun cz = new frmTiJianJianYiChaXun(this);
|
|||
|
|
//cz.txtSelectJy.Text = txtHzfx.SelectedText;
|
|||
|
|
//cz.butCx_Click(null, null);
|
|||
|
|
//cz.ShowDialog();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private void panel5_Scroll(object sender, ScrollEventArgs e)
|
|||
|
|
{
|
|||
|
|
y = this.VerticalScroll.Value;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private void panel5_Paint(object sender, PaintEventArgs e)
|
|||
|
|
{
|
|||
|
|
this.VerticalScroll.Value = y;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
|
|||
|
|
{
|
|||
|
|
if (tabControl1.SelectedTab == tabPage3)
|
|||
|
|
{
|
|||
|
|
var tjjdservice = ServiceContainer.GetService<It_tjjd>();
|
|||
|
|
t_tjjd tjjd = tjjdservice.getTjjd(txtTm.Text.ToString(), 21);
|
|||
|
|
|
|||
|
|
try
|
|||
|
|
{
|
|||
|
|
System.IO.MemoryStream ms = new System.IO.MemoryStream(tjjd.image);
|
|||
|
|
pictureBox2.Image = Image.FromStream(ms);
|
|||
|
|
}
|
|||
|
|
catch
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|