private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            //loading the combo box
            int intCounter;
            int intNumberOfRecords;

            try
            {
                TheFindSortedToolCategoryDataSet = TheToolCategoryClass.FindSortedToolCategory();

                intNumberOfRecords = TheFindSortedToolCategoryDataSet.FindSortedToolCategory.Rows.Count - 1;
                cboSelectToolCategory.Items.Clear();
                cboSelectToolCategory.Items.Add("Select Tool Category");

                for (intCounter = 0; intCounter <= intNumberOfRecords; intCounter++)
                {
                    cboSelectToolCategory.Items.Add(TheFindSortedToolCategoryDataSet.FindSortedToolCategory[intCounter].ToolCategory);
                }

                cboSelectToolCategory.SelectedIndex = 0;
            }
            catch (Exception Ex)
            {
                TheEventLogClass.InsertEventLogEntry(DateTime.Now, "Blue Jay ERP // Add Vehicle Bulk Tools // Window Loaded " + Ex.Message);

                TheMessagesClass.ErrorMessage(Ex.ToString());
            }
        }
示例#2
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            int    intNumberOfRecords;
            int    intCounter;
            string strAsseetCategory;
            int    intSelectedIndex;

            try
            {
                gblnUploaded = false;

                TheFindSortedToolCategoryDataSet = TheToolCategoryClass.FindSortedToolCategory();

                cboAssetCategory.Items.Add("Select Category");

                intNumberOfRecords = TheFindSortedToolCategoryDataSet.FindSortedToolCategory.Rows.Count;

                for (intCounter = 0; intCounter < intNumberOfRecords; intCounter++)
                {
                    cboAssetCategory.Items.Add(TheFindSortedToolCategoryDataSet.FindSortedToolCategory[intCounter].ToolCategory);
                }

                cboAssetCategory.SelectedIndex = 0;

                TheFindWaspAssetByAssetIDDataSet = TheAssetClass.FindWaspAssetByAssetID(MainWindow.gintAssetID);

                txtAssetID.Text     = Convert.ToString(MainWindow.gintAssetID);
                txtDescription.Text = TheFindWaspAssetByAssetIDDataSet.FindWaspAssetByAssetID[0].AssetDescription;
                txtBJCAssetID.Text  = TheFindWaspAssetByAssetIDDataSet.FindWaspAssetByAssetID[0].BJCAssetID;
                strAsseetCategory   = TheFindWaspAssetByAssetIDDataSet.FindWaspAssetByAssetID[0].AssetCategory;

                for (intCounter = 0; intCounter < intNumberOfRecords; intCounter++)
                {
                    if (strAsseetCategory == TheFindSortedToolCategoryDataSet.FindSortedToolCategory[intCounter].ToolCategory)
                    {
                        cboAssetCategory.SelectedIndex = intCounter + 1;
                    }
                }

                txtSite.Text         = TheFindWaspAssetByAssetIDDataSet.FindWaspAssetByAssetID[0].AssetSite;
                txtLocation.Text     = TheFindWaspAssetByAssetIDDataSet.FindWaspAssetByAssetID[0].AssetLocation;
                txtWarehouseID.Text  = Convert.ToString(TheFindWaspAssetByAssetIDDataSet.FindWaspAssetByAssetID[0].WarehouseID);
                txtDate.Text         = Convert.ToString(TheFindWaspAssetByAssetIDDataSet.FindWaspAssetByAssetID[0].TransactionDate);
                txtSerialNo.Text     = TheFindWaspAssetByAssetIDDataSet.FindWaspAssetByAssetID[0].SerialNumber;
                txtManufacturer.Text = TheFindWaspAssetByAssetIDDataSet.FindWaspAssetByAssetID[0].Manufacturer;
                txtModel.Text        = TheFindWaspAssetByAssetIDDataSet.FindWaspAssetByAssetID[0].Model;

                TheEmployeeDateEntryClass.InsertIntoEmployeeDateEntry(MainWindow.TheVerifyLogonDataSet.VerifyLogon[0].EmployeeID, "New Blue Jay ERP // Edit Wasp Asset");

                gblnUploaded    = true;
                gblnNewCategory = false;
            }
            catch (Exception Ex)
            {
                TheEventLogClass.InsertEventLogEntry(DateTime.Now, "New Blue Jay ERP // Edit Wasp Asset // Window Loaded Method " + Ex.Message);

                TheMessagesClass.ErrorMessage(Ex.ToString());
            }
        }
示例#3
0
        private void ResetControls()
        {
            int  intCounter;
            int  intNumberOfRecords;
            bool blnFatalError = false;

            try
            {
                blnFatalError = TheEmployeeDataEntryClass.InsertIntoEmployeeDateEntry(MainWindow.TheVerifyLogonDataSet.VerifyLogon[0].EmployeeID, "New Blue Jay ERP // Add New Tool");

                if (blnFatalError == true)
                {
                    throw new Exception();
                }

                txtToolCost.Text        = "";
                txtToolDescription.Text = "";
                txtToolID.Text          = "";
                txtToolPartNumber.Text  = "";

                TheFindSortedToolCategoryDataSet = TheToolCategoryClass.FindSortedToolCategory();

                cboSelectToolCategory.Items.Clear();
                cboSelectToolCategory.Items.Add("Select Tool Category");

                intNumberOfRecords = TheFindSortedToolCategoryDataSet.FindSortedToolCategory.Rows.Count;

                for (intCounter = 0; intCounter < intNumberOfRecords; intCounter++)
                {
                    cboSelectToolCategory.Items.Add(TheFindSortedToolCategoryDataSet.FindSortedToolCategory[intCounter].ToolCategory);
                }

                cboSelectToolCategory.SelectedIndex = 0;

                TheFindWarehousesDataSet = TheEmployeeClass.FindWarehouses();

                cboSelectWarehouse.Items.Clear();
                cboSelectWarehouse.Items.Add("Select Warehouse");

                intNumberOfRecords = TheFindWarehousesDataSet.FindWarehouses.Rows.Count;

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

                cboSelectWarehouse.SelectedIndex = 0;
            }
            catch (Exception Ex)
            {
                TheEventLogClass.InsertEventLogEntry(DateTime.Now, "New Blue Jay ERP // Add New Tools // Reset Controls " + Ex.Message);

                TheSendEmailClass.SendEventLog(Ex.ToString());

                TheMessagesClass.ErrorMessage(Ex.ToString());
            }
        }
        private void expProcess_Expanded(object sender, RoutedEventArgs e)
        {
            int    intCounter;
            int    intNumberOfRecords;
            int    intCategoryID;
            int    intRecordsReturned;
            string strCategory;
            bool   blnFatalError = false;

            try
            {
                expProcess.IsExpanded = false;

                TheFindSortedToolCategoryDataSet = TheToolCategoryClass.FindSortedToolCategory();

                intNumberOfRecords = TheFindSortedToolCategoryDataSet.FindSortedToolCategory.Rows.Count;

                for (intCounter = 0; intCounter < intNumberOfRecords; intCounter++)
                {
                    intCategoryID = TheFindSortedToolCategoryDataSet.FindSortedToolCategory[intCounter].CategoryID;
                    strCategory   = TheFindSortedToolCategoryDataSet.FindSortedToolCategory[intCounter].ToolCategory;

                    TheFindToolIDByCategoryDataSet = TheToolIDClass.FindToolIDByCategory(strCategory);

                    intRecordsReturned = TheFindToolIDByCategoryDataSet.FindToolIDByCategory.Rows.Count;

                    if (intRecordsReturned < 1)
                    {
                        blnFatalError = TheToolIDClass.InsertNewToolIDForToolType(intCategoryID, "1000");

                        if (blnFatalError == true)
                        {
                            throw new Exception();
                        }
                    }
                }

                TheMessagesClass.InformationMessage("The Categories have been updated");

                TheToolIDDataSet = TheToolIDClass.GetToolIDInfo();

                dgrToolIDs.ItemsSource = TheToolIDDataSet.toolid;
            }
            catch (Exception Ex)
            {
                TheSendEmailClass.SendEventLog("New Blue Jay ERP // Add Tool Category ID // Process Button " + Ex.Message);

                TheEventLogClass.InsertEventLogEntry(DateTime.Now, "New Blue Jay ERP // Add Tool Category ID // Process Button " + Ex.Message);

                TheMessagesClass.ErrorMessage(Ex.ToString());
            }
        }
示例#5
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            //setting local variables
            int intCounter;
            int intNumberOfRecords;

            try
            {
                MainWindow.TheFindWarehousesDataSet = TheEmployeeClass.FindWarehouses();

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

                cboSelectWarehouse.Items.Add("Select Warehouse");

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

                cboSelectWarehouse.SelectedIndex = 0;

                TheFindSortedToolCategoryDataSet = TheToolCategoryClass.FindSortedToolCategory();

                intNumberOfRecords = TheFindSortedToolCategoryDataSet.FindSortedToolCategory.Rows.Count - 1;

                cboToolCategory.Items.Add("Select Tool Category");

                for (intCounter = 0; intCounter <= intNumberOfRecords; intCounter++)
                {
                    cboToolCategory.Items.Add(TheFindSortedToolCategoryDataSet.FindSortedToolCategory[intCounter].ToolCategory);
                }

                cboToolCategory.SelectedIndex = 0;
            }
            catch (Exception Ex)
            {
                TheEventLogClass.InsertEventLogEntry(DateTime.Now, "Blue Jay ERP // Create Tool // Window Loaded " + Ex.Message);

                TheMessagesClass.ErrorMessage(Ex.ToString());
            }
        }
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            int intCounter;
            int intNumberOfRecords;

            TheFindAvailableActiveToolsDataSet = TheToolsClass.FindAvailableActiveTools();

            dgrResults.ItemsSource = TheFindAvailableActiveToolsDataSet.FindAvailableActiveTools;

            TheFindSortedToolCategoryDataSet = TheToolCategoryClass.FindSortedToolCategory();

            intNumberOfRecords = TheFindSortedToolCategoryDataSet.FindSortedToolCategory.Rows.Count - 1;

            cboSelectCategory.Items.Add("Select Tool Category");
            cboSelectCategory.Items.Add("All Tool Categories");

            for (intCounter = 0; intCounter <= intNumberOfRecords; intCounter++)
            {
                cboSelectCategory.Items.Add(TheFindSortedToolCategoryDataSet.FindSortedToolCategory[intCounter].ToolCategory);
            }

            cboSelectCategory.SelectedIndex = 0;
        }
示例#7
0
        private void ResetForm()
        {
            int intCounter;
            int intNumberOfRecords;

            cboSelectCategory.Items.Clear();

            cboSelectCategory.Items.Add("Select Category");

            TheFindSortedToolCategoryDataSet = TheToolCategoryClass.FindSortedToolCategory();

            intNumberOfRecords = TheFindSortedToolCategoryDataSet.FindSortedToolCategory.Rows.Count - 1;

            for (intCounter = 0; intCounter <= intNumberOfRecords; intCounter++)
            {
                cboSelectCategory.Items.Add(TheFindSortedToolCategoryDataSet.FindSortedToolCategory[intCounter].ToolCategory);
            }

            TheFindToolsByCategoryDataSet = TheToolsClass.FindToolsByCategory("");

            dgrTools.ItemsSource = TheFindToolsByCategoryDataSet.FindToolsByCategory;

            cboSelectCategory.SelectedIndex = 0;
        }
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            //setting up local variables
            DateTime datTransactionDate = DateTime.Now;
            int      intNumberOfRecords;
            int      intCounter;
            int      intTransactionID;
            int      intAssetID;
            bool     blnFatalError = false;
            string   strSite;

            try
            {
                TheWaspAssetIDDataSet = TheAssetClass.GetWaspAssetIDInfo();
                chkIsTool.IsChecked   = false;

                intAssetID       = TheWaspAssetIDDataSet.waspassetid[0].CreatedAssetID;
                intTransactionID = TheWaspAssetIDDataSet.waspassetid[0].TransactionID;

                MainWindow.gintAssetID = intAssetID;
                intAssetID++;
                txtAssetID.Text = Convert.ToString(MainWindow.gintAssetID);
                txtDate.Text    = Convert.ToString(datTransactionDate);

                blnFatalError = TheAssetClass.UpdateWaspAssetID(intTransactionID, intAssetID);

                txtLocation.Text = MainWindow.gstrAssetLocation;

                TheFindWaspAssetLocationByLoctionDataSet = TheAssetClass.FindWaspAssetLocationByLocation(MainWindow.gstrAssetLocation);

                strSite      = TheFindWaspAssetLocationByLoctionDataSet.FindWaspAssetLocationByLocation[0].AssetSite;
                txtSite.Text = strSite;

                if (strSite == "GROVEPORT")
                {
                    strSite = "CBUS-GROVEPORT";
                }

                TheFindWarehouseByWarehouseNameDataSet = TheEmployeeClass.FindWarehouseByWarehouseName(strSite);

                MainWindow.gintWarehouseID = TheFindWarehouseByWarehouseNameDataSet.FindWarehouseByWarehouseName[0].EmployeeID;

                txtWarehouseID.Text = Convert.ToString(MainWindow.gintWarehouseID);

                TheFindSortedToolCategoryDataSet = TheToolCategoryClass.FindSortedToolCategory();

                cboAssetCategory.Items.Add("Select Category");

                intNumberOfRecords = TheFindSortedToolCategoryDataSet.FindSortedToolCategory.Rows.Count;

                for (intCounter = 0; intCounter < intNumberOfRecords; intCounter++)
                {
                    cboAssetCategory.Items.Add(TheFindSortedToolCategoryDataSet.FindSortedToolCategory[intCounter].ToolCategory);
                }

                cboAssetCategory.SelectedIndex = 0;

                txtSerialNo.Text     = "UNKNOWN";
                txtModel.Text        = "UNKNOWN";
                txtManufacturer.Text = "UNKNOWN";
            }
            catch (Exception Ex)
            {
                TheSendEmailClass.SendEventLog("New Blue Jay ERP // Add Wasp Asset // Window Loaded Method " + Ex.Message);

                TheEventLogClass.InsertEventLogEntry(DateTime.Now, "New Blue Jay ERP // Add Wasp Asset // Window Loaded Method " + Ex.Message);

                TheMessagesClass.ErrorMessage(Ex.ToString());
            }
        }
示例#9
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            //this will load up the controls
            int    intCounter;
            int    intNumberOfRecords;
            int    intRecordsReturned;
            string strCategory;

            try
            {
                TheFindSortedToolCategoryDataSet = TheToolCategoryClass.FindSortedToolCategory();
                gblnItemEntered = false;

                intNumberOfRecords = TheFindSortedToolCategoryDataSet.FindSortedToolCategory.Rows.Count;
                cboSelectToolCategory.Items.Clear();
                cboSelectToolCategory.Items.Add("Select Tool Category");

                cboSelectEmployee.Items.Clear();

                for (intCounter = 0; intCounter < intNumberOfRecords; intCounter++)
                {
                    cboSelectToolCategory.Items.Add(TheFindSortedToolCategoryDataSet.FindSortedToolCategory[intCounter].ToolCategory);
                }

                cboSelectToolCategory.SelectedIndex = 0;

                txtAssetID.Text         = Convert.ToString(MainWindow.gintAssetID);
                txtSite.Text            = ImportToolSheets.gstrSite;
                txtLocation.Text        = ImportToolSheets.gstrLocation;
                txtBJCAssetID.Text      = ImportToolSheets.gstrBJCAssetID;
                txtLastName.Text        = ImportToolSheets.gstrLastName;
                txtToolDescription.Text = ImportToolSheets.gstrToolDescription;

                TheFindActiveToolByToolIDDataSet = TheToolClass.FindActiveToolByToolID(ImportToolSheets.gstrBJCAssetID);

                intRecordsReturned = TheFindActiveToolByToolIDDataSet.FindActiveToolByToolID.Rows.Count;

                if (intRecordsReturned > 0)
                {
                    intNumberOfRecords = TheFindSortedToolCategoryDataSet.FindSortedToolCategory.Rows.Count;

                    for (intCounter = 0; intCounter < intNumberOfRecords; intCounter++)
                    {
                        strCategory = TheFindActiveToolByToolIDDataSet.FindActiveToolByToolID[0].ToolCategory;

                        if (strCategory == TheFindSortedToolCategoryDataSet.FindSortedToolCategory[intCounter].ToolCategory)
                        {
                            cboSelectToolCategory.SelectedIndex = intCounter + 1;
                            txtPartNumber.Text      = "NOT NEEDED";
                            gblnItemEntered         = true;
                            txtToolNotes.Text       = TheFindActiveToolByToolIDDataSet.FindActiveToolByToolID[0].ToolNotes;
                            txtToolDescription.Text = TheFindActiveToolByToolIDDataSet.FindActiveToolByToolID[0].ToolDescription;
                            MainWindow.gintToolKey  = TheFindActiveToolByToolIDDataSet.FindActiveToolByToolID[0].ToolKey;
                        }
                    }
                }
            }
            catch (Exception Ex)
            {
                TheEventLogClass.InsertEventLogEntry(DateTime.Now, "New Blue Jay ERP // Assign Tool Asset // Window Loaded Method " + Ex.Message);

                TheMessagesClass.ErrorMessage(Ex.ToString());
            }
        }