Ejemplo n.º 1
0
        public static VehicleFuelList GetFuelType(int FuelID)
        {
            var model = new VehicleFuelList();
            var dt    = FuelTypeDAL.GetFuelType(FuelID);
            var dr    = dt.Rows[0];

            model.Id      = (int)dr["FuelID"];
            model.Display = dr["FuelType"].ToString();
            return(model);
        }
Ejemplo n.º 2
0
        public static IEnumerable <VehicleFuelList> GetFuelTypes()
        {
            var FuelList = new List <VehicleFuelList>();
            var dt       = FuelTypeDAL.GetFuelTypes();

            foreach (DataRow dataRow in dt.Rows)
            {
                FuelList.Add(new VehicleFuelList
                {
                    Id      = (int)dataRow["FuelID"],
                    Display = dataRow["FuelType"].ToString()
                });
            }
            return(FuelList);
        }
Ejemplo n.º 3
0
 public static void AddFuelType(VehicleFuelList model, string UpdatedBy, out int returnValue)
 {
     FuelTypeDAL.AddFuelType(model.Display, UpdatedBy, out returnValue);
 }
Ejemplo n.º 4
0
 public static void UpdateFuelType(VehicleFuelList model, string UpdatedBy)
 {
     FuelTypeDAL.UpdateFuelType(model.Id, model.Display, UpdatedBy);
 }