private void btnInsert_Click(object sender, EventArgs e)
 {
     UI.Architects.frmArchitectsAdd insert = new UI.Architects.frmArchitectsAdd();
     insert.ShowDialog();
     Business.Architects Architects = new Business.Architects();
     dataGridView1.AutoGenerateColumns = true;
     dataGridView1.DataSource          = Architects.read();
     MessageBox.Show("ثبت با موفقیت انجام شد", "اطلاع");
 }
 private void btnSave_Click(object sender, EventArgs e)
 {
     if (txtname.Text == "" && txtlname.Text == "" && txtNtionalcode.Text == "" && txtTell.Text == "" && txtCall.Text == "" && txtTime.Text == "" && txtType.Text == "")
     {
         MessageBox.Show("لطفا فیلد هایی خالی را پر کنید");
     }
     Business.Architects insart = new Business.Architects();
     insart.Ntiolecode = txtNtionalcode.Text;
     insart.FirstName  = txtname.Text;
     insart.Lastname   = txtlname.Text;
     insart.Tell       = txtTell.Text;
     insart.Call       = txtCall.Text;
     insart.time       = txtTime.Text;
     insart.type       = txtType.Text;
     insart.mani       = txtmani.Text;
     insart.projects   = txtProgict.Text;
     insart.insert();
     MessageBox.Show("ثبت با موفقیت انجام شد");
     this.Close();
 }
 private void frmArchitectsList_Load(object sender, EventArgs e)
 {
     Business.Architects Architects = new Business.Architects();
     dataGridView1.AutoGenerateColumns = true;
     dataGridView1.DataSource          = Architects.read();
 }