コード例 #1
0
 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();
     }
 }
コード例 #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            sprSuppliersList sprSuppliersListForm = new sprSuppliersList();

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

            sprCounterpartyList.Show();
        }