Exemplo n.º 1
0
 private void saveCustomer(string text)
 {
     try
     {
         Con.Open();
         string       qText = text;
         OleDbCommand Com   = new OleDbCommand();
         Com.Parameters.AddWithValue("@fio", tbFIO.Text);
         Com.Parameters.AddWithValue("@birth", Convert.ToDateTime(dtDateOfBirth.Text));
         Com.Parameters.AddWithValue("@passNum", tbPassportNo.Text);
         Com.Parameters.AddWithValue("@dateOfl", Convert.ToDateTime(dtDateOfIssue.Text));
         Com.Parameters.AddWithValue("@auth", tbAuthority.Text);
         Com.Parameters.AddWithValue("@adress", tbAddress.Text);
         Com.Parameters.AddWithValue("@phone", Convert.ToInt32(tbPhoneNumber.Text));
         Com.CommandText = qText;
         Com.Connection  = Con;
         Com.ExecuteNonQuery();
         sprCustomerList sprCustomerList = new sprCustomerList();
         sprCustomerList.loadCustomers();
         this.Close();
     }
     catch (Exception err) {
         MessageBox.Show(err.Message);
     }
     finally {
         Con.Close();
     }
 }
Exemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            sprCustomerList sprCustomerListForm = new sprCustomerList();

            sprCustomerListForm.ModeCheck = "1";
            sprCustomerListForm.Owner     = this;
            sprCustomerListForm.ShowDialog();
        }
Exemplo n.º 3
0
        private void клиентыToolStripMenuItem_Click(object sender, EventArgs e)
        {
            sprCustomerList sprCustomerList = new sprCustomerList();

            sprCustomerList.Show();
        }