Example #1
0
        private void showQuoteForm(DateTime?sop, DateTime?eop, int?rowID)
        {
            QuoteLogGrid.Forms.formChooseQuoteType chooseQuote = new QuoteLogGrid.Forms.formChooseQuoteType();
            if (chooseQuote.ShowDialog() == DialogResult.OK)
            {
                //qmc = new QuoteMaintenanceController(_quoteNumber, sop, eop, rowID, chooseQuote.QuoteType);

                formQuoteMaintenance quoteMaintenance = new formQuoteMaintenance(_quoteNumber, sop, eop, rowID, chooseQuote.QuoteType);
                if (quoteMaintenance.ShowDialog() == DialogResult.OK)
                {
                    if (quoteMaintenance.IsSaved)
                    {
                        // Refresh grid
                        if (chooseQuote.QuoteType == QuoteTypes.ModifyExisting)
                        {
                            ReloadSingleQuoteLogEntity();
                        }
                        else
                        {
                            ReloadAllQuoteLogEntities();
                        }
                    }
                }


                //QuoteLogGrid.Forms.formQuoteMaintenance form = new QuoteLogGrid.Forms.formQuoteMaintenance(quoteNumber, sop, eop, rowID, chooseQuote.QuoteType);
                //if (form.IsDisposed) return;
                //if (form.ShowDialog() == DialogResult.OK)
                //{
                //    //if(form._IsSavedOnce) RefreshGrid();
                //}
            }
        }
Example #2
0
        private void showQuoteForm(DateTime?sop, DateTime?eop, int?rowID)
        {
            QuoteLogGrid.Forms.formChooseQuoteType chooseQuote = new QuoteLogGrid.Forms.formChooseQuoteType();
            if (chooseQuote.ShowDialog() == DialogResult.OK)
            {
                //qmc = new QuoteMaintenanceController(_quoteNumber, sop, eop, rowID, chooseQuote.QuoteType);

                formQuoteMaintenance quoteMaintenance = new formQuoteMaintenance(_quoteNumber, sop, eop, rowID, chooseQuote.QuoteType, _customer,
                                                                                 _customerRfqNumber, _customerPartNumber, _eeiPartNumber, _notes, _oem, _applicationCode, _applicationName, _functionName,
                                                                                 _eau, _program, _nameplate, _programManagerInitials, _engineeringInitials, _salesInitials, _engineeringMaterialsInitials,
                                                                                 _quoteReviewInitials, _quotePricingInitials, _customerQuoteInitials, _modelYear, _packageNumber, _quoteReason,
                                                                                 _productLine, _printFilePath, _customerQuoteFilePath, _marketSegment, _marketSubsegment, _minimumOrderQuantity,
                                                                                 _awarded, _awardedDate, _straightMaterialCost, _stdHours, _tooling, _quotePrice, _prototypePrice);

                if (quoteMaintenance.ShowDialog() == DialogResult.OK)
                {
                    if (quoteMaintenance.IsSaved)
                    {
                        // Show Lighting Study form
                        var lighting = new formLightingData();
                        lighting.QuoteNumber = _quoteNumber;
                        lighting.ShowDialog();
                    }
                    if (quoteMaintenance.IsSaved || quoteMaintenance.PrintSaved)
                    {
                        // Refresh grid
                        if (chooseQuote.QuoteType == QuoteTypes.ModifyExisting)
                        {
                            ReloadSingleQuoteLogEntity();
                        }
                        else
                        {
                            ReloadAllQuoteLogEntities();
                        }
                    }
                }


                //QuoteLogGrid.Forms.formQuoteMaintenance form = new QuoteLogGrid.Forms.formQuoteMaintenance(quoteNumber, sop, eop, rowID, chooseQuote.QuoteType);
                //if (form.IsDisposed) return;
                //if (form.ShowDialog() == DialogResult.OK)
                //{
                //    //if(form._IsSavedOnce) RefreshGrid();
                //}
            }
        }