private void LoadOfficeITAssets(string strOffice)
        {
            int intCounter;
            int intNumberOfRecords;

            TheFindCurrentITAssetsByOfficeDataSet = TheITAssetsClass.FindCurrentITAssetsByOffice(strOffice);
            TheReportedITAssetsDataSet.itassets.Rows.Clear();
            intNumberOfRecords = TheFindCurrentITAssetsByOfficeDataSet.FindCurrentITAssetsByOffice.Rows.Count - 1;

            if (intNumberOfRecords > -1)
            {
                for (intCounter = 0; intCounter <= intNumberOfRecords; intCounter++)
                {
                    ReportedITAssetsDataSet.itassetsRow NewAssetRow = TheReportedITAssetsDataSet.itassets.NewitassetsRow();

                    NewAssetRow.Item         = TheFindCurrentITAssetsByOfficeDataSet.FindCurrentITAssetsByOffice[intCounter].Item;
                    NewAssetRow.ItemID       = TheFindCurrentITAssetsByOfficeDataSet.FindCurrentITAssetsByOffice[intCounter].ItemID;
                    NewAssetRow.ItemQuantity = TheFindCurrentITAssetsByOfficeDataSet.FindCurrentITAssetsByOffice[intCounter].ItemQuantity;
                    NewAssetRow.Manufacturer = TheFindCurrentITAssetsByOfficeDataSet.FindCurrentITAssetsByOffice[intCounter].Manufacturer;
                    NewAssetRow.Model        = TheFindCurrentITAssetsByOfficeDataSet.FindCurrentITAssetsByOffice[intCounter].Model;
                    NewAssetRow.Office       = strOffice;
                    NewAssetRow.SerialNumber = TheFindCurrentITAssetsByOfficeDataSet.FindCurrentITAssetsByOffice[intCounter].SerialNumber;

                    TheReportedITAssetsDataSet.itassets.Rows.Add(NewAssetRow);
                }
            }

            dgrResults.ItemsSource = TheReportedITAssetsDataSet.itassets;
        }
Esempio n. 2
0
        public FindCurrentITAssetsByOfficeDataSet FindCurrentITAssetsByOffice(string strOffice)
        {
            try
            {
                aFindCurrentITAssetsByOfficeDataSet      = new FindCurrentITAssetsByOfficeDataSet();
                aFindCurrentITAssetsByOfficeTableAdapter = new FindCurrentITAssetsByOfficeDataSetTableAdapters.FindCurrentITAssetsByOfficeTableAdapter();
                aFindCurrentITAssetsByOfficeTableAdapter.Fill(aFindCurrentITAssetsByOfficeDataSet.FindCurrentITAssetsByOffice, strOffice);
            }
            catch (Exception Ex)
            {
                TheEventLogClass.InsertEventLogEntry(DateTime.Now, "IT Assets Class // Find Current IT Assets By Office " + Ex.Message);
            }

            return(aFindCurrentITAssetsByOfficeDataSet);
        }