protected void Button1_Click(object sender, EventArgs e) { Ord = new orders(); Ord.setP_id(p_id.Text); Ord.setPr_number(pr_number.Text); Ord.setS_amount(int.Parse(s_amount.Text)); Ord.setS_date(s_date.Text); Ord.setS_e_id(s_e_id.Text); Ord.setS_get(Convert.ToDouble(s_get.Text)); Ord.setS_id(s_id.Text); Ord.setS_price(Convert.ToInt32(s_price.Text)); Ord.setS_return(Convert.ToDouble(s_return.Text)); Ord.setS_summary(Convert.ToDouble(s_summary.Text)); Ord.setS_way(s_way.Text); bool flag = SS.returnPhone(Ord); if (flag) { Response.Write("<script>alert('退货成功');</script>"); // 建立实例 IncomeExpenseAction IEA = new IncomeExpenseAction(); // 新建收支明细对象 IEA.addIncomeExpense(); // 设置交易内容 IEA.setIEDeal(Ord.getS_amount(), "", "", "", ""); // 设置交易人内容 IEA.setIEDealMan(DateTime.Now.ToShortDateString(), "支出", "现金交易", Ord.getS_e_id()); // 设置交易备注 IEA.setIENote(""); // 提交并操作 IEA.submit(); } else { Response.Write("<script>alert('退货失败');</script>"); } }