Пример #1
0
    protected void Button2_Click(object sender, EventArgs e)
    {
        int      x, y, z, w;
        Double   a, b, c;
        DataView dv = (DataView)SqlDataSource1.Select(DataSourceSelectArguments.Empty);

        foreach (DataRow dr in dv.Table.Rows)
        {
            x             = (int)dv.Table.Rows[0][3];
            y             = (int)dv.Table.Rows[0][1];
            TextBox5.Text = y.ToString();
            DataView dv2 = (DataView)amSelect.Select(DataSourceSelectArguments.Empty);
            w             = (int)dv2.Table.Rows[0][1];
            w             = w - x;
            TextBox4.Text = w.ToString();
            amSelect.Update();
        }
        TagUpdate.Update();
        DataView dv3 = (DataView)PerformanceBondSelect.Select(DataSourceSelectArguments.Empty);

        a = (Double)dv3.Table.Rows[0][0];
        DataView dv4 = (DataView)TotalAccum.Select(DataSourceSelectArguments.Empty);

        b = (Double)dv4.Table.Rows[0][0];
        a = a - b;
        if (a > 0)
        {
            amnt.Text = a.ToString();
            Refunded.Insert();
        }
        else if (a < 0)
        {
            a         = Math.Abs(a);
            amnt.Text = a.ToString();
            BalanceAgain.Update();
            TagUpdate0.Update();
        }
        else
        {
            TagUpdate1.Update();
        }
        Response.Redirect("~/admin/EOS0.aspx?rr=1");
    }