Example #1
0
        public string GetNewBomModificationQuoteNumber(string quoteNumber, out string errorMessage)
        {
            errorMessage = "";
            ObjectParameter NewQuoteNumber = new ObjectParameter("NewQuoteNumber", typeof(string));

            try
            {
                _context.usp_QT_GetBOMModificationQuoteNumber(quoteNumber, NewQuoteNumber);
                return(NewQuoteNumber.Value.ToString());
            }
            catch (Exception ex)
            {
                errorMessage = "Failed to create a new Quote Number for BOM modification.";
            }
            return("");
        }
Example #2
0
        private void GetNewBomModificationQuoteNumber(string quoteNumber)
        {
            ObjectParameter NewQuoteNumber = new ObjectParameter("NewQuoteNumber", typeof(string));

            try
            {
                Context.usp_QT_GetBOMModificationQuoteNumber(quoteNumber, NewQuoteNumber);
                layoutView1.SetRowCellValue(0, "QuoteNumber", NewQuoteNumber.Value.ToString());
            }
            catch (Exception ex)
            {
                if (ex.InnerException != null)
                {
                    //MessageBox.Show(ex.InnerException.ToString().Remove(ex.InnerException.ToString().IndexOf("at System.")), "Error");
                    MessageBox.Show("Error occured.  Failed to return a new quote number.");
                }
            }
        }