100 lines
3.1 KiB
C#
100 lines
3.1 KiB
C#
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;
|
|
using SOH.Entities;
|
|
using EAS.Services;
|
|
using SOH.BLL;
|
|
using SOH.Data;
|
|
|
|
namespace SOH.Queuing.Setting
|
|
{
|
|
[ModuleAttribute(ModuleID = "4B49679A-51FA-4AD3-B679-4C2D239E5026", ModuleName = "排队科室项目设置")]
|
|
public partial class frmpd_ksxmGuanXi : SOH.Window.baseChildForm
|
|
{
|
|
public frmpd_ksxmGuanXi()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void frmpd_ksxmGuanXi_Load(object sender, EventArgs e)
|
|
{
|
|
myinit();
|
|
}
|
|
private void myinit()
|
|
{
|
|
var vser = ServiceContainer.GetService<IPaiDuiJiaoHao>();
|
|
List<pd_wlks> kss = vser.getwlkss();
|
|
this.ccbpdks.DataSource = kss;
|
|
|
|
List<pd_xm> xms = vser.getwlxms();
|
|
pdxmBindingSource.DataSource = xms;
|
|
}
|
|
|
|
private void ccbpdks_SelectedIndexChanged(object sender, EventArgs e)
|
|
{
|
|
|
|
var vser = ServiceContainer.GetService<IPaiDuiJiaoHao>();
|
|
//string xmlist = vser.GetpdksxmBypdks(Convert.ToInt32(this.ccbpdks.SelectedValue));
|
|
//DataTable dt = Newtonsoft.Json.JsonConvert.DeserializeObject(xmlist, typeof(DataTable)) as DataTable;
|
|
|
|
pdxmBindingSource1.DataSource = vser.GetpdksxmBypdks(Convert.ToInt32(this.ccbpdks.SelectedValue));
|
|
//pdxmBindingSource1.Clear();
|
|
}
|
|
|
|
private void dgv_pdxm_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
|
|
{
|
|
if (e.RowIndex == -1)
|
|
{
|
|
return;
|
|
}
|
|
pd_xm o = dgv_pdxm.Rows[e.RowIndex].DataBoundItem as pd_xm;
|
|
List<pd_xm> al1;
|
|
if ((pdxmBindingSource1.DataSource as List<pd_xm>) == null)
|
|
{
|
|
al1 = new List<pd_xm>();
|
|
}
|
|
else
|
|
{
|
|
al1 = (pdxmBindingSource1.DataSource as List<pd_xm>);
|
|
}
|
|
for (int i = 0; i < al1.Count; i++)
|
|
{
|
|
if (al1[i].xmmc == o.xmmc)
|
|
{
|
|
return;
|
|
}
|
|
}
|
|
pdxmBindingSource1.Add(o);
|
|
}
|
|
|
|
private void dgv_pd_ksxm_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
|
|
{
|
|
if (e.RowIndex == -1)
|
|
{
|
|
return;
|
|
}
|
|
pd_xm o = dgv_pd_ksxm.Rows[e.RowIndex].DataBoundItem as pd_xm;
|
|
pdxmBindingSource1.Remove(o);
|
|
}
|
|
|
|
private void button1_Click(object sender, EventArgs e)
|
|
{
|
|
List<int> xmbmlist = new List<int>();
|
|
for (int i = 0; i < dgv_pd_ksxm.Rows.Count; i++)
|
|
{
|
|
xmbmlist.Add(Convert.ToInt32(dgv_pd_ksxm.Rows[i].Cells["idDataGridViewTextBoxColumn1"].Value));
|
|
}
|
|
|
|
var vser = ServiceContainer.GetService<IPaiDuiJiaoHao>();
|
|
OperationResult ormx = vser.Inserpdksxm(Convert.ToInt32(this.ccbpdks.SelectedValue), xmbmlist);
|
|
MessageBox.Show(ormx.Message);
|
|
}
|
|
}
|
|
}
|