Exemplo n.º 1
0
        private void הוספהקולקטיביתToolStripMenuItem_Click(object sender, EventArgs e)
        {
            DialogResult rs = MessageBox.Show("לקוח קיים?", "שים לב!!!", MessageBoxButtons.YesNo);

            if (rs == DialogResult.Yes)
            {
                frmHosafaKolectivit f = new frmHosafaKolectivit(statusKind.add);
                f.Show();
            }
            else
            {
                frmMazmin f = new frmMazmin(statusKind.addAndBack);
                f.Show();
            }
        }
Exemplo n.º 2
0
 private void btnUpdate_Click(object sender, EventArgs e)
 {
     if (BuildObjectByFileds() == true)
     {
         DataRow dr = this.myMazmin.BuildRow();
         if (this.myMazminims.update(dr) == true)
         {
             MessageBox.Show("העדכון בוצע בהצלחה!");
             ClearFields();
             if (this.statusFrm == statusKind.updateAndBack)
             {
                 frmHosafaKolectivit f = new frmHosafaKolectivit(this.priviousFrm, myMazmin);
                 f.Show();
                 this.Close();
             }
         }
         else
         {
             MessageBox.Show("הפעולה נכשלה!");
         }
     }
     //ClearFields();
 }
Exemplo n.º 3
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            mazminim m1 = new mazminim();

            try //קוד
            {
                m1.KodMaznim = Convert.ToInt16(lblKodMazmin.Text);
            }
            catch (Exception ex)
            {
                errorProvider1.SetError(lblKodMazmin, ex.Message);
            }
            try //שם פרטי
            {
                m1.NameOfMazmin = txtName.Text;
            }
            catch (Exception ex)
            {
                errorProvider1.SetError(txtName, ex.Message);
            }
            try //שם משפחה
            {
                m1.NameOfFamily1 = txtFName.Text;
            }
            catch (Exception ex)
            {
                errorProvider1.SetError(txtFName, ex.Message);
            }
            try //מספר פאלפון
            {
                m1.PhoneNumber = Convert.ToString(txtPhone.Text);
            }
            catch (Exception ex)
            {
                errorProvider1.SetError(txtPhone, ex.Message);
            }
            try //טלפון נוסף
            {
                m1.AnotherPhone = Convert.ToString(txtAPhone.Text);
            }
            catch (Exception ex)
            {
                errorProvider1.SetError(txtAPhone, ex.Message);
            }
            try //רחוב
            {
                m1.Street = txtStreet.Text;
            }
            catch (Exception ex)
            {
                errorProvider1.SetError(txtStreet, ex.Message);
            }
            try //מספר בית
            {
                m1.NumberOfHouse = Convert.ToInt32(txtHouseNum.Text);
            }
            catch (Exception ex)
            {
                errorProvider1.SetError(txtHouseNum, ex.Message);
            }
            try //עיר
            {
                m1.City = txtCity.Text;
            }
            catch (Exception ex)
            {
                errorProvider1.SetError(txtCity, ex.Message);
            }

            bool ok = BuildObjectByFileds();

            if (ok == true)
            {
                DataRow dr = this.myMazmin.BuildRow();
                if (this.myMazminims.Add(dr) == true)
                {
                    MessageBox.Show("הלקוח התווסף בהצלחה");
                    ClearFields();
                    if (this.statusFrm == statusKind.addAndBack)
                    {
                        frmHosafaKolectivit f = new frmHosafaKolectivit(statusKind.add, m1);
                        f.Show();
                        this.Close();
                    }
                }
                else
                {
                    MessageBox.Show("הלקוח קיים במאגר");
                }
            }
            //ClearFields();
        }
Exemplo n.º 4
0
        private void מצבהזמנהToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmHosafaKolectivit f = new frmHosafaKolectivit(statusKind.show);

            f.Show();
        }
Exemplo n.º 5
0
        private void עדכוןToolStripMenuItem_Click_1(object sender, EventArgs e)
        {
            frmHosafaKolectivit f = new frmHosafaKolectivit(statusKind.update);

            f.Show();
        }