Exemplo n.º 1
0
        private void SetRaceScheduleCategoryItems()
        {
            try
            {
                raceScheduleCategory = new BIZ.RaceScheduleCategory();
                GetControlValue();
                PopulateBusinessLayer(Common.Common.RaceResult.RaceScheduleCategory);

                //Race Schedule
                DataTable dtRaceScheduleCategory;
                dtRaceScheduleCategory = raceScheduleCategory.RaceScheduleCategoryGetByRaceSchedule();
                if (dtRaceScheduleCategory.Rows.Count > 0)
                {
                    cmbRaceScheduleCategory.Items.Clear();      //CLEAR ITEMS
                    foreach (DataRow dtrow in dtRaceScheduleCategory.Rows)
                    {
                        string release = dtrow["RaceReleasePointID"].ToString() + "-|| " + dtrow["Date Release"].ToString() + " | " + dtrow["LocationName"].ToString();
                        cmbRaceScheduleCategory.Items.Add(release);
                    }
                }
                ScheduleCategorySelectAll();
            }
            catch (Exception ex)
            {
                MessageBox.Show(Common.Common.CustomError(ex.Message), "Error");
            }
        }
Exemplo n.º 2
0
        private void SetRaceScheduleCategoryItems()
        {
            try
            {
                raceScheduleCategory = new BIZ.RaceScheduleCategory();
                GetControlValue();
                PopulateBusinessLayer(Common.Common.RingManagement.RaceScheduleCategory);

                //Race Schedule
                DataTable dtRaceScheduleCategory;
                dtRaceScheduleCategory = raceScheduleCategory.RaceScheduleCategoryGetByRaceSchedule();
                if (dtRaceScheduleCategory.Rows.Count > 0)
                {
                    cmbRaceScheduleCategory.Items.Clear();      //CLEAR ITEMS
                    foreach (DataRow dtrow in dtRaceScheduleCategory.Rows)
                    {
                        cmbRaceScheduleCategory.Items.Add(dtrow["Category Name"].ToString());
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(Common.Common.CustomError(ex.Message), "Error");
            }
        }
Exemplo n.º 3
0
 private void ScheduleCategorySelectAll()
 {
     try
     {
         scheduleCategory = new BIZ.RaceScheduleCategory();
         PopulateBussinessLayer();
         scheduleCategory.ScheduleCategorySelectAll(this.dataGridView1);
         DataGridViewCellStyle style = new DataGridViewCellStyle();
         style.Font = new Font(Font, FontStyle.Bold);
         dataGridView1.Columns[3].DefaultCellStyle = style;
         dataGridView1.Columns[4].DefaultCellStyle = style;
     }
     catch (Exception ex)
     {
         MessageBox.Show(Common.Common.CustomError(ex.Message), "Error");
     }
 }
Exemplo n.º 4
0
 private void ScheduleCategorySelectAll()
 {
     try
     {
         raceScheduleCategory = new BIZ.RaceScheduleCategory();
         PopulateBusinessLayer(Common.Common.RaceResult.RaceScheduleCategory);
         raceScheduleCategory.ScheduleCategorySelectAll(this.dataGridView2);
         DataGridViewCellStyle style = new DataGridViewCellStyle();
         style.Font = new Font(Font, FontStyle.Bold);
         dataGridView2.Columns[1].DefaultCellStyle = style;
         //dataGridView2.Columns[4].DefaultCellStyle = style;
         dataGridView2.Columns[0].Visible = false;
     }
     catch (Exception ex)
     {
         MessageBox.Show(Common.Common.CustomError(ex.Message), "Error");
     }
 }
Exemplo n.º 5
0
 private void SaveCategory()
 {
     try
     {
         raceScheduleCategory = new BIZ.RaceScheduleCategory();
         GetControlValue();
         PopulateBusinessLayer(Common.Common.RaceResult.RaceScheduleCategory);
         if (raceScheduleCategory.Save())
         {
             ClearControl();
             ScheduleCategorySelectAll();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(Common.Common.CustomError(ex.Message), "Error");
     }
 }
Exemplo n.º 6
0
 private void ScheduleCategoryDelete()
 {
     try
     {
         raceScheduleCategory = new BIZ.RaceScheduleCategory();
         GetControlValue();
         if ((MessageBox.Show("Are you sure! You would like to reset this record?", "Confirm", MessageBoxButtons.YesNo) == DialogResult.Yes))
         {
             PopulateBusinessLayer(Common.Common.RaceResult.RaceScheduleCategory);
             raceScheduleCategory.ScheduleCategoryDelete();
             ClearControl();
             ScheduleCategorySelectAll();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(Common.Common.CustomError(ex.Message), "Error");
     }
 }
Exemplo n.º 7
0
 private void Save()
 {
     try
     {
         scheduleCategory = new BIZ.RaceScheduleCategory();
         GetControlValue();
         PopulateBussinessLayer();
         if (scheduleCategory.Save())
         {
             ClearControl();
             this.txtScheduleCategoryName.Focus();
             ScheduleCategorySelectAll();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(Common.Common.CustomError(ex.Message), "Error");
     }
 }