Beispiel #1
0
        public FindEmployeeLaborByTransactionIDDataSet FindEmployeeLaborByTransactionID(int intTransactionID)
        {
            try
            {
                aFindEmployeeLaborByTransactionIDDataSet      = new FindEmployeeLaborByTransactionIDDataSet();
                aFindEmployeeLaborByTransactionIDTableAdapter = new FindEmployeeLaborByTransactionIDDataSetTableAdapters.FindEmployeeLaborByTransactionIDTableAdapter();
                aFindEmployeeLaborByTransactionIDTableAdapter.Fill(aFindEmployeeLaborByTransactionIDDataSet.FindEmployeeLaborByTransactionID, intTransactionID);
            }
            catch (Exception Ex)
            {
                TheEventLogClass.InsertEventLogEntry(DateTime.Now, "Employee Project Assignment Class // Find Employee Labor By Transaction ID " + Ex.Message);
            }

            return(aFindEmployeeLaborByTransactionIDDataSet);
        }
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            int      intEmployeeID;
            int      intProjectID;
            int      intWorkTaskID;
            DateTime datTransactionDate;

            try
            {
                TheFindEmployeeLaborByTransactionIDDataSet = TheEmployeeProjectAssignmentClass.FindEmployeeLaborByTransactionID(MainWindow.gintTransactionID);

                txtAssignedProjectID.Text = TheFindEmployeeLaborByTransactionIDDataSet.FindEmployeeLaborByTransactionID[0].AssignedProjectID;
                txtDate.Text        = Convert.ToString(TheFindEmployeeLaborByTransactionIDDataSet.FindEmployeeLaborByTransactionID[0].TransactionDate);
                txtFirstName.Text   = TheFindEmployeeLaborByTransactionIDDataSet.FindEmployeeLaborByTransactionID[0].FirstName;
                txtLastName.Text    = TheFindEmployeeLaborByTransactionIDDataSet.FindEmployeeLaborByTransactionID[0].LastName;
                txtProjectName.Text = TheFindEmployeeLaborByTransactionIDDataSet.FindEmployeeLaborByTransactionID[0].ProjectName;
                txtWorkTask.Text    = TheFindEmployeeLaborByTransactionIDDataSet.FindEmployeeLaborByTransactionID[0].WorkTask;
                txtHours.Text       = Convert.ToString(TheFindEmployeeLaborByTransactionIDDataSet.FindEmployeeLaborByTransactionID[0].TotalHours);

                //getting ready for the the footage
                intEmployeeID      = TheFindEmployeeLaborByTransactionIDDataSet.FindEmployeeLaborByTransactionID[0].EmployeeID;
                intProjectID       = TheFindEmployeeLaborByTransactionIDDataSet.FindEmployeeLaborByTransactionID[0].ProjectID;
                intWorkTaskID      = TheFindEmployeeLaborByTransactionIDDataSet.FindEmployeeLaborByTransactionID[0].WorkTaskID;
                datTransactionDate = TheFindEmployeeLaborByTransactionIDDataSet.FindEmployeeLaborByTransactionID[0].TransactionDate;

                TheFindProjectWorkTaskDataSet = TheProjectTaskClass.FindProjectWorkTask(intProjectID, intEmployeeID, intWorkTaskID, datTransactionDate, datTransactionDate);

                txtFootage.Text = Convert.ToString(TheFindProjectWorkTaskDataSet.FindProjectWorkTask[0].FootagePieces);

                gintWorkTaskTransactionID = TheFindProjectWorkTaskDataSet.FindProjectWorkTask[0].TransactionID;
            }
            catch (Exception Ex)
            {
                TheEventLogClass.InsertEventLogEntry(DateTime.Now, "Blue Jay ERP // Edit Selected Labor Transaction // Window Loaded " + Ex.Message);

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