protected void bt_Replace_Click(object sender, EventArgs e) { if (select_OrgSupplier.SelectValue != "" && select_NewSupplier.SelectValue != "") { int newsupplier = int.Parse(select_NewSupplier.SelectValue); int count = CM_ClientBLL.ReplaceSupplier(int.Parse(select_OrgSupplier.SelectValue), (int)ViewState["Supplier"] != 0?newsupplier:0, (int)ViewState["Supplier2"] != 0?newsupplier:0); MessageBox.ShowAndClose(this, "成功批量替换" + count.ToString() + "个客户的" + ((int)ViewState["Supplier"] != 0?"成品":"赠品") + "供货商!"); } }