Example #1
0
        public FuelObjectCollection GetFilter(DateTime dateFrom, DateTime dateTo, string vehiclesNotIncluded, string suppliersIncluded)
        {
            FuelObjectCollection FuelsFiltered;
            FuelObjectCollection Fuels;

            try
            {
                Fuels         = new FuelDataService().GetFilter("", -1, "", "", dateFrom, dateTo);
                FuelsFiltered = new FuelObjectCollection();

                foreach (FuelObject fuel in Fuels)
                {
                    if (!vehiclesNotIncluded.Contains(fuel.VehicleLicensePlate))
                    {
                        if (suppliersIncluded.Contains(fuel.Supplier))
                        {
                            FuelsFiltered.Add(fuel);
                        }
                    }
                }
            }
            catch (System.Exception exception1)
            {
                System.Exception innerException = exception1;
                throw new System.Exception(MethodBase.GetCurrentMethod().Name, innerException);
            }
            return(FuelsFiltered);
        }
Example #2
0
 public string[] GetSuppliers()
 {
     string[] suppliers;
     try
     {
         suppliers = new FuelDataService().GetSuppliers();
     }
     catch (System.Exception exception1)
     {
         System.Exception innerException = exception1;
         throw new System.Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
     return(suppliers);
 }
Example #3
0
 public string[] GetEmployees()
 {
     string[] employees;
     try
     {
         employees = new FuelDataService().GetEmployees();
     }
     catch (System.Exception exception1)
     {
         System.Exception innerException = exception1;
         throw new System.Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
     return(employees);
 }
Example #4
0
        public FuelObjectCollection GetForbiddenFuelNotSendMail(string supplier, int transc_NawID, DateTime dateFrom, DateTime dateTo)
        {
            FuelObjectCollection Fuels;

            try
            {
                Fuels = new FuelDataService().GetForbiddenFuelNotSendMail(supplier, transc_NawID, dateFrom, dateTo);
            }
            catch (System.Exception exception1)
            {
                System.Exception innerException = exception1;
                throw new System.Exception(MethodBase.GetCurrentMethod().Name, innerException);
            }
            return(Fuels);
        }
Example #5
0
        public FuelObjectCollection GetAll()
        {
            FuelObjectCollection Fuels;

            try
            {
                Fuels = new FuelDataService().GetAll();
            }
            catch (System.Exception exception1)
            {
                System.Exception innerException = exception1;
                throw new System.Exception(MethodBase.GetCurrentMethod().Name, innerException);
            }
            return(Fuels);
        }
Example #6
0
        public FuelObjectCollection GetFilter(string supplier, int fuelType,
                                              string employee, string vehicle, DateTime dateFrom,
                                              DateTime dateTo)
        {
            FuelObjectCollection Fuels;

            try
            {
                Fuels = new FuelDataService().GetFilter(supplier, fuelType, employee, vehicle, dateFrom, dateTo);
            }
            catch (System.Exception exception1)
            {
                System.Exception innerException = exception1;
                throw new System.Exception(MethodBase.GetCurrentMethod().Name, innerException);
            }
            return(Fuels);
        }