Exemple #1
0
        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 frmWellcome()
        {
            InitializeComponent();
            BranchTable br = new BranchTable();

            Suport.FillCombox(cmbBranches, br.GetTable(), "branchName", "branchCoude");
            //      menuStrip1.Enabled = false;
        }
Exemple #3
0
        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;
            }
        }
Exemple #4
0
        public frmAddWorker(String st)
        {
            tsr = st;
            InitializeComponent();
            JobTable  jt = new JobTable();
            CityTable ct = new CityTable();

            Suport.FillCombox(cmbCity, ct.GetTable(), "nameCity", "coudeCity");
            WorkerTable wo = new WorkerTable();

            Suport.FillCombox(cmbBranch, wo.GetTable(), "branchName", "branchCoude");
            Suport.FillCombox(cmbJob, jt.GetTable(), "nameJob", "doudeJob");

            BranchTable curentb = new BranchTable();

            Suport.FillCombox(cmbBranch, curentb.GetTable(), "branchName", "branchCoude");
            if (st == "Add")
            {
                curentWorker      = new Worker();
                lblAdd.Visible    = true;
                lblUpdate.Visible = false;
                lblSearch.Visible = false;
                txtSearch.Visible = false;
                btnSearch.Visible = false;
                lblDel.Visible    = false;
                txtSearch.Visible = false;
            }
            if (st == "Update")
            {
                lblAdd.Visible    = false;
                lblUpdate.Visible = true;
                lblDel.Visible    = false;
                txtSearch.Visible = true;
                txtID.Enabled     = false;
            }
            if (st == "Del")
            {
                lblAdd.Visible    = false;
                lblUpdate.Visible = false;
                lblDel.Visible    = true;
                txtSearch.Visible = true;
            }
        }