private void ShowRight(T_Result result) { if (result.Gel == null) { result.Gel = GelList.Where(g => g.ID == result.GelID).FirstOrDefault(); } if (result.Picture == null) { } this.SelectedResult = null; SK_ABO.UserCtrls.TubeResult_Control[] tubes = { (this.View as QueryView).Img_Tube1, (this.View as QueryView).Img_Tube2, (this.View as QueryView).Img_Tube3, (this.View as QueryView).Img_Tube4, (this.View as QueryView).Img_Tube5, (this.View as QueryView).Img_Tube6, (this.View as QueryView).Img_Tube7, (this.View as QueryView).Img_Tube8 }; for (int i = 0; i < 8; i++) { tubes[i].TestResult = null; } for (int i = result.TubeStartNo; i < result.TubeStartNo + result.TubeCount; i++) { tubes[i].TestResult = result; } this.SelectedResult = result; this.ResultStr = result.Result; this.CanSaveChange = true; }
public void Ok() { IList <SKABO.Common.Models.NotDuplex.SampleInfo> list = new List <SKABO.Common.Models.NotDuplex.SampleInfo>(); for (byte ri = 0; ri < Constants.SampleRackCount; ri++) { byte index = 0; foreach (var smap in Samples) { var barcode = smap.GetBarcode(ri + 1); if (!String.IsNullOrEmpty(barcode)) { var item = new SKABO.Common.Models.NotDuplex.SampleInfo() { Index = index, RackIndex = (byte)(ri + 1), Barcode = barcode }; list.Add(item); } index++; } } var listConf = userService.QuerySysConfig("LisConifg").SnValue.ToInstance <LisConifg>(); if (list.Count > 0) { if (listConf.TI >= 0) { var gel = GelList.Where(g => g.LisGelClass == listConf.TI).FirstOrDefault(); var gelIndex = (byte)GelList.IndexOf(gel); foreach (var item in list) { item.SetTestItem(gelIndex); } TestRobot.AddTestBag(GenerateTestBag(0, list.Where(s => s.TestItem1), SKABO.Common.Enums.TestLevelEnum.Normal)); TestRobot.AddTestBag(GenerateTestBag(1, list.Where(s => s.TestItem2), SKABO.Common.Enums.TestLevelEnum.Normal)); TestRobot.AddTestBag(GenerateTestBag(2, list.Where(s => s.TestItem3), SKABO.Common.Enums.TestLevelEnum.Normal)); TestRobot.AddTestBag(GenerateTestBag(3, list.Where(s => s.TestItem4), SKABO.Common.Enums.TestLevelEnum.Normal)); TestRobot.AddTestBag(GenerateTestBag(4, list.Where(s => s.TestItem5), SKABO.Common.Enums.TestLevelEnum.Normal)); TestRobot.AddTestBag(GenerateTestBag(5, list.Where(s => s.TestItem6), SKABO.Common.Enums.TestLevelEnum.Normal)); TestRobot.AddTestBag(GenerateTestBag(6, list.Where(s => s.TestItem7), SKABO.Common.Enums.TestLevelEnum.Normal)); TestRobot.AddTestBag(GenerateTestBag(7, list.Where(s => s.TestItem8), SKABO.Common.Enums.TestLevelEnum.Normal)); TestRobot.AddTestBag(GenerateTestBag(8, list.Where(s => s.TestItem9), SKABO.Common.Enums.TestLevelEnum.Normal)); } } this.RequestClose(); // var his_system = HisSystem.getInstance(); his_system.SetDirs(listConf.ResultDir, listConf.DuplexDir); his_system.ClsReqSample(); his_system.ClsTestSample(); for (int i = 0; i < list.Count; i++) { his_system.AddReqSample(list[i]); his_system.AddTestSample(list[i], GelList); } his_system.WriteRequest(); his_system.WriteTestItem(); }