Ejemplo n.º 1
0
        //Load saved data into form for selected Anesthetic Record
        private void FillControls()
        {
            DataTable   table = AnestheticRecords.GetAnesthScoreTable(AnestheticRecordNum);
            AnesthScore Cur;

            for (int i = 0; i < table.Rows.Count; i++)
            {
                Cur = new AnesthScore();
                Cur.AnesthScoreNum      = PIn.PInt(table.Rows[i][0].ToString());
                Cur.AnestheticRecordNum = PIn.PInt(table.Rows[i][1].ToString());
                Cur.QActivity           = PIn.PInt(table.Rows[i][2].ToString());
                Cur.QResp             = PIn.PInt(table.Rows[i][3].ToString());
                Cur.QCirc             = PIn.PInt(table.Rows[i][4].ToString());
                Cur.QConc             = PIn.PInt(table.Rows[i][5].ToString());
                Cur.QColor            = PIn.PInt(table.Rows[i][6].ToString());
                Cur.AnesthesiaScore   = PIn.PInt(table.Rows[i][7].ToString());
                Cur.DischAmb          = PIn.PInt(table.Rows[i][8].ToString());
                Cur.DischWheelChr     = PIn.PInt(table.Rows[i][9].ToString());
                Cur.DischAmbulance    = PIn.PInt(table.Rows[i][10].ToString());
                Cur.DischCondStable   = PIn.PInt(table.Rows[i][11].ToString());
                Cur.DischCondUnstable = PIn.PInt(table.Rows[i][12].ToString());
                //fill radQActivity
                if (Cur.QActivity == 2)
                {
                    radActivityQ2.Checked = true;
                }
                else if (Cur.QActivity == 1)
                {
                    radActivityQ1.Checked = true;
                }
                else if (Cur.QActivity == 0)
                {
                    radActivityQ0.Checked = true;
                }
                //fill radQResp
                if (Cur.QResp == 2)
                {
                    radRespQ2.Checked = true;
                }
                else if (Cur.QResp == 1)
                {
                    radRespQ1.Checked = true;
                }
                else if (Cur.QResp == 0)
                {
                    radRespQ0.Checked = true;
                }
                //fill radQCirc
                if (Cur.QCirc == 2)
                {
                    radCircQ2.Checked = true;
                }
                else if (Cur.QCirc == 1)
                {
                    radCircQ1.Checked = true;
                }
                else if (Cur.QCirc == 0)
                {
                    radCircQ0.Checked = true;
                }
                //fill radQConc
                if (Cur.QConc == 2)
                {
                    radConcQ2.Checked = true;
                }
                else if (Cur.QConc == 1)
                {
                    radConcQ1.Checked = true;
                }
                else if (Cur.QConc == 0)
                {
                    radConcQ0.Checked = true;
                }
                //fill radQColor
                if (Cur.QColor == 2)
                {
                    radColorQ2.Checked = true;
                }
                else if (Cur.QColor == 1)
                {
                    radColorQ1.Checked = true;
                }
                else if (Cur.QColor == 0)
                {
                    radColorQ0.Checked = true;
                }
                //fill radDischAmb
                if (Cur.DischAmb == 1)
                {
                    radDischAmb.Checked = true;
                }
                //fill radDischWheelChr
                if (Cur.DischWheelChr == 1)
                {
                    radDischWheelChr.Checked = true;
                }
                //fill radDischAmbulance
                if (Cur.DischAmbulance == 1)
                {
                    radDischAmbulance.Checked = true;
                }
                //fill radDischCondStable
                if (Cur.DischCondStable == 1)
                {
                    radDischCondStable.Checked = true;
                }
                //fill radDischCondUntable
                if (Cur.DischCondUnstable == 1)
                {
                    radDischCondUnstable.Checked = true;
                }
            }
        }
		//Load saved data into form for selected Anesthetic Record
		private void FillControls() {
			DataTable table=AnestheticRecords.GetAnesthScoreTable(AnestheticRecordNum);
			AnesthScore Cur;
			for(int i = 0;i < table.Rows.Count;i++) {
				Cur = new AnesthScore();
				Cur.AnesthScoreNum = PIn.PInt(table.Rows[i][0].ToString());
				Cur.AnestheticRecordNum = PIn.PInt(table.Rows[i][1].ToString());
				Cur.QActivity = PIn.PInt(table.Rows[i][2].ToString());
				Cur.QResp = PIn.PInt(table.Rows[i][3].ToString());
				Cur.QCirc = PIn.PInt(table.Rows[i][4].ToString());
				Cur.QConc = PIn.PInt(table.Rows[i][5].ToString());
				Cur.QColor = PIn.PInt(table.Rows[i][6].ToString());
				Cur.AnesthesiaScore = PIn.PInt(table.Rows[i][7].ToString());
				Cur.DischAmb = PIn.PInt(table.Rows[i][8].ToString());
				Cur.DischWheelChr = PIn.PInt(table.Rows[i][9].ToString());
				Cur.DischAmbulance = PIn.PInt(table.Rows[i][10].ToString());
				Cur.DischCondStable = PIn.PInt(table.Rows[i][11].ToString());
				Cur.DischCondUnstable = PIn.PInt(table.Rows[i][12].ToString());
				//fill radQActivity
				if(Cur.QActivity == 2) {
					radActivityQ2.Checked = true;
				}
				else if(Cur.QActivity == 1) {
					radActivityQ1.Checked = true;
				}
				else if(Cur.QActivity == 0) {
					radActivityQ0.Checked = true;
				}
				//fill radQResp
				if(Cur.QResp == 2) {
					radRespQ2.Checked = true;
				}
				else if(Cur.QResp == 1) {
					radRespQ1.Checked = true;
				}
				else if(Cur.QResp == 0) {
					radRespQ0.Checked = true;
				}
				//fill radQCirc
				if(Cur.QCirc == 2) {
					radCircQ2.Checked = true;
				}
				else if(Cur.QCirc == 1) {
					radCircQ1.Checked = true;
				}
				else if(Cur.QCirc == 0) {
					radCircQ0.Checked = true;
				}
				//fill radQConc
				if(Cur.QConc == 2) {
					radConcQ2.Checked = true;
				}
				else if(Cur.QConc == 1) {
					radConcQ1.Checked = true;
				}
				else if(Cur.QConc == 0) {
					radConcQ0.Checked = true;
				}
				//fill radQColor
				if(Cur.QColor == 2) {
					radColorQ2.Checked = true;
				}
				else if(Cur.QColor == 1) {
					radColorQ1.Checked = true;
				}
				else if(Cur.QColor == 0) {
					radColorQ0.Checked = true;
				}
				//fill radDischAmb
				if(Cur.DischAmb == 1) {
					radDischAmb.Checked = true;
				}
				//fill radDischWheelChr
				if(Cur.DischWheelChr == 1) {
					radDischWheelChr.Checked = true;
				}
				//fill radDischAmbulance
				if(Cur.DischAmbulance == 1) {
					radDischAmbulance.Checked = true;
				}
				//fill radDischCondStable
				if(Cur.DischCondStable == 1) {
					radDischCondStable.Checked = true;
				}
				//fill radDischCondUntable
				if(Cur.DischCondUnstable == 1) {
					radDischCondUnstable.Checked = true;
				}

			}
		}