private void btnDelCar_Click(object sender, EventArgs e) { CarriageCtrl cc = new CarriageCtrl(); cc.delCarriage(tbCarTyp.Text); this.Close(); }
private void btnAddCar_Click(object sender, EventArgs e) { Carriage car = new Carriage(tbCarTyp.Text, int.Parse(tbCarVol.Text), int.Parse(tbVolPerSec.Text)); CarriageCtrl cc = new CarriageCtrl(); cc.saveCarriage(car); this.Close(); }
private void ManageTrainForm_Load(object sender, EventArgs e) { CarriageCtrl cc = new CarriageCtrl(); List <object[]> typeList = cc.loadCarriage(); for (int i = 0; i < typeList.Count; i++) { lbCarTyp.Items.Add(typeList[i][0]); } }