Exemplo n.º 1
0
        private void PopulateCombobox()
        {
            try
            {
                raceCategory = new BIZ.RaceCategory();
                PopulateBusinessLayer(Common.Common.RaceEntryClassType.RaceCategory);

                //Race Schedule
                DataTable dtRaceCategoryGroup;
                dtRaceCategoryGroup = raceCategory.RaceCategoryGetByKey().Tables[1];

                if (dtRaceCategoryGroup.Rows.Count > 0)
                {
                    foreach (DataRow dtrow in dtRaceCategoryGroup.Rows)
                    {
                        if (OrigCategory != dtrow["RaceCategoryGroupName"].ToString())
                        {
                            cmbCategoryList.Items.Add(dtrow["RaceCategoryGroupName"].ToString());
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 2
0
        private void PopulateCombobox()
        {
            try
            {
                raceCategory = new BIZ.RaceCategory();
                PopulateBusinessLayer(Common.Common.RaceResult.RaceCategory);

                //Race Schedule
                DataTable dtRaceCategory;
                DataTable dtRaceCategoryGroup;

                dtRaceCategory      = raceCategory.RaceCategoryGetByKey().Tables[0];
                dtRaceCategoryGroup = raceCategory.RaceCategoryGetByKey().Tables[1];

                if (dtRaceCategory.Rows.Count > 0)
                {
                    cmbCategory.Items.Add("All");
                    cmbCategoryGroup.Items.Add("All");
                    foreach (DataRow dtrow in dtRaceCategory.Rows)
                    {
                        cmbCategory.Items.Add(dtrow["Description"].ToString());
                    }
                }
                if (dtRaceCategoryGroup.Rows.Count > 0)
                {
                    foreach (DataRow dtrow in dtRaceCategoryGroup.Rows)
                    {
                        cmbCategoryGroup.Items.Add(dtrow["RaceCategoryGroupName"].ToString());
                    }
                }

                raceSchedule = new BIZ.RaceSchedule();
                PopulateBusinessLayer(Common.Common.RaceResult.RaceSchedule);

                DataTable dtRaceSchedule;
                dtRaceSchedule = raceSchedule.ScheduleSelectAll();
                if (dtRaceSchedule.Rows.Count > 0)
                {
                    foreach (DataRow dtrow in dtRaceSchedule.Rows)
                    {
                        cmbRaceSchedule.Items.Add(dtrow["Schedule Name"].ToString());
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(Common.Common.CustomError(ex.Message), "Error");
            }
        }
Exemplo n.º 3
0
 private void RaceCategorySelectAll()
 {
     try
     {
         RaceCategory = new BIZ.RaceCategory();
         PopulateBussinessLayer();
         RaceCategory.RaceCategorySelectAll(this.dataGridView1);
         if (this.dataGridView1.ColumnCount > 0)
         {
             this.dataGridView1.Columns[0].Visible = false;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(Common.Common.CustomError(ex.Message), "Error");
     }
 }
Exemplo n.º 4
0
 private void Save()
 {
     try
     {
         RaceCategory = new BIZ.RaceCategory();
         GetControlValue();
         PopulateBussinessLayer();
         if (RaceCategory.Save())
         {
             ClearControl();
             //this.txtLocationName.Focus();
             RaceCategorySelectAll();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(Common.Common.CustomError(ex.Message), "Error");
     }
 }
Exemplo n.º 5
0
 private void RaceCategoryDelete()
 {
     try
     {
         RaceCategory = new BIZ.RaceCategory();
         GetControlValue();
         if (RaceCategoryID > 0)
         {
             if ((MessageBox.Show("Are you sure! You would like to delete this record?", "Confirm", MessageBoxButtons.YesNo) == DialogResult.Yes))
             {
                 PopulateBussinessLayer();
                 RaceCategory.RaceCategoryDelete();
                 ClearControl();
                 RaceCategorySelectAll();
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(Common.Common.CustomError(ex.Message), "Error");
     }
 }
Exemplo n.º 6
0
        private void PopulateCombobox()
        {
            try
            {
                cmbGroupCategory.Items.Clear();
                cmbRaceCategory.Items.Clear();
                raceCategory = new BIZ.RaceCategory();
                PopulateBusinessLayer(Common.Common.RaceEntryClassType.RaceCategory);

                //Race Schedule
                DataTable dtRaceCategory;
                DataTable dtRaceCategoryGroup;

                dtRaceCategory      = raceCategory.RaceCategoryGetByKey().Tables[0];
                dtRaceCategoryGroup = raceCategory.RaceCategoryGetByKey().Tables[1];

                if (dtRaceCategory.Rows.Count > 0)
                {
                    foreach (DataRow dtrow in dtRaceCategory.Rows)
                    {
                        cmbRaceCategory.Items.Add(dtrow["Description"].ToString());
                    }
                }
                if (dtRaceCategoryGroup.Rows.Count > 0)
                {
                    foreach (DataRow dtrow in dtRaceCategoryGroup.Rows)
                    {
                        cmbGroupCategory.Items.Add(dtrow["RaceCategoryGroupName"].ToString());
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(Common.Common.CustomError(ex.Message), "Error");
            }
        }