Ejemplo n.º 1
0
        private void GetViewModelPropertyValues(string accNumber, string examDate, bool testConducted)
        {
            AirCondUmskData acUmskDataVM = (AirCondUmskData)viewmodel;

            accNumberCol.Value       = accNumber;
            dateOfExamCol.Value      = examDate;
            isTestConductedCol.Value = testConducted.ToString(CultureInfo.InvariantCulture);
            avgSpPerRtEarCol.Value   = acUmskDataVM.AvgSpPerRtEar.ToString();
            impairRtEarCol.Value     = acUmskDataVM.ImpairRtEar.ToString();
            avgSpPerLtEarCol.Value   = acUmskDataVM.AvgSpPerLtEar.ToString();
            impairLtEarCol.Value     = acUmskDataVM.ImpairLtEar.ToString();
            disabilityCol.Value      = acUmskDataVM.Disability.ToString();
        }
Ejemplo n.º 2
0
        public override void OpenRecordFromDatabase(string accNumber, string examDate, out bool testConducted)
        {
            base.OpenRecordFromDatabase(accNumber, examDate, out testConducted);

            string query = "SELECT * FROM " + disabilityTable + " WHERE AccNumber = '" + accNumber +
                           "' AND DateOfExam = '" + examDate + "'";
            SQLiteCommand    readCmd = new SQLiteCommand(query, DatabaseInfo.SqliteCon);
            SQLiteDataReader reader  = readCmd.ExecuteReader();

            testConducted = false;

            if (reader.Read())
            {
                AirCondUmskData acUmskDataVM = (AirCondUmskData)viewmodel;

                testConducted = Convert.ToBoolean(reader.GetString(isTestConductedCol.Index));
                acUmskDataVM.AvgSpPerRtEar = NullDoubleHelper.ToNullableDouble(reader.GetString(avgSpPerRtEarCol.Index));
                acUmskDataVM.ImpairRtEar   = NullDoubleHelper.ToNullableDouble(reader.GetString(impairRtEarCol.Index));
                acUmskDataVM.AvgSpPerLtEar = NullDoubleHelper.ToNullableDouble(reader.GetString(avgSpPerLtEarCol.Index));
                acUmskDataVM.ImpairLtEar   = NullDoubleHelper.ToNullableDouble(reader.GetString(impairLtEarCol.Index));
                acUmskDataVM.Disability    = NullDoubleHelper.ToNullableDouble(reader.GetString(disabilityCol.Index));
            }
        }
Ejemplo n.º 3
0
 public AirCondUmskVM()
 {
     TabTitle     = "AC(U/Msk)";
     PureToneData = new AirCondUmskData();
 }