اريد ان انشئ كلاس لهذا الكود
SqlConnection con = new SqlConnection("server=.\\SQLEXPRESS;Database=estat;Integrated Security=True");
con.Open();
SqlCommand cmd = new SqlCommand("insert into premium (nametenant,amount,owner,charge,date,checkid,Voucher)values ('"+comboBox1.Text+"','" + textBox25.Text + "','"+comboBox4.Text+"','"+checkBox1.Checked+"','" + dateTimePicker3.Value.ToShortDateString() + "','" + textBox26.Text + "','" + textBox27.Text + "')", con);
cmd.ExecuteNonQuery();
con.close();