日期:2014-05-17 浏览次数:21101 次
//已经把所有feecard_type中所有的卡类型遍历进了combox1了
string card_class_sql = "select * from feecard_type_card order by card_id asc";
SqlConnection class_conn = new SqlConnection(fee_conn.sql_conn());
DataSet combox = new DataSet();
class_conn.Open();
SqlDataAdapter mycmd = new SqlDataAdapter(card_class_sql, class_conn);
mycmd.Fill(combox, "ds");
class_conn.Close();
comboBox1.DataSource = combox.Tables[0];
comboBox1.DisplayMember = "card_name";
comboBox1.ValueMember = "card_fee";
comboBox1.SelectedIndex = 0;
fee_id = int.Parse(park_fee_staffeditcard.staff_id);
string e_sql = "select * from staff_card where
staff_value_id = '" + fee_id + "'";
//在staff_card表中根据上一个窗体传递的ID查找卡资料
SqlConnection e_conn = new SqlConnection(fee_conn.sql_conn());
SqlCommand e_select = new SqlCommand(e_sql, e_conn);
try
{
e_conn.Open();
}
catch (System.Exception)
{
MessageBox.Show( MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
SqlDataReader e_rs = e_select.ExecuteReader();
{