Example #1
0
    public string getTruckTypes()
    {
        JavaScriptSerializer j  = new JavaScriptSerializer();
        TruckTypes           tp = new TruckTypes();
        List <TruckTypes>    trucksTypesList = tp.getTruckTypesList();

        return(j.Serialize(trucksTypesList));
    }
Example #2
0
 //without active
 public Trucks(int truckID, int truckLicense, string manufacturer, string model, string kmToDate, string hand, float purchaseCost, string purchaseYear, TruckTypes truckType, string urea, DateTime onRoadDate, DateTime insuranceExpiredDate)
 {
     TruckID              = truckID;
     TruckLicense         = truckLicense;
     Manufacturer         = manufacturer;
     Model                = model;
     KMToDate             = kmToDate;
     Hand                 = hand;
     PurchaseCost         = purchaseCost;
     PurchaseYear         = purchaseYear;
     TruckType            = truckType;
     OnRoadDate           = onRoadDate;
     InsuranceExpiredDate = insuranceExpiredDate;
     Urea                 = urea;
 }
Example #3
0
    public List <TruckTypes> getTruckTypesList()
    {
        #region DB functions
        string query = "select * from TruckTypes order by TruckType";

        List <TruckTypes> list = new List <TruckTypes>();
        DbService         db   = new DbService();
        DataSet           ds   = db.GetDataSetByQuery(query);

        foreach (DataRow dr in ds.Tables[0].Rows)
        {
            TruckTypes tmp = new TruckTypes((int)dr["TruckTypeID"], dr["TruckType"].ToString());
            list.Add(tmp);
        }
        #endregion

        return(list);
    }
Example #4
0
 //Constructors
 public Truck(string make, string model, CarColors carColor, TruckTypes truckType) : base(make, model, 2000, carColor)
 {
     TruckType = truckType;
 }