}
{.CommandType = CommandType.Text;.CommandText = "Select Costs from Checks where Emploee =" + dataGridView1.Rows[i].Cells[0].Value.ToString();.ExecuteNonQuery();dt1 = new DataTable();da1 = new SqlDataAdapter(cmd);.Fill(dt1);.DataSource = dt1;= 1;(int j = 0; j < dataGridView2.RowCount - 1; j++)
{+= Convert.ToDouble(dataGridView2.Rows[j].Cells[0].Value);
}.CommandType = CommandType.Text;.CommandText = "INSERT INTO ZP VALUES(" + dataGridView1.Rows[i].Cells[0].Value.ToString() + ",CONVERT(DATETIME,'" ++ "',102)," + (Convert.ToInt16(dataGridView1.Rows[i].Cells[2].Value.ToString()) * sum / 100) + ")";.ExecuteNonQuery();
}
}.Show("Зарплата успішно нарахована");.CommandType = CommandType.Text;.CommandText = "Select * from ZP";.ExecuteNonQuery();dt2 = new DataTable();da2 = new SqlDataAdapter(cmd);.Fill(dt2);.DataSource = dt2;.Close();
}(Exception)
{.Show("Неможливо нарахувати зарплату", "Помилка");.Close();
}
}.Show("Заробітна плата нараховується тільки першого числа");
}
}
}