Upload to server
uploading
This commit is contained in:
89
patientman/PatientMan/Forms/frmClinics.cs
Normal file
89
patientman/PatientMan/Forms/frmClinics.cs
Normal file
@@ -0,0 +1,89 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Datalib.EntityClasses;
|
||||
using Datalib.HelperClasses;
|
||||
using Datalib.RelationClasses;
|
||||
using Datalib.DatabaseSpecific;
|
||||
using System.Linq;
|
||||
using Datalib.Linq;
|
||||
using SD.LLBLGen.Pro.ORMSupportClasses;
|
||||
|
||||
namespace PatientMan.Forms
|
||||
{
|
||||
public partial class frmClinics : PatientMan.BasicForms.frmCommon
|
||||
{
|
||||
public EntityCollection<TblExaminationInfoEntity> ClinicInfos = new EntityCollection<TblExaminationInfoEntity>();
|
||||
public frmClinics()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void frmClinics_Load(object sender, EventArgs e)
|
||||
{
|
||||
var pro = new EntityCollection<TblProvinceEntity>();
|
||||
var Agency = new EntityCollection<TblAgencyEntity>();
|
||||
var regimen = new EntityCollection<TblRegimenEntity>();
|
||||
var tests = new EntityCollection<TblTestEntity>();
|
||||
var treatments = new EntityCollection<TblTreatmentEntity>();
|
||||
var Patients = new EntityCollection<TblPatientEntity>();
|
||||
adapter.FetchEntityCollection(pro, null);
|
||||
adapter.FetchEntityCollection(Agency, null);
|
||||
adapter.FetchEntityCollection(regimen, null);
|
||||
adapter.FetchEntityCollection(tests, null);
|
||||
adapter.FetchEntityCollection(treatments, null);
|
||||
adapter.FetchEntityCollection(Patients, null);
|
||||
_province.DataSource = pro;
|
||||
_AgencyType.DataSource = Agency;
|
||||
_regimen.DataSource = regimen;
|
||||
_test.DataSource = tests;
|
||||
_treatment.DataSource = treatments;
|
||||
_Patients.DataSource = Patients.Select(q => new { q.PatientId, PatientName = strUtil.Decrypt(q.PatientName) }).ToList();
|
||||
RelationPredicateBucket filter = new RelationPredicateBucket(); ;
|
||||
filter.PredicateExpression.Add(TblExaminationInfoFields.IsClinic == 1);
|
||||
adapter.FetchEntityCollection(ClinicInfos, filter);
|
||||
LoadData();
|
||||
}
|
||||
public override void LoadData()
|
||||
{
|
||||
|
||||
usrClinlicInfo.ClinicInfos = ClinicInfos;
|
||||
grdClinicInfo.DataSource = ClinicInfos;
|
||||
usrClinlicInfo.BindingData();
|
||||
usrClinlicInfo.LoadLibrary();
|
||||
}
|
||||
|
||||
private void gridView_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
if (ClinicInfos.Count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
var PatientId = ClinicInfos[BindingContext[ClinicInfos].Position].PatientId;
|
||||
var frm = new frmPatientInfo();
|
||||
frm.PatientsCollection = new EntityCollection<TblPatientEntity>();
|
||||
var PatientInfo = new TblPatientEntity(PatientId);
|
||||
adapter.FetchEntity(PatientInfo);
|
||||
frm.PatientsCollection.Add(PatientInfo);
|
||||
frm.PatientInfo = PatientInfo;
|
||||
frm.LoadData();
|
||||
frm.gotoClinic();
|
||||
frm.ShowDialog();
|
||||
}
|
||||
|
||||
private void Print_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void View_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void barPrint_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
|
||||
{
|
||||
grdClinicInfo.ShowRibbonPrintPreview();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user