string condition = "0";
//更新数据t_memcardmaintenance
strSql = "insert into t_memcardmaintenance (discountname,starttime,endtime," +
"condition,rebate,estate) values('" +
this.TextBox1.Text.Trim() + "'," + "'" + starttime + "'," + "'" +
endtime + "'," + "'" + condition + "'," + "'" + this.TextBox2.Text.Trim() + "'," + "'" + 0 + "')SELECT [memberdiscountid] = scope_identity()";
db.selQuery(strSql, ref dt);
//会员卡打折编号
string memberdiscountid = dt.Rows[0]["memberdiscountid"].ToString();