Esempio n. 1
0
 //Desk object constructor
 public Desk(int inWidth, int inDepth, int inDrawerCount, SurfaceMaterials inSurface)
 {
     width       = inWidth;
     depth       = inDepth;
     drawerCount = inDrawerCount;
     surface     = inSurface;
 }
        public DisplayQuote(string clientName, string quoteDate, decimal width, decimal depth,
                            int drawers, SurfaceMaterials material, int options, decimal quotePrice)
        {
            string rushOrder;

            InitializeComponent();
            if (options == 0)
            {
                rushOrder = "none";
            }
            else
            {
                rushOrder = options.ToString() + " Days";
            }

            DisplQuote.Text = "-----------------------------------------------------------------------" + Environment.NewLine +
                              "Customer Name:                             " + clientName + Environment.NewLine +
                              "-----------------------------------------------------------------------" + Environment.NewLine +
                              "Desk Width:                                      " + width + " inches" + Environment.NewLine +
                              "-----------------------------------------------------------------------" + Environment.NewLine +
                              "Desk Depth:                                      " + depth + " inches" + Environment.NewLine +
                              "-----------------------------------------------------------------------" + Environment.NewLine +
                              "Desk Drawers:                                    " + drawers + Environment.NewLine +
                              "-----------------------------------------------------------------------" + Environment.NewLine +
                              "Desk Material:                                   " + material + Environment.NewLine +
                              "------------------------------------------------------------------------" + Environment.NewLine +
                              "Rush Days:                                       " + rushOrder + Environment.NewLine +
                              "-----------------------------------------------------------------------" + Environment.NewLine;
            quotePrices.Text = "$" + quotePrice.ToString();
        }
Esempio n. 3
0
 public DeskQuote(int width, int depth, int drawers, SurfaceMaterials material, int RushOrder)
 {
     newDesk.Width            = width;
     newDesk.Depth            = depth;
     newDesk.Drawers          = drawers;
     AreaSurface              = newDesk.Width * newDesk.Depth;
     newDesk.SurfaceMaterials = material;
     newDesk.RushOrder        = RushOrder;
 }
        /******************************
         * Overloaded Constructor
         * ***************************/
        public DeskQuote(string name, DateTime quoteDate, decimal width, decimal depth,
                         int drawers, SurfaceMaterials material, int rushDays)
        {
            ClientName         = name;
            QuoteDate          = quoteDate;
            Desk.Width         = width;
            Desk.Depth         = depth;
            Desk.surfMaterials = material;
            Desk.NumOfDrawers  = drawers;
            RushDays           = rushDays;

            Surface = Desk.Width * Desk.Depth;
        }
        public DisplayQuote(string clientName, string quoteDate, decimal width, decimal depth,
                            int drawers, SurfaceMaterials material, int rushOptions, decimal quotePrice)
        {
            string rushOrder;

            InitializeComponent();

            if (rushOptions == 0)
            {
                rushOrder = "none";
            }
            else
            {
                rushOrder = rushOptions.ToString() + " Days";
            }


            try
            {
                DisplQuote.Text = "-----------------------------------------------------------------------" + Environment.NewLine +
                                  "Customer Name:                             " + clientName + Environment.NewLine +
                                  "-----------------------------------------------------------------------" + Environment.NewLine +
                                  "Desk Width:                                      " + width + " inches" + Environment.NewLine +
                                  "-----------------------------------------------------------------------" + Environment.NewLine +
                                  "Desk Depth:                                      " + depth + " inches" + Environment.NewLine +
                                  "-----------------------------------------------------------------------" + Environment.NewLine +
                                  "Desk Drawers:                                    " + drawers + Environment.NewLine +
                                  "-----------------------------------------------------------------------" + Environment.NewLine +
                                  "Desk Material:                                   " + material + Environment.NewLine +
                                  "------------------------------------------------------------------------" + Environment.NewLine +
                                  "Rush Days:                                       " + rushOrder + Environment.NewLine +
                                  "-----------------------------------------------------------------------" + Environment.NewLine;

                quotePrices.Text = "$" + quotePrice.ToString();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error Writing the file");
            }
        }