Beispiel #1
0
        private void gridMain_CellDoubleClick(object sender, ODGridClickEventArgs e)
        {
            FormMedLabEdit FormLE = new FormMedLabEdit();
            long           patNum = 0;

            string[] patSpecimenIds = gridMain.Rows[e.Row].Tag.ToString().Split(',');
            if (patSpecimenIds.Length > 0)
            {
                patNum = PIn.Long(patSpecimenIds[0]);         //if PatNum portion of the tag is an empty string, patNum will remain 0
            }
            FormLE.PatCur = Patients.GetPat(patNum);          //could be null if PatNum=0
            string specimenId       = "";
            string specimenIdFiller = "";

            if (patSpecimenIds.Length > 1)
            {
                specimenId = patSpecimenIds[1];
            }
            if (patSpecimenIds.Length > 2)
            {
                specimenIdFiller = patSpecimenIds[2];
            }
            FormLE.ListMedLabs = MedLabs.GetForPatAndSpecimen(patNum, specimenId, specimenIdFiller);        //patNum could be 0 if this MedLab is not attached to a pat
            FormLE.ShowDialog();
            FillGrid();
        }
Beispiel #2
0
		private void gridMain_CellDoubleClick(object sender,ODGridClickEventArgs e) {
			FormMedLabEdit FormLE=new FormMedLabEdit();
			long patNum=0;
			string[] patSpecimenIds=gridMain.Rows[e.Row].Tag.ToString().Split(new string[] { "," },StringSplitOptions.None);
			if(patSpecimenIds.Length>0) {
				patNum=PIn.Long(patSpecimenIds[0]);//if PatNum portion of the tag is an empty string, patNum will remain 0
			}
			FormLE.PatCur=Patients.GetPat(patNum);//could be null if PatNum=0
			string specimenId="";
			string specimenIdFiller="";
			if(patSpecimenIds.Length>1) {
				specimenId=patSpecimenIds[1];
			}
			if(patSpecimenIds.Length>2) {
				specimenIdFiller=patSpecimenIds[2];
			}
			FormLE.ListMedLabs=MedLabs.GetForPatAndSpecimen(patNum,specimenId,specimenIdFiller);//patNum could be 0 if this MedLab is not attached to a pat
			FormLE.ShowDialog();
			FillGrid();
		}