Exemplo n.º 1
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.º 2
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.º 3
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.º 4
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.º 5
0
        private void btnListCard_Click(object sender, EventArgs e)
        {
            CreditCardTable curentT = new CreditCardTable();

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