public NewUser(string conStr, object UserID) { InitializeComponent(); SQLCom com = new SQLCom(conStr, "getAnalityc"); com.AddParam(UserID); com.AddParam(12); try { DataTable t = com.GetResult(); textBox4.Text = t.Rows[0][0].ToString(); textBox1.Text = t.Rows[0][3].ToString(); textBox2.Text = t.Rows[0][1].ToString(); textBox3.Text = t.Rows[0][2].ToString(); textBox5.Text = t.Rows[0][5].ToString(); textBox6.Text = t.Rows[0][6].ToString(); textBox7.Text = t.Rows[0][7].ToString(); textBox8.Text = t.Rows[0][8].ToString(); textBox9.Text = t.Rows[0][9].ToString(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
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); } }
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]); } }