Ejemplo n.º 1
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            Business.Person newPerson = new Business.Person();

            newPerson.FirstName    = txtFirstName.Text;
            newPerson.LastName     = txtLastName.Text;
            newPerson.Tell         = txtTell.Text;
            newPerson.Cell         = txtCell.Text;
            newPerson.NationalCode = txtNationalCode.Text;

            newPerson.Insert();

            MessageBox.Show("عملیات با موفقیت انجام شد");
        }
Ejemplo n.º 2
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     if (txtFirstName.Text == "" && txtLastName.Text == "" && txtNationalCode.Text == "" && txtTell.Text == "" && txtCall.Text == "")
     {
         MessageBox.Show("لطفا فیلد هایی خالی را پر کنید");
     }
     Business.Person insart = new Business.Person();
     insart.Ntiolecode = txtNationalCode.Text;
     insart.FirstName  = txtFirstName.Text;
     insart.Lastname   = txtLastName.Text;
     insart.Tell       = txtTell.Text;
     insart.Call       = txtCall.Text;
     insart.Insert();
     MessageBox.Show("ثبت با موفقیت انجام شد");
     this.Close();
 }