private void monthComboBox_SelectedIndexChanged(object sender, EventArgs e) { string request = $"SELECT * FROM Statistics WHERE месяц = '{monthComboBox.SelectedItem}'"; string[] statistick = _tableMenager.SelectInDB(request); _dataToExcel = statistick; ClearChart(monthChart); PrintStatistick(statistick, monthChart, monthComboBox.SelectedItem.ToString()); }
private double ColculateTrustLVl(int toPay) { string request = $"SELECT COUNT(Уровень_доверия) FROM Employees"; string[] count = _tableMenager.SelectInDB(request); request = $"SELECT Уровень_доверия FROM Employees"; string[] trustEmployees = _tableMenager.SelectInDB(request, int.Parse(count[0])); double meanTrust = 0; foreach (var trust in trustEmployees) { meanTrust += double.Parse(trust); } meanTrust += (toPay * 2 / 100); return(meanTrust / (trustEmployees.Length + 1.0)); }