//*******************************************************************
        // DESCRIPTION: Constructor for AddEditStatus that can only be called when an existing row in the datagrid of the EditRecord form is double-clicked.
        //              Does not pre-populate any fields aside from today's date.
        //              Sets isNewStatus to false.
        //
        // INPUT:       EditRecord editRecord: this is the parent EditRecord Window on which the "Add a status" button was clicked.
        //              DataRowView priorBySystemRow: this is the prioritizationBysystem row that contains the data used to query for & populate the parent EdiRecord form
        //              DataRowView statusDataRow: this is the row in EditRecord form that was double-clicked on to call this constructor and pre-populate this form.
        //*******************************************************************
        public EditRecord_AddEditStatus(EditRecord editRecord, int ID, DataRowView statusDataRow)
        {
            InitializeComponent();

            form      = editRecord;
            histRow   = statusDataRow;
            currentID = ID;
            isWeekly  = false;

            isNewStatus = false;
            DeleteIssueButton.Visibility = Visibility.Visible;

            Fill_HistoryStatusComboBox();

            HistoryStatusComboBox.SelectedValue = histRow["Status"].ToString();
            StatusNoteText.Text = histRow["Status_Note"].ToString();

            if (!DateTime.TryParse(histRow["EntryDate"].ToString(), out DateTime myDate))
            {
            }
            else
            {
                StatusDatePicker.SelectedDate = myDate;
            }
            Updated.Visibility = Visibility.Collapsed;
        }
        private EditRecord form;        //Holds the parent EditRecord window currently Open in the applicaiton, which will be updated once the status is added/edited



        //*******************************************************************
        // DESCRIPTION: Constructor for AddEditStatus that can only be called when "Add a Status" is clicked in the EditRecord form.
        //              Does not pre-populate any fields aside from today's date.
        //              Sets isNewStatus to true.
        //
        // INPUT:       EditRecord editRecord: this is the parent EditRecord Window on which the "Add a status" button was clicked.
        //              DataRowView priorBySystemRow: this is the prioritizationBysystem row that contains the data used to query for & populate the parent EdiRecord form
        //*******************************************************************
        public EditRecord_AddEditStatus(EditRecord editRecord, DataRowView priorBySystemRow)
        {
            InitializeComponent();

            form   = editRecord;
            pbsRow = priorBySystemRow;
            StatusDatePicker.SelectedDate = DateTime.Today;

            isNewStatus = true;

            Fill_HistoryStatusComboBox();
        }
        private int currentID;       //DataRowView variable that stores the row from the History data that is displayed on the edit form. It is sent here on row double-click.


        //*******************************************************************
        // DESCRIPTION: Constructor for AddEditStatus that can only be called when "Add a Status" is clicked in the EditRecord form.
        //              Does not pre-populate any fields aside from today's date.
        //              Sets isNewStatus to true.
        //
        // INPUT:       EditRecord editRecord: this is the parent EditRecord Window on which the "Add a status" button was clicked.
        //              DataRowView priorBySystemRow: this is the prioritizationBysystem row that contains the data used to query for & populate the parent EdiRecord form
        //*******************************************************************
        public EditRecord_AddEditStatus(EditRecord editRecord, int ID)
        {
            InitializeComponent();

            form      = editRecord;
            currentID = ID;
            StatusDatePicker.SelectedDate = DateTime.Today;
            isWeekly = false;

            isNewStatus = true;

            Fill_HistoryStatusComboBox();
            Updated.Visibility = Visibility.Collapsed;
        }
Exemple #4
0
        private void EditButton_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                //On Edit Button click, pulls the data from that row of the datagrid, and stores it as a DataRowView object
                cimBySystemRow = (DataRowView)((Button)e.Source).DataContext;

                // this PrioritizeBySystemPage, is being passed so it can be updated
                //cimBySystemRow is a DataRowView object containing the data from that row of PBS datagrid
                EditRecord editRecord = new EditRecord(this, arr, cimBySystemRow);
                editRecord.Show();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString());
            }
        }
        public void EditButton_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                //On Edit Button click, pulls the data from that row of the datagrid, and stores it as a DataRowView object
                priorBySystemRow = (DataRowView)((Button)e.Source).DataContext;

                //priorBySystemRow is a DataRowView object containing the data from that row of PBS datagrid
                EditRecord editRecord = new EditRecord(this, arr, priorBySystemRow);
                editRecord.Show();
                //MessageBox.Show(priorBySystemRow[1].ToString());
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString());
            }
        }
Exemple #6
0
        private void EditButton_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                //On Edit Button click, pulls the data from that row of the datagrid, and stores it as a DataRowView object
                priorBySystemRow = (DataRowView)((System.Windows.Controls.Button)e.Source).DataContext;
                List <int> IDList = Helper.FillIDList(ManagerTasksQuery());

                // this PrioritizeBySystemPage, is being passed so it can be updated
                //regionRow is a DataRowView object containing the data from that row of PBS datagrid
                EditRecord editRecord = new EditRecord(this, arr, priorBySystemRow, IDList);
                editRecord.Show();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString());
            }
        }
Exemple #7
0
        /*Name: Michael Figueroa
         * Function Name: EditButton_Click
         * Purpose: Event handler for edit button click
         * Parameters: Auto-generated
         * Return Value: None
         * Local Variables: DataRowView agingItemsRow
         * Algorithm: The DataRow in which the Edit button was clicked is retrieved, and the EditRecord form is opened using that DataRowView in the constructor
         * Version: 2.0.0.4
         * Date modified: Prior to 1/1/20 - This method will be simplified by Mike at a later date
         * Assistance Received: N/A
         */
        private void EditButton_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                //On Edit Button click, pulls the data from that row of the datagrid, and stores it as a DataRowView object
                BusinessCasesRow = (DataRowView)((Button)e.Source).DataContext;
                List <int> IDList = Helper.FillIDList(reportQuery);

                // this PrioritizeBySystemPage, is being passed so it can be updated
                //priorBySystemRow is a DataRowView object containing the data from that row of PBS datagrid
                EditRecord editRecord = new EditRecord(this, arr, BusinessCasesRow, IDList);
                editRecord.FormLabel.Text = "Business Cases";
                editRecord.Show();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString());
            }
        }
        //opens edit record form so the user can edit their items that are about to age
        private void AgingButton_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                //On Edit Button click, pulls the data from that row of the datagrid, and stores it as a DataRowView object
                DataTable closeToAging = ReportHelper.FillAgingOwnerSpecific(arr[2]);
                DataView  viewAging    = closeToAging.DefaultView;
                reportRow = viewAging[0];
                List <int> IDArray = Helper.FillIDList(ReportHelper.OwnerAgingQuery(arr[2]));

                // this PrioritizeBySystemPage, is being passed so it can be updated
                //priorBySystemRow is a DataRowView object containing the data from that row of PBS datagrid
                EditRecord editRecord = new EditRecord(arr, reportRow, IDArray);
                editRecord.Show();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString());
            }
        }
        //*******************************************************************
        // DESCRIPTION: Constructor for AddEditStatus that can only be called when an existing row in the datagrid of the EditRecord form is double-clicked.
        //              Does not pre-populate any fields aside from today's date.
        //              Sets isNewStatus to false.
        //
        // INPUT:       EditRecord editRecord: this is the parent EditRecord Window on which the "Add a status" button was clicked.
        //              DataRowView priorBySystemRow: this is the prioritizationBysystem row that contains the data used to query for & populate the parent EdiRecord form
        //              DataRowView statusDataRow: this is the row in EditRecord form that was double-clicked on to call this constructor and pre-populate this form.
        //*******************************************************************
        public EditRecord_AddEditStatus(EditRecord editRecord, DataRowView priorBySystemRow, DataRowView statusDataRow)
        {
            InitializeComponent();

            form    = editRecord;
            pbsRow  = priorBySystemRow;
            histRow = statusDataRow;

            isNewStatus = false;

            Fill_HistoryStatusComboBox();

            HistoryStatusComboBox.SelectedValue = histRow["Status"].ToString();
            StatusNoteText.Text = histRow["Status_Note"].ToString();

            if (!DateTime.TryParse(histRow["EntryDate"].ToString(), out DateTime myDate))
            {
            }
            else
            {
                StatusDatePicker.SelectedDate = myDate;
            }
        }