Beispiel #1
0
        internal override object[] getRow()
        {
            FuelCardDriverList fuelCardDriverList = FuelCardDriverList.getInstance();
            FuelCardDriver     fuelCardDriver     = fuelCardDriverList.getItem(this);

            return(fuelCardDriver.getRow());
        }
        public void Add(FuelCardDriver fuelCardDriver)
        {
            if ((list.Exists(item => item == fuelCardDriver)) || (fuelCardDriver.FuelCard == null))
                return;

            list.Add(fuelCardDriver);
        }
Beispiel #3
0
        public void AddEmptyDriver()
        {
            FuelCardDriverList fuelCardDriverList = FuelCardDriverList.getInstance();

            if (fuelCardDriverList.getItem(this) == null)
            {
                FuelCardDriver fuelCardDriver = CreateFuelCardDriver();
                fuelCardDriver.Save();
            }
        }
Beispiel #4
0
 private void ShowAddEditFuelCardDriver(FuelCardDriver fuelCardDriver)
 {
     FuelCardDriver_AddEdit fuelCardDriverAddEdit = new FuelCardDriver_AddEdit(fuelCardDriver);
     if (fuelCardDriverAddEdit.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         loadDriverList();
 }
        public FuelCardDriver_AddEdit(FuelCardDriver fuelCardDriver)
        {
            InitializeComponent();

            _fuelCardDriver = fuelCardDriver;
        }
        protected override void loadFromSql()
        {
            DataTable dt = _provider.Select("FuelCardDriver");

            list.Clear();

            foreach (DataRow row in dt.Rows)
            {
                FuelCardDriver fuelCardDriver = new FuelCardDriver(row);
                Add(fuelCardDriver);
            }
        }