Exemplo n.º 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();
        }
Exemplo n.º 2
0
 //להצגת רכב מרשימת השכרות
 public frmTakeForLong(int br, int TakeCode, string searchUpdate)
 {
     InitializeComponent();
     Suport.FillCombox(cmbCity, ct.GetTable(), "nameCity", "coudeCity");
     Suport.FillCombox(cmbLicenseKind, curentL.GetTable(), "nameLicense", "coudeLicense");
     bra            = br;//סניף
     curentBranch   = new Branch(br);
     txtBranch.Text = Convert.ToString(curentBranch.BranchName);
     curentTake     = new Takes(TakeCode);
     //מילוי נתונים לפי הת.ז שבהשכרה
     curentClient = new Client(curentTake.IDclient);
     FillTxtClient();
     //מילוי פרטי רכב
     st = curentTake.NumCar;
     FillTXT();
     btnUpdate.Visible = true;
     if (searchUpdate == "search")
     {
         this.Enabled = false;
     }
     else
     {
         btnCar.Enabled = true;
         grpCar.Enabled = false;
     }
     //קוד השכרה
     this.takeCode = TakeCode;
 }
Exemplo n.º 3
0
        private void FillTXT()
        {
            txtnum.Text             = curentCar.CarNumber;
            cmbColor.SelectedValue  = curentCar.ColorCar;
            chfound.Checked         = curentCar.Finds;
            chbFix.Checked          = curentCar.Fix;
            dtpT.Value              = curentCar.DateTest;
            dtpB.Value              = curentCar.DateTest;
            txtKm.Text              = curentCar.DroveKM.ToString();
            cmbBranch.SelectedValue = curentCar.CoudBranch;
            ParkingInBranchTable curentp = new ParkingInBranchTable();
            int com = Convert.ToInt32(cmbBranch.SelectedValue);

            Suport.FillCombox(cmbPlace, curentp.FillConbo(com), "fullName", "coudParking");
            cmbPlace.SelectedValue  = curentCar.CoudeParking;
            cmbDesign.SelectedValue = curentCar.CoudDesign;

            txtAmount.Text = curentCar.AmountGasIn.ToString();
            try
            {
                pcbPicture.Image = Image.FromFile(Application.StartupPath + @"\carsForTheProject\" + curentCar.Picture);
            }
            catch { }
            cmbPlace.Enabled = true;
        }
Exemplo n.º 4
0
        public frmWellcome()
        {
            InitializeComponent();
            BranchTable br = new BranchTable();

            Suport.FillCombox(cmbBranches, br.GetTable(), "branchName", "branchCoude");
            //      menuStrip1.Enabled = false;
        }
Exemplo n.º 5
0
 private void btnAddClient_Click(object sender, EventArgs e)
 {
     Suport.FillCombox(cmbCardList, curentCardTable.GetCards(txtId.Text), "numCard", "coudcCeditCard");
     if (txtId.Text == "")
     {
         MessageBox.Show("מלא פרטים בשדות");
     }
     else
     {
         errorProvider1.Clear();
         if (newClient == 1)
         {
             if (FillClass() == true)
             {
                 curentClientTable.AddToAccess(curentClient);
                 MessageBox.Show("לקוח התווסף בהצלחה! המשך בתהליך ההשכרה");
                 btnCar.Enabled    = true;
                 grpClient.Enabled = false;
                 btnCheck.Enabled  = true;
             }
         }
         if (newClient == 0)
         {
             if (FillClass() == true)
             {
                 // curentClient = new Client(txtId.Text);
                 curentClientTable.UpdateToAccess(curentClient);
                 MessageBox.Show("לקוח התעדכן בהצלחה במאגר! המשך בתהליך ההשכרה");
                 btnCheck.Enabled  = true;
                 grpClient.Enabled = false;
             }
         }
         if (newClient == 2)
         {
             try
             {
                 curentClient = new Client(txtId.Text);
                 FillTxtClient();
                 newClient = 0;
             }
             catch
             {
                 newClient = 1;
             }
         }
         DateTime dt = new DateTime();
         dt = txtLicenseD1.Value;
         if (dt.AddDays(730) < DateTime.Now)
         {
             lblDriver.Text = "הלקוח הינו נהג חדש";
         }
         if (Convert.ToDouble(txtAge.Text) < 23)
         {
             lblAgeD.Text = "הלקוח הינו נהג צעיר";
         }
         // txtAge.Text = (txtDate.Value ) -( DateTime.Now).ToString();
     }
 }
Exemplo n.º 6
0
        private void myButton1_Click(object sender, EventArgs e)
        {
            frmAddCreditCard f1 = new frmAddCreditCard();

            f1.ShowDialog();
            CreditCardTable curentT = new CreditCardTable();

            Suport.FillCombox(cmbCardList, curentT.GetCards(txtId.Text), "numCard", "coudcCeditCard");
        }
Exemplo n.º 7
0
        public frmAddDesign()
        {
            InitializeComponent();
            ManufacturerTable ma = new ManufacturerTable();
            GroupTable        gr = new GroupTable();

            Suport.FillCombox(cmbGroup, gr.GetTable(), "describeGroup", "coudeGroup");
            Suport.FillCombox(cmbManufactore, ma.GetTable(), "nameManufacturer", "coudeManufacturer");
        }
Exemplo n.º 8
0
 private void txtClient_TextChanged(object sender, EventArgs e)
 {
     try
     {
         CreditCardTable curentT = new CreditCardTable();
         Suport.FillCombox(cmbCardForPay, curentT.GetCards(txtClient.Text), "numCard", "coudcCeditCard");
     }
     catch { }
 }
Exemplo n.º 9
0
        private void btnAddCard_Click(object sender, EventArgs e)
        {
            frmAddCreditCard f1 = new frmAddCreditCard();

            f1.ShowDialog();
            CreditCardTable curentT = new CreditCardTable();

            Suport.FillCombox(cmbCardForPay, curentT.GetCards(txtClient.Text), "numCard", "coudcCeditCard");
        }
Exemplo n.º 10
0
        public frmAddBranch()
        {
            InitializeComponent();
            CityTable ctt = new CityTable();

            Suport.FillCombox(cmbCity, ctt.GetTable(), "nameCity", "coudeCity");
            WorkerTable CurentWorker = new WorkerTable();

            Suport.FillCombox(cmbMenager, CurentWorker.GetMenager(), "fullName", "idWorker");
        }
Exemplo n.º 11
0
 public frmTakeForLong(int br, string sl)
 {
     shortLong = sl;
     bra       = br;//סניף
     InitializeComponent();
     curentCardTable = new CreditCardTable();
     Suport.FillCombox(cmbCity, ct.GetTable(), "nameCity", "coudeCity");
     Suport.FillCombox(cmbLicenseKind, curentL.GetTable(), "nameLicense", "coudeLicense");
     curentBranch   = new Branch(br);
     txtBranch.Text = Convert.ToString(curentBranch.BranchName);
     btnOk.Visible  = true;
 }
Exemplo n.º 12
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;
            }
        }
Exemplo n.º 13
0
 private void cmbBranch_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         countForBranch++;
         ParkingInBranchTable curentp = new ParkingInBranchTable();
         int com = Convert.ToInt32(cmbBranch.SelectedValue);
         Suport.FillCombox(cmbPlace, curentp.FillConbo(com), "fullName", "coudParking");
         if (countForBranch != 0)
         {
             cmbPlace.Enabled = true;
         }
         countForBranch++;
     }
     catch { }
 }
Exemplo n.º 14
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;
            }
        }
Exemplo n.º 15
0
 public void AddSuport(Suport suport)
 {
     Suports.Add(suport);
 }
        public frmAddShowClient(string st)
        {
            InitializeComponent();
            CityTable ct = new CityTable();

            Suport.FillCombox(cmbCity, ct.GetTable(), "nameCity", "coudeCity");
            KindLicenseTable k = new KindLicenseTable();

            Suport.FillCombox(cmbLicenseKind, k.GetTable(), "nameLicense", "coudeLicense");
            str = st;
            if (st == "add")
            {
                lblMessage.Visible = true;
                btnOK.Visible      = true;
            }
            if (st == "update")
            {
                lblmessageupdate.Visible = true;
                btnUpdate.Visible        = true;
                lblSearch.Visible        = true;
                txtSearch.Visible        = true;
                btnSearch.Visible        = true;
            }
            if (st == "search")
            {
                txtAddress.Enabled     = false;
                txtDate.Enabled        = false;
                txtFName.Enabled       = false;
                txtID.Enabled          = false;
                txtLicenseD1.Enabled   = false;
                txtLicenseD2.Enabled   = false;
                txtLicenseNum.Enabled  = false;
                txtLName.Enabled       = false;
                txtNum.Enabled         = false;
                txtPhone.Enabled       = false;
                txtTel.Enabled         = false;
                lblSearch.Visible      = true;
                txtSearch.Visible      = true;
                btnSearch.Visible      = true;
                lblSearch.Enabled      = true;
                txtSearch.Enabled      = true;
                btnSearch.Enabled      = true;
                cmbCity.Enabled        = false;
                cmbLicenseKind.Enabled = false;
            }
            //else
            //{
            //   // txtSearch.Text = st;
            //    txtSearch.Enabled = false;
            //    txtAddress.Enabled = false;
            //    txtDate.Enabled = false;
            //    txtFName.Enabled = false;
            //    txtID.Enabled = false;
            //    txtLicenseD1.Enabled = false;
            //    txtLicenseD2.Enabled = false;
            //    txtLicenseNum.Enabled = false;
            //    txtLName.Enabled = false;
            //    txtNum.Enabled = false;
            //    txtPhone.Enabled = false;
            //    txtTel.Enabled = false;
            //    lblSearch.Visible = true;
            //    txtSearch.Visible = true;
            //    btnSearch.Visible = true;
            //    lblSearch.Enabled = true;
            //    txtSearch.Enabled = true;
            //    btnSearch.Enabled = true;
            //    cmbCity.Enabled = false;
            //    cmbLicenseKind.Enabled = false;
            //}
        }
Exemplo n.º 17
0
        private void btnListCard_Click(object sender, EventArgs e)
        {
            CreditCardTable curentT = new CreditCardTable();

            Suport.FillCombox(cmbCardList, curentT.GetCards(txtId.Text), "numCard", "coudcCeditCard");
        }