protected void save_Click(object sender, EventArgs e)
    {
        T_SettlementLog log = new T_SettlementLog();

        decimal out_amount    = Decimal.Parse(TextBox5.Text.Trim());
        decimal in_amount     = Decimal.Parse(TextBox6.Text.Trim());
        decimal exchange_rate = Decimal.Parse(txt_exchange_rate.Text.Trim());

        log.InSettlementAmount  = in_amount;
        log.OutSettlementAmount = out_amount;
        log.ExchangeRate        = exchange_rate;


        List <T_Account> lists = new List <T_Account>();
        T_Account        list  = new T_Account();

        list.AccountId   = txt_account_id.Text.Trim();
        list.OpeningBank = ddl_opening_bank.SelectedValue;
        list.AccountName = txt_account_name.Text.Trim();
        list.Amount      = Decimal.Parse(txt_amount.Text.Trim()) - out_amount;
        list.CurrencyID  = Int32.Parse(ddl_currency.SelectedValue);

        log.OutAccountId   = list.AccountId;
        log.OutOpeningBank = list.OpeningBank;
        log.OutAccountName = list.AccountName;
        log.OutAmount      = Decimal.Parse(txt_amount.Text.Trim());
        log.OutCurrencyid  = list.CurrencyID;

        lists.Add(list);

        list             = new T_Account();
        list.AccountId   = TextBox2.Text.Trim();
        list.OpeningBank = DropDownList2.SelectedValue;
        list.AccountName = TextBox3.Text.Trim();
        list.Amount      = Decimal.Parse(TextBox4.Text.Trim()) + in_amount;
        list.CurrencyID  = Int32.Parse(DropDownList1.SelectedValue);

        log.InAccountId   = list.AccountId;
        log.InOpeningBank = list.OpeningBank;
        log.InAccountName = list.AccountName;
        log.InAmount      = Decimal.Parse(TextBox4.Text.Trim());
        log.InCurrencyid  = list.CurrencyID;

        lists.Add(list);

        log.OperateTime = DateTime.Now;
        log.Operater    = UserInfoAdapter.CurrentUser.Name;



        try
        {
            AccountAdapter aa = new AccountAdapter();
            aa.updateLists(lists);
            aa.log(log);
            show();
            clean();
            Label1.Text = "结汇成功";
        }
        catch (Exception ex)
        {
            Label1.Text = ex.Message;
            return;
        }
    }