Exemplo n.º 1
0
        private void dgrOpenTasks_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            DataGrid     dataGrid;
            DataGridRow  selectedRow;
            DataGridCell TaskID;
            string       strTaskID;

            try
            {
                if (dgrOpenTasks.SelectedIndex > -1)
                {
                    //setting local variable
                    dataGrid    = dgrOpenTasks;
                    selectedRow = (DataGridRow)dataGrid.ItemContainerGenerator.ContainerFromIndex(dataGrid.SelectedIndex);
                    TaskID      = (DataGridCell)dataGrid.Columns[2].GetCellContent(selectedRow).Parent;
                    strTaskID   = ((TextBlock)TaskID.Content).Text;

                    //find the record
                    MainWindow.gintAssignedTaskID = Convert.ToInt32(strTaskID);

                    UpdateSpecificTasks UpdateSpecificTasks = new UpdateSpecificTasks();
                    UpdateSpecificTasks.ShowDialog();

                    MainWindow.TheFindAssignedTasksByAssignedEmployeeIDDataSet = TheAssignedTaskClass.FindAssignedTasksByAssignedEmployeeID(MainWindow.TheVerifyLogonDataSet.VerifyLogon[0].EmployeeID);

                    dgrOpenTasks.ItemsSource = MainWindow.TheFindAssignedTasksByAssignedEmployeeIDDataSet.FindAssignedTasksByAssignedEmployeeID;
                }
            }
            catch (Exception Ex)
            {
                TheEventLogClass.InsertEventLogEntry(DateTime.Now, "Blue Jay ERP // Update Assigned Tasks // Grid Selection " + Ex.Message);

                TheMessagesClass.ErrorMessage(Ex.ToString());
            }
        }
Exemplo n.º 2
0
        private void rdoYes_Checked(object sender, RoutedEventArgs e)
        {
            bool blnFatalError = false;

            try
            {
                blnFatalError = TheAssignedTaskClass.UpdateAssignedTask(MainWindow.gintAssignedTaskID, DateTime.Now, false);

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

                UpdateSpecificTasks UpdateSpecificTasks = new UpdateSpecificTasks();
                UpdateSpecificTasks.ShowDialog();
            }
            catch (Exception Ex)
            {
                TheEventLogClass.InsertEventLogEntry(DateTime.Now, "Blue Jay ERP // View Task Information // Radio Yes Button " + Ex.Message);

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