public FrmViewColors() { InitializeComponent(); ColorsTable ct = new ColorsTable(); dt = ct.GetTable(); }
private void FillTXT() { Suport.FillCombox(cmbColor, curentColorTable.GetTable(), "nameColor", "coudeColor"); Suport.FillCombox(cmbDesign, curentDesignTable.GetTable(), "nameDesign", "coudDesign"); Suport.FillCombox(cmbBranch, curentBranchTable.GetTable(), "branchName", "branchCoude"); int com = Convert.ToInt32(cmbBranch.SelectedValue); Suport.FillCombox(cmbPlace, curentParkingTable.FillConbo(com), "fullName", "coudParking"); curentCar = new Car(st); curentd = new Design(curentCar.CoudDesign); curentGoup = new Group(curentd.Group); txtDay.Text = curentGoup.DayTariff.ToString(); txtHoure.Text = curentGoup.AddHour.ToString(); txtKm.Text = curentGoup.AddKM.ToString(); txtMonth.Text = curentGoup.MonthTariff.ToString(); txtWeek.Text = curentGoup.WeekTarif.ToString(); txtB.Text = curentGoup.CarInsurance.ToString(); txtnumCar.Text = curentCar.CarNumber; cmbColor.SelectedValue = curentCar.ColorCar.ToString(); txtKMd.Text = curentCar.DroveKM.ToString(); cmbPlace.SelectedValue = curentCar.CoudeParking.ToString(); cmbDesign.SelectedValue = curentCar.CoudDesign.ToString(); cmbBranch.SelectedValue = curentCar.CoudBranch.ToString(); txtAmount.Text = curentCar.AmountGasIn.ToString(); pcbPicture.Image = Image.FromFile(Application.StartupPath + @"\carsForTheProject\" + curentCar.Picture); cmbCardList.SelectedValue = curentTake.CodeCraditCard.ToString(); }
public frmShowCars(string st) { str = st; InitializeComponent(); ColorsTable curentColor = new ColorsTable(); Suport.FillCombox(cmbColor, curentColor.GetTable(), "nameColor", "coudeColor"); //Suport.FillCombox(cmbPlace , curentp .FillConbo(), "numParking", "coudParking"); DesignTable curentd = new DesignTable(); Suport.FillCombox(cmbDesign, curentd.GetTable(), "nameDesign", "coudDesign"); BranchTable curentb = new BranchTable(); Suport.FillCombox(cmbBranch, curentb.GetTable(), "branchName", "branchCoude"); if (st == "add") { lblAddCar.Visible = true; lblMessage.Visible = false; btnAdd.Visible = true; label9.Visible = false; txtNumForSerch.Visible = false; btnSearch.Visible = false; } if (st == "update") { lblAddCar.Visible = false; lblMessage.Visible = true; btnUpdate.Visible = true; pcbPicture.Visible = true; pcbPicture.Visible = true; } if (st == "del") { lblAddCar.Visible = false; lblMessage.Visible = true; btnDel.Visible = true; pcbPicture.Visible = true; } }