예제 #1
0
 public AccountLookup(Controller controller, Form frm, Invoice aInvoice)
 {
     this.controller = controller;
     this.frm = frm;
     this.invoice = aInvoice;
     InitializeComponent();
 }
예제 #2
0
 public Records(Controller controller)
 {
     this.controller = controller;
     InitializeComponent();
     DS = controller.loadInvoices();
     dataGridView1.DataSource = DS.Tables[0];
 }
예제 #3
0
        static void Main()
        {
            MainMenu main = new MainMenu();
            main.Visible = false;

            Controller controller = new Controller(main);

            //Application.EnableVisualStyles();
            //Application.SetCompatibleTextRenderingDefault(false);

               Application.Run(main);
        }
예제 #4
0
 public RentCar(Controller controller)
 {
     InitializeComponent();
     this.controller = controller;
     availableCars = controller.loadAvailableCars();
     ArrayList cars = new ArrayList();
     for (int i = 0; i < availableCars.Count(); i++)
     {
         cars.Add(new carDisplay(availableCars[i].getMake() + " " + availableCars[i].getModel() + " | " + availableCars[i].getRentalModel(), availableCars[i].getID()));
         //cmboCar.Items[i] = availableCars[i].getModel() + " " + availableCars[i].getModel();
         //cmboCar.Items[i].Value = availableCars[i].getID();
     }
     cmboCar.DataSource = cars;
     cmboCar.DisplayMember = "display";
     cmboCar.ValueMember = "value";
 }
        public ReturnRentalReceipt(Controller controller, Invoice invoice, Form frm)
        {
            this.controller = controller;
            this.invoice = invoice;
            this.frm = frm;
            account = controller.getAccount(invoice.getAccountID());
            car = controller.getCar(invoice.getCarID());

            InitializeComponent();
            lblLastName.Text = account.getLastName();
            lblFirstName.Text = account.getFirstName();
            lblAccountNumber.Text = account.getDriversLicense();
            lblAddress.Text = account.getAddress();
            lblCity.Text = account.getCity();
            lblState.Text = account.getState();
            lblZip.Text = account.getZip();
            lblDays.Text = invoice.getDuration();
            lblPreCost.Text = String.Format("{0:C}",Double.Parse(invoice.getPreCharge()));
            lblMake.Text = car.getMake();
            lblModel.Text = car.getModel();
            lblModelCost.Text = String.Format("{0:C}", controller.rentalModelCost(car.getRentalModel()));
        }
예제 #6
0
 public AccountForm(Controller controller)
 {
     this.controller = controller;
     InitializeComponent();
 }
예제 #7
0
 public void setController(Controller aController)
 {
     controller = aController;
 }
예제 #8
0
 public ReturnRental(Controller controller)
 {
     this.controller = controller;
     InitializeComponent();
 }