コード例 #1
0
        private void LoadCategoryCombo()
        {
            int intCounter;
            int intNumberOfRecords;

            try
            {
                TheFindSortedTrailerCategoryDataSet = TheTrailerCategoryClass.FindSortedTrailerCategory();

                intNumberOfRecords = TheFindSortedTrailerCategoryDataSet.FindSortedTrailerCategory.Rows.Count - 1;
                cboTrailerCategory.Items.Clear();
                cboTrailerCategory.Items.Add("Select Trailer Type");

                for (intCounter = 0; intCounter <= intNumberOfRecords; intCounter++)
                {
                    cboTrailerCategory.Items.Add(TheFindSortedTrailerCategoryDataSet.FindSortedTrailerCategory[intCounter].TrailerCategory);
                }

                cboTrailerCategory.SelectedIndex = 0;
            }
            catch (Exception Ex)
            {
                TheEventLogClass.InsertEventLogEntry(DateTime.Now, "Blue Jay ERP // Add Trailers // Load Category Combo " + Ex.Message);

                TheMessagesClass.ErrorMessage(Ex.ToString());
            }
        }
コード例 #2
0
        public FindSortedTrailerCategoryDataSet FindSortedTrailerCategory()
        {
            try
            {
                aFindSortedTrailerCategoryDataSet      = new FindSortedTrailerCategoryDataSet();
                aFindSortedTrailerCategoryTableAdapter = new FindSortedTrailerCategoryDataSetTableAdapters.FindSortedTrailerCategoryTableAdapter();
                aFindSortedTrailerCategoryTableAdapter.Fill(aFindSortedTrailerCategoryDataSet.FindSortedTrailerCategory);
            }
            catch (Exception Ex)
            {
                TheEventLogclass.InsertEventLogEntry(DateTime.Now, "Trailer Category Class // Find Sorted Trailer Category " + Ex.Message);
            }

            return(aFindSortedTrailerCategoryDataSet);
        }
コード例 #3
0
        private void ResetControls()
        {
            int intCounter;
            int intNumberOfRecords;

            //resetting combo boxes
            cboLocation.Items.Clear();
            cboLocation.Items.Add("Select Warehouse");

            MainWindow.TheFindWarehousesDataSet = TheEmployeeClass.FindWarehouses();

            intNumberOfRecords = MainWindow.TheFindWarehousesDataSet.FindWarehouses.Rows.Count - 1;

            for (intCounter = 0; intCounter <= intNumberOfRecords; intCounter++)
            {
                cboLocation.Items.Add(MainWindow.TheFindWarehousesDataSet.FindWarehouses[intCounter].FirstName);
            }

            cboLocation.SelectedIndex = 0;

            cboTrailerCategory.Items.Clear();
            cboTrailerCategory.Items.Add("Select Trailer Type");

            TheFindSortedTrailerCategoryDataSet = TheTrailerCategoryClass.FindSortedTrailerCategory();

            intNumberOfRecords = TheFindSortedTrailerCategoryDataSet.FindSortedTrailerCategory.Rows.Count - 1;

            for (intCounter = 0; intCounter <= intNumberOfRecords; intCounter++)
            {
                cboTrailerCategory.Items.Add(TheFindSortedTrailerCategoryDataSet.FindSortedTrailerCategory[intCounter].TrailerCategory);
            }

            cboActive.Items.Clear();
            cboActive.Items.Add("Select Active");
            cboActive.Items.Add("Yes");
            cboActive.Items.Add("No");
            cboActive.SelectedIndex          = 0;
            cboTrailerCategory.SelectedIndex = 0;

            //clearing text boxes
            txtEnterTrailerNumber.Text = "";
            txtLicensePlate.Text       = "";
            txtTrailerDescription.Text = "";
            txtTrailerNotes.Text       = "";
            txtVINNumber.Text          = "";
            txtTrailerID.Text          = "";
            txtEnterTrailerNumber.Focus();
        }