99 lines
3.0 KiB
C#
99 lines
3.0 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
|
|
{
|
|
[ModuleAttribute(ModuleID = "1067A09E-450B-47AB-A425-FD6B7C898CD2", ModuleName = "重大阳性随访")]
|
|
public partial class frmZdyxSuiFang : SOH.Window.baseChildForm
|
|
{
|
|
private DataTable dtAll;
|
|
public frmZdyxSuiFang()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void button1_Click(object sender, EventArgs e)
|
|
{
|
|
GetAllZdyxSfList();
|
|
}
|
|
public void GetAllZdyxSfList()
|
|
{
|
|
string yydmstr = LoginUser.yydm; //当前医院代码-分店
|
|
short yydm = 0;
|
|
short.TryParse(yydmstr, out yydm);
|
|
string czyxm = LoginUser.xm;
|
|
|
|
var vservice = ServiceContainer.GetService<It_zdyxsf>();
|
|
String dataAll = vservice.GetAllZdyxList();
|
|
dtAll = Newtonsoft.Json.JsonConvert.DeserializeObject(dataAll, typeof(DataTable)) as DataTable;
|
|
iDataBindBindingSource.DataSource = dtAll;
|
|
}
|
|
|
|
private void frmZdyxSuiFang_Load(object sender, EventArgs e)
|
|
{
|
|
GetAllZdyxSfList();
|
|
}
|
|
|
|
private void button2_Click(object sender, EventArgs e)
|
|
{
|
|
if (dgvAll.CurrentRow.Index < 0)
|
|
{
|
|
return;
|
|
}
|
|
|
|
DataRowView o = dgvAll.Rows[dgvAll.CurrentRow.Index].DataBoundItem as DataRowView;
|
|
frmZDYXSF sf = new frmZDYXSF(o,this);
|
|
sf.StartPosition = FormStartPosition.CenterScreen;
|
|
sf.ShowDialog();
|
|
}
|
|
|
|
private void dgvAll_RowPrePaint(object sender, DataGridViewRowPrePaintEventArgs e)
|
|
{
|
|
if (e.RowIndex < dgvAll.RowCount)
|
|
{
|
|
DataGridViewRow dgrSingle = dgvAll.Rows[e.RowIndex];
|
|
try
|
|
{
|
|
if (!string.IsNullOrEmpty(dgrSingle.Cells["sfys"].Value.ToString()))
|
|
{
|
|
dgrSingle.DefaultCellStyle.BackColor = Color.LightGreen;
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
MessageBox.Show(ex.Message);
|
|
}
|
|
}
|
|
}
|
|
|
|
private void txtFind_KeyDown(object sender, KeyEventArgs e)
|
|
{
|
|
if (e.KeyCode == Keys.Enter)
|
|
{
|
|
if (dgvAll.Rows.Count != 0)
|
|
{
|
|
string tmh = this.txtFind.Text;
|
|
int index = iDataBindBindingSource.Find("tm", tmh);
|
|
if (index != -1)
|
|
{
|
|
this.iDataBindBindingSource.Position = index;//定位BindingSource
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|