protected void btnCancel_Click(object sender, EventArgs e) { ErrorMsgLabel.Text = ""; ErrorMsgLabel2.Text = ""; GridView1.DataSource = null; GridView1.DataBind(); BCO.VAM22_BCO bco = new BCO.VAM22_BCO(ConnectionDB); ParameterList.Clear(); ParameterList.Add(DBPara(slpKEYIN_DATE.Text, ParaType.Date)); ParameterList.Add(DBPara(slpTAX_TYPE.Text, ParaType.Number)); ParameterList.Add(Session["UID"].ToString()); ParameterList.Add(DateTime.Now); int i = bco.DeleteAutoDisc(ParameterList); if (i == 0) ErrorMsgLabel.Text = "查無自動折讓的資料"; else ErrorMsgLabel.Text = "解除成功,共處理 " + i.ToString() + " 筆折讓單"; }