private void ManageUserForm_Load(object sender, EventArgs e)
        {
            ITripRepository tripRepository = TripApplication.Instance.DBFactory.CreateTripRepository();

            m_tripBLL = new TripBLL(tripRepository);

            FillGrid();
        }
Ejemplo n.º 2
0
        public EditTripForm(TripRecord trip, bool bAdd)
        {
            InitializeComponent();

            m_trip = trip;
            m_bAdd = bAdd;

            IUserRepository userRepository = TripApplication.Instance.DBFactory.CreateUserRepository();
            ITripRepository tripRepository = TripApplication.Instance.DBFactory.CreateTripRepository();
            ICityRepository cityRepository = TripApplication.Instance.DBFactory.CreateCityRepository();

            m_userBLL = new UserBLL(userRepository);
            m_tripBLL = new TripBLL(tripRepository);
            m_cityBLL = new CityBLL(cityRepository);
        }
Ejemplo n.º 3
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            //get the MapControl
            m_mapControl = (IMapControl3)axMapControl1.Object;

            //disable the Save menu (since there is no document yet)
            menuSaveDoc.Enabled = false;

            string strAppPath = ConfigurationManager.ConnectionStrings["Trip.Properties.Settings.MxdPath"].ToString();

            axMapControl1.LoadMxFile(strAppPath);

            IUserRepository userRepository = TripApplication.Instance.DBFactory.CreateUserRepository();
            ITripRepository tripRepository = TripApplication.Instance.DBFactory.CreateTripRepository();
            IDistRepository distRepository = TripApplication.Instance.DBFactory.CreateDistRepository();

            m_userBLL = new UserBLL(userRepository);
            m_tripBLL = new TripBLL(tripRepository);
            m_distBLL = new DistBLL(distRepository);

            List <User> users = m_userBLL.GetAllUser();

            FillUserTree(users);
        }