Example #1
0
        public LookUpItemView()
        {
            InitializeComponent();
            _context = new FleetEntities();

            _pm  = PermissionManager.GetPermissionManager();
            _fph = new FleetPermissionHelper();

            AuthorizeForm();
        }
Example #2
0
        public NewVehicle()
        {
            InitializeComponent();
            context = new FleetEntities();

            _pm  = PermissionManager.GetPermissionManager();
            _fph = new FleetPermissionHelper();

            AuthorizeForm();
        }
Example #3
0
        public CouponDetailView()
        {
            InitializeComponent();
            context = new FleetEntities();
            LoadLookups();
            _pm  = PermissionManager.GetPermissionManager();
            _fph = new FleetPermissionHelper();

            AuthorizeForm();
        }
Example #4
0
        public VehicleList()
        {
            InitializeComponent();
            this.gridControl1.Dock = DockStyle.Fill;

            _pm     = PermissionManager.GetPermissionManager();
            _fph    = new FleetPermissionHelper();
            context = new FleetEntities();

            AuthorizeForm();
        }
Example #5
0
        public VehicleDetail()
        {
            InitializeComponent();
            context = new FleetEntities();
            LoadLookupData();
            _pm  = PermissionManager.GetPermissionManager();
            _fph = new FleetPermissionHelper();

            AuthorizeForm();
            //var margin = 10;
            //this.Top = ViewHelper.TopPositionForForm(margin);
            //this.Left = ViewHelper.TopPositionForForm(margin);
            //this.Height = ViewHelper.GetHeightForForm(margin);
            //this.Width = ViewHelper.GetWidthForForm(margin);
        }
Example #6
0
        private void AddFuelLog()
        {
            var selected = (VehicleInfo)vehicleListBindingSource.Current;
            var record   = new FuelLog {
                VehicleId = selected.VehicleId
            };
            var dialog = new FuelLogEdit();

            dialog.ShowObject(record);
            var result = dialog.ShowDialog();

            if (result == DialogResult.OK)
            {
                using (var ctx = new FleetEntities())
                {
                    ctx.FuelLogs.AddObject(record);
                    ctx.SaveChanges();
                }
            }
        }
Example #7
0
 public IEnumerable <LookupItem> GetAllLookupItems(Func <LookupItem, Boolean> where)
 {
     _context = new FleetEntities();
     return(_context.LookupItems.Where(where).ToList());
 }
Example #8
0
 private IEnumerable <LookupItem> LoadItemInfo()
 {
     _context = new FleetEntities();
     return(_context.LookupItems.ToList());
 }
Example #9
0
 public UnMountTireView()
 {
     InitializeComponent();
     context = new FleetEntities();
     LoadLookup();
 }
Example #10
0
 public NewTire()
 {
     InitializeComponent();
     context = new FleetEntities();
 }
Example #11
0
 public void RefreshList()
 {
     context = new FleetEntities();
     this.couponsBindingSource.DataSource = context.CouponInfoes.ToList();
 }
Example #12
0
 public TireEdit()
 {
     InitializeComponent();
     context = new FleetEntities();
 }
Example #13
0
 public void RefreshList()
 {
     context = new FleetEntities();
     maintenanceListBindingSource.DataSource = context.MaintenanceInfoes;
 }
Example #14
0
 public void RefreshList()
 {
     context = new FleetEntities();
     this.tiresBindingSource.DataSource = context.TireInfoes.ToList();
 }
Example #15
0
 private void LoadData()
 {
     context = new FleetEntities();
     this.vehicleListBindingSource.DataSource = context.VehicleInfoes;
 }