Beispiel #1
0
        public static void GetTotalAkgecianAndNonAkgecian(out int totalAkgecian, out int totalNonAkgecian)
        {
            totalAkgecian    = 0;
            totalNonAkgecian = 0;
            DataSet   participantDataSet   = ParticipantRepository.GetAllParticipants();
            DataTable participantDataTable = participantDataSet.Tables[0];

            foreach (DataRow row in participantDataTable.Rows)
            {
                if (row["CollegeName"].ToString() == "Ajay Kumar Garg Engineering College")
                {
                    totalAkgecian++;
                }
                else
                {
                    totalNonAkgecian++;
                }
            }
        }
Beispiel #2
0
        public static DataSet GetAllParticipants()
        {
            DataSet    participantDataSet   = ParticipantRepository.GetAllParticipants();
            DataTable  participantDataTable = participantDataSet.Tables[0];
            DataColumn genderColumn         = new DataColumn();

            genderColumn.ColumnName = "Gender";
            genderColumn.DataType   = typeof(string);
            participantDataTable.Columns.Add(genderColumn);
            foreach (DataRow row in participantDataTable.Rows)
            {
                if (row["GenderID"].ToString() == "1")
                {
                    row["Gender"] = "Male";
                }
                else
                {
                    row["Gender"] = "Female";
                }
            }
            return(participantDataSet);
        }
Beispiel #3
0
        public static void GetTotalMalesAndFemales(out int totalMales, out int totalFemales)
        {
            totalMales   = 0;
            totalFemales = 0;
            DataSet    participantDataSet   = ParticipantRepository.GetAllParticipants();
            DataTable  participantDataTable = participantDataSet.Tables[0];
            DataColumn genderColumn         = new DataColumn();

            genderColumn.ColumnName = "Gender";
            genderColumn.DataType   = typeof(string);
            participantDataTable.Columns.Add(genderColumn);
            foreach (DataRow row in participantDataTable.Rows)
            {
                if (row["GenderID"].ToString() == "1")
                {
                    totalMales++;
                }
                else
                {
                    totalFemales++;
                }
            }
        }
Beispiel #4
0
 public static int GetTotalParticipation()
 {
     return(ParticipantRepository.GetAllParticipants().Tables[0].Rows.Count);
 }