103 lines
3.4 KiB
C#
103 lines
3.4 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 EAS.Services;
|
|
using SOH.BLL;
|
|
using SOH.Entities;
|
|
using SOH.Data;
|
|
namespace SOH.Queuing.Setting
|
|
{
|
|
public partial class frm_KHPDXX : Form
|
|
{
|
|
IPaiDuiJiaoHao vser = ServiceContainer.GetService<IPaiDuiJiaoHao>();
|
|
public frm_KHPDXX()
|
|
{
|
|
InitializeComponent();
|
|
dgv_pd.AutoGenerateColumns = false;
|
|
dgv_fp.AutoGenerateColumns = false;
|
|
}
|
|
|
|
internal void btn_cx_Click(object sender, EventArgs e)
|
|
{
|
|
DataSet ds = vser.getKHPDXX(txt_tmh.Text);
|
|
dgv_pd.DataSource = ds.Tables[0];
|
|
}
|
|
|
|
private void frm_KHPDXX_Load(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
private void dgv_pd_CellClick(object sender, DataGridViewCellEventArgs e)
|
|
{
|
|
DataRow dr = (dgv_pd.Rows[e.RowIndex].DataBoundItem as DataRowView).Row;
|
|
string xmid = dr["xmid"].ToString();
|
|
string xb = dr["xbid"].ToString();
|
|
DataSet ds = vser.getKFPKS(xmid, xb);
|
|
dgv_fp.DataSource = ds.Tables[0];
|
|
|
|
}
|
|
|
|
private void btn_fp_Click(object sender, EventArgs e)
|
|
{
|
|
if (dgv_pd.SelectedRows.Count == 0)
|
|
{
|
|
MessageBox.Show("请选择要分配的科室!");
|
|
return;
|
|
}
|
|
if (dgv_fp.SelectedRows.Count == 0)
|
|
{
|
|
MessageBox.Show("请选择要分配的科室!");
|
|
return;
|
|
}
|
|
DataRow dr = (dgv_pd.SelectedRows[0].DataBoundItem as DataRowView).Row;
|
|
DataRow fpdr = (dgv_fp.SelectedRows[0].DataBoundItem as DataRowView).Row;
|
|
string pdid = dr["pdid"].ToString();
|
|
string ksid = fpdr["id"].ToString();
|
|
string nr = vser.PDFP(pdid, ksid);
|
|
if (nr != "")
|
|
{
|
|
MessageBox.Show("分配成功!请到【" + nr + "】体检");
|
|
string fpnr="从【"+ dr["ksmc"].ToString() + "】分配到【" + nr + "】";
|
|
OperationResult or1 = ServiceContainer.GetService<It_grgzb>().CzrzFpks(LoginUser.username, 2, fpnr, Convert.ToInt32(dr["tmh"].ToString()));
|
|
}
|
|
else
|
|
{
|
|
MessageBox.Show("分配失败,请与管理员联系!");
|
|
}
|
|
|
|
btn_cx_Click(null, null);
|
|
}
|
|
|
|
private void button1_Click(object sender, EventArgs e)
|
|
{
|
|
if (txt_tmh.Text != "")
|
|
{
|
|
var FenDianService = ServiceContainer.GetService<IFenDian>();
|
|
FenDian fd = FenDianService.getFenDianById(Convert.ToInt32(LoginUser.yydm));
|
|
if (fd.isPaidui == 1)
|
|
{
|
|
string ksname = vser.sendPaiduixinxi2(Convert.ToInt32(txt_tmh.Text));
|
|
if (!string.IsNullOrEmpty(ksname))
|
|
{
|
|
MessageBox.Show("\r\n请到" + ksname + "体检");
|
|
}
|
|
else
|
|
{
|
|
MessageBox.Show("排队失败,请与管理员联系!");
|
|
}
|
|
}
|
|
else
|
|
{
|
|
MessageBox.Show("排队系统未开启,请联系管理员!");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|