private void addNewEquipmentType() { if (NewEquipmentTypeName != string.Empty && NewEquipmentTypeName != null) { EquipmentItemType t = new EquipmentItemType { Name = NewEquipmentTypeName }; EquipmentItemTypes.Add(t); NewEquipmentTypeName = string.Empty; } }
public override void GetData() { #region equipment var res = Platform.Retriever.RetrieveItems(typeof(EquipmentItemType)); foreach (var v in res) { EquipmentItemTypes.Add(v as EquipmentItemType); } var equipments = Platform.Retriever.RetrieveItems(typeof(EquipmentItem)); foreach (var q in equipments) { EquipmentItems.Add(q as EquipmentItem); } #endregion #region Forms #region DailyQCForm //QAForm dailyForm = new QAForm(); //dailyForm.Name = "Daily QC"; //dailyForm.Frequency = FormFrequency.Daily; //FormTemplate f1 = new FormTemplate(); //f1.Columns = "0.35,0.15,0.35,0.15"; //f1.Rows = "0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1"; //f1.Form = dailyForm; //dailyForm.FormTemplates.Add(f1); //f1.VersionDate = DateTime.Now; //f1.VersionNumber = 1; //LabelFormElement lel = new LabelFormElement(); //lel.Row = 0; //lel.Column = 0; //lel.FontSize = 14; //lel.LabelText = "Did Air Cal Pass?"; //lel.Height = 0.05; //lel.Width = 0.13; //lel.Background = "Gray"; //lel.HorizontalAlignment = System.Windows.HorizontalAlignment.Right; //lel.Name = "Air cal label"; //f1.FormElements.Add(lel); //BooleanFormElement bel = new BooleanFormElement(); ////bel.DataDictionaryEntry = CT.Entries.Last(); //bel.Row = 0; //bel.Column = 1; //bel.Width = 0.05; //bel.Height = 0.05; //bel.HorizontalAlignment = System.Windows.HorizontalAlignment.Left; //bel.Name = "Air cal pass checkbox"; //f1.FormElements.Add(bel); //LabelFormElement lel2 = new LabelFormElement(); //lel2.Row = 0; //lel2.Column = 2; //lel2.FontSize = 14; //lel2.LabelText = "Uniformity value:"; //lel2.Height = 0.05; //lel2.Width = 0.13; //lel2.HorizontalAlignment = System.Windows.HorizontalAlignment.Right; //f1.FormElements.Add(lel2); //NumericFormElement nel = new NumericFormElement(); //nel.DataDictionaryEntry = gammaCamera.Entries.First(); //nel.Column = 3; //nel.Row = 0; //nel.Width = 0.13; //nel.NumberOfDecimals = 2; //nel.Format = "P"; //nel.Height = 0.05; //nel.FontSize = 14; //f1.FormElements.Add(nel); //LabelFormElement bottomLabel = new LabelFormElement(); //bottomLabel.LabelText = "Bottom of Page"; //bottomLabel.FontSize = 24; //bottomLabel.Row = 1; //bottomLabel.Column = 0; //bottomLabel.ColumnSpan = 4; //bottomLabel.HorizontalAlignment = System.Windows.HorizontalAlignment.Center; //bottomLabel.Foreground = "Orange"; //bottomLabel.Background = "Blue"; //f1.FormElements.Add(bottomLabel); //Forms.Add(dailyForm); #endregion #region DoseCalibratorQC //QAForm CalibratorQC = new QAForm(); //CalibratorQC.Name = "Dose Calibrator QC"; //CalibratorQC.Frequency = FormFrequency.Daily; //FormTemplate t = new FormTemplate(); //t. #endregion //QAForm w = new QAForm(); //w.Name = "Weekly QC Form"; //Forms.Add(w); //FormTemplate w1 = new FormTemplate(); //w1.Form = w; //w.FormTemplates.Add(w1); //w1.VersionNumber = 1; //w1.VersionDate = DateTime.Now.AddDays(-1); //FormTemplate w2 = new FormTemplate(); //w2.Form = w; //w.FormTemplates.Add(w2); //w2.VersionDate = DateTime.Now; //w2.VersionNumber = 2; //QAFormInstance wInstance = new QAFormInstance(); //wInstance.FormTemplate = w2; //w2.Instances.Add(wInstance); #endregion }