private void saveSuppliers(string text)
 {
     try
     {
         Con.Open();
         string       qText = text;
         OleDbCommand Com   = new OleDbCommand();
         Com.Parameters.AddWithValue("@fio", tbFIO.Text);
         Com.Parameters.AddWithValue("@firm", tbFirm.Text);
         Com.Parameters.AddWithValue("@pos", tbPosition.Text);
         Com.Parameters.AddWithValue("@phone", Convert.ToInt32(tbPhoneNumber.Text));
         Com.CommandText = qText;
         Com.Connection  = Con;
         Com.ExecuteNonQuery();
         sprSuppliersList sprSuppliersList = new sprSuppliersList();
         sprSuppliersList.loadSuppliers();
         this.Close();
     }
     catch (Exception err)
     {
         MessageBox.Show(err.Message);
     }
     finally
     {
         Con.Close();
     }
 }
        private void button1_Click(object sender, EventArgs e)
        {
            sprSuppliersList sprSuppliersListForm = new sprSuppliersList();

            sprSuppliersListForm.ModeCheck = "1";
            sprSuppliersListForm.Owner     = this;
            sprSuppliersListForm.ShowDialog();
        }
Example #3
0
        private void поставщикиToolStripMenuItem_Click(object sender, EventArgs e)
        {
            sprSuppliersList sprCounterpartyList = new sprSuppliersList();

            sprCounterpartyList.Show();
        }