Esempio n. 1
0
        public FindProjectProductionCostsByProjectIDDataSet FindProjectProductionCostsByProjectID(int intProjectID)
        {
            try
            {
                aFindProjectProductionCostsByProjectIDDataSet      = new FindProjectProductionCostsByProjectIDDataSet();
                aFindProjectProductionCostsByProjectIDTableAdapter = new FindProjectProductionCostsByProjectIDDataSetTableAdapters.FindProjectProductionCostsByProjectIDTableAdapter();
                aFindProjectProductionCostsByProjectIDTableAdapter.Fill(aFindProjectProductionCostsByProjectIDDataSet.FindProjectProductionCostsByProjectID, intProjectID);
            }
            catch (Exception Ex)
            {
                TheEventLogClass.InsertEventLogEntry(DateTime.Now, "Employee Project Assignment Class // Find Production Project Costs By Project ID " + Ex.Message);
            }

            return(aFindProjectProductionCostsByProjectIDDataSet);
        }
Esempio n. 2
0
        private void btnFindProduction_Click(object sender, RoutedEventArgs e)
        {
            string strProjectID;
            int    intProjectID = 0;
            int    intLength;
            int    intRecordsReturned;

            try
            {
                strProjectID = txtEnterProjectID.Text;

                TheFindProjectMatrixByAssignedProjectIDDataSet = TheProjectMatrixClass.FindProjectMatrixByAssignedProjectID(strProjectID);

                intRecordsReturned = TheFindProjectMatrixByAssignedProjectIDDataSet.FindProjectMatrixByAssignedProjectID.Rows.Count;

                if (intRecordsReturned < 1)
                {
                    TheFindProjectmatrixByCustomerProjectIDDataSet = TheProjectMatrixClass.FindProjectMatrixByCustomerProjectID(strProjectID);

                    intRecordsReturned = TheFindProjectmatrixByCustomerProjectIDDataSet.FindProjectMatrixByCustomerProjectID.Rows.Count;

                    if (intRecordsReturned < 1)
                    {
                        TheMessagesClass.ErrorMessage("Project Not Found");
                        return;
                    }

                    intProjectID = TheFindProjectmatrixByCustomerProjectIDDataSet.FindProjectMatrixByCustomerProjectID[0].ProjectID;
                }
                else if (intRecordsReturned > 0)
                {
                    intProjectID = TheFindProjectMatrixByAssignedProjectIDDataSet.FindProjectMatrixByAssignedProjectID[0].ProjectID;
                }

                TheFindProductionCostsByProjectIDDataSet = TheEmployeeProjectAssignmentClass.FindProjectProductionCostsByProjectID(intProjectID);

                dgrProduction.ItemsSource = TheFindProductionCostsByProjectIDDataSet.FindProjectProductionCostsByProjectID;
            }
            catch (Exception Ex)
            {
                TheEventLogClass.InsertEventLogEntry(DateTime.Now, "New Blue Jay ERP // Project Management Report // Find Production Button " + Ex.Message);

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