コード例 #1
0
        public CarWashInvoiceDisplay(CarWashInvoice carWashInvoice, CarWashForm carWashForm1)
        {
            InitializeComponent();
            Binding packagePriceBind    = new Binding("Text", carWashInvoice, "PackageCost", true);
            Binding fragrancePriceBind  = new Binding("Text", carWashInvoice, "FragranceCost", true);
            Binding subtotalInvoiceBind = new Binding("Text", carWashInvoice, "Subtotal", true);
            Binding taxesBind           = new Binding("Text", carWashInvoice, "GoodsAndServicesTaxCharged", true);
            Binding totalBind           = new Binding("Text", carWashInvoice, "Total", true);

            packagePriceBind.FormatString    = "c";
            fragrancePriceBind.FormatString  = "N2";
            subtotalInvoiceBind.FormatString = "N2";
            taxesBind.FormatString           = "N2";
            totalBind.FormatString           = "c";


            this.lblCarWashInvoicePackagePriceOut.DataBindings.Add(packagePriceBind);
            this.lblCarWashInvoiceFragracePriceOut.DataBindings.Add(fragrancePriceBind);
            this.lblCarWashInvoiceSubtotalOut.DataBindings.Add(subtotalInvoiceBind);
            this.lblCarWashInvoiceTaxesOut.DataBindings.Add(taxesBind);
            this.lblCarWashInvoiceTotalOut.DataBindings.Add(totalBind);
        }
コード例 #2
0
        private void carWashToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form myForm = new CarWashForm();

            myForm.ShowDialog();
        }
コード例 #3
0
        private void MnuFileOpenCarWash_Click(object sender, EventArgs e)
        {
            CarWashForm carWashForm1 = new CarWashForm();

            carWashForm1.ShowDialog();
        }