示例#1
0
        public MainForm()
        {
            InitializeComponent();

            vehiculeServices = new VehiculeServices();
            clientServices = new ClientsServices();

            LoginForm form1 = new LoginForm();
            form1.Owner = this;
            form1.ShowDialog();

            lblMainForm_activeUser.Text = form1.username;

            carPanel.Hide();
            panelReservation.Hide();
        }
        // Constructeur
        public ReservationForm(String operation)
        {
            InitializeComponent();

            clientServices = new ClientsServices();
            vehiculeServices = new VehiculeServices();
            succursalesService = new SuccursalesServices();
            modelesServices = new ModeleServices();
            reservationServices = new ReservationsServices();

            fillTheComboBoxSuccursale();
            fillTheComboBoxOpenHours();
            lblClientCreate_operation.Text = operation;

            // Selection de l'affichage
            if (operation.Equals(OPERATION_CLIENT_CREATION))
            {
                setFieldsVisibility(true);
                btnClientCreate_add.Text = ReservationForm.OPERATION_CLIENT_UPDATE;
            }
        }