/* Domain Logic Functions*/
        public double AverageSalary()
        {
            TableData = _dataGateway.Find();
            double SalarySum = 0;

            foreach (DataRow row in this.TableData.Rows)
            {
                SalarySum += Double.Parse(row[4].ToString());
            }

            return(SalarySum / TableData.Rows.Count);
        }
예제 #2
0
        private void button4_Click(object sender, EventArgs e)
        {
            CustomerTableModule CustomerModule = new CustomerTableModule(CustomerTableGateway.Find());

            lblAvgSalary.Text = CustomerModule.AverageSalary().ToString();
        }