private void GetOfficers() { int curOfficer; if (comboBox1.SelectedValue == null) { curOfficer = -1; } else { curOfficer = (int)comboBox1.SelectedValue; } try { com.setCommand("mGetRepRarts"); com.AddParam("12|0"); comboBox1.DataSource = com.GetResult(); com.setCommand("mGetRepRarts"); com.AddParam("12|0"); comboBox2.DataSource = com.GetResult(); } catch (Exception ex) { throw new Exception(ex.Message + " функция GetOfficer"); } if (curOfficer >= 0) { comboBox1.SelectedValue = curOfficer; } }
private void GetPropertyesByTask() { DataTable t; com.setCommand("mGetWPPropertyes"); com.AddParam(taskID); com.AddParam(wpID); com.AddParam(0); try { t = com.GetResult(); } catch (Exception ex) { throw new Exception("Function GetPropertyesByTask " + ex.Message); } for (int i = 0; i < t.Rows.Count; i++) { AddRow((int)t.Rows[i][0], (int)t.Rows[i][1], t.Rows[i][2].ToString(), t.Rows[i][4], (int)t.Rows[i][6]); } }
private void GetAnalytic() { DataTable t; //if(vGridControl1.Rows.Count>0) vGridControl1.Rows.Clear(); com.setCommand("getAnalityc"); com.AddParam(sqlTask); com.AddParam(9); t = com.GetResult(); try { for (int i = 0; i < t.Rows.Count; i++) { AddRow((int)t.Rows[i][0], t.Rows[i][1].ToString(), 0, GetAValues(t.Rows[i][0])); } } catch (Exception ex) { throw new Exception(ex.Message); } }