//Получает нормы для лаборатории private void loadNormLimitList() { try { NLList = new Processing.LabTickets.NormLimitList(); foreach (int i in checkedListBox1.CheckedIndices) { checkedListBox1.SetItemChecked(i, false); } if (this.comboBoxLabName.SelectedIndex != -1 && this.comboBoxTypes.SelectedIndex != -1) { short _type = Convert.ToInt16(lTypes[comboBoxTypes.SelectedIndex].SampleType); int _lab = (int)dtLabs.Rows[this.comboBoxLabName.SelectedIndex]["code_id"]; NLList.loadLabNormLimits(_lab, _type); foreach (Processing.LabTickets.NormLimit i in NLList) { if (nList.Count > 0) { int kL = nList.IndexOf(nList.Find(o => o.NormID == i.NormLimitId)); if (kL >= 0) { checkedListBox1.SetItemChecked(kL, true); } } } } } catch (Exception exception) { Warnings.WarnLog log = new Warnings.WarnLog(); log.writeLog(MethodBase.GetCurrentMethod().Name, exception.Message.ToString(), exception.StackTrace.ToString()); } }
private void loadTemplateNorm() { if (this.dataGridView1.CurrentRow.Index > -1 && ticketList.Count > 0) { Int64 _gotTicket = ticketList[this.dataGridView1.CurrentRow.Index].TicketId; normList = new baza.Processing.LabTickets.NormLimitList(); normList.Clear(); this.listBox2.Items.Clear(); normList.getNorms(_gotTicket); foreach (Processing.LabTickets.NormLimit i in normList) { this.listBox2.Items.Add(i.NormName); } } }