Exemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        sqlFunction<CoinOrderMap> sqlFunc = new sqlFunction<CoinOrderMap>();
        SqlCommand command1 = new SqlCommand(string.Format("SELECT * FROM coinOrder WHERE CT = '{0}' AND OT = 'Sell' ORDER BY perCoin ASC;",ddlCoinType.SelectedValue.ToString()));
        DataTable dt1 = sqlFunc.dbActionSet(command1, databaseAction.Read);
        dgSell.DataSource = dt1;
        dgSell.DataBind();

        SqlCommand command2 = new SqlCommand(string.Format("SELECT * FROM coinOrder WHERE CT = '{0}' AND OT = 'Buy' ORDER BY perCoin ASC;", ddlCoinType.SelectedValue.ToString()));
        DataTable dt2 = sqlFunc.dbActionSet(command2, databaseAction.Read);
        dgBuy.DataSource = dt2;
        dgBuy.DataBind();
    }
Exemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        sqlFunction <CoinOrderMap> sqlFunc = new sqlFunction <CoinOrderMap>();
        SqlCommand command1 = new SqlCommand(string.Format("SELECT * FROM coinOrder WHERE CT = '{0}' AND OT = 'Sell' ORDER BY perCoin ASC;", ddlCoinType.SelectedValue.ToString()));
        DataTable  dt1      = sqlFunc.dbActionSet(command1, databaseAction.Read);

        dgSell.DataSource = dt1;
        dgSell.DataBind();

        SqlCommand command2 = new SqlCommand(string.Format("SELECT * FROM coinOrder WHERE CT = '{0}' AND OT = 'Buy' ORDER BY perCoin ASC;", ddlCoinType.SelectedValue.ToString()));
        DataTable  dt2      = sqlFunc.dbActionSet(command2, databaseAction.Read);

        dgBuy.DataSource = dt2;
        dgBuy.DataBind();
    }
Exemplo n.º 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         sqlFunction <PrimaryAccountMap> sqlFunc = new sqlFunction <PrimaryAccountMap>();
         SqlCommand command = new SqlCommand("SELECT * FROM primaryAccount;");
         DataTable  dt      = sqlFunc.dbActionSet(command, databaseAction.Read);
         Session["tableData"]      = dt;
         dgAccountsView.DataSource = dt;
         dgAccountsView.DataBind();
     }
 }
Exemplo n.º 4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         sqlFunction<PrimaryAccountMap> sqlFunc = new sqlFunction<PrimaryAccountMap>();
         SqlCommand command = new SqlCommand("SELECT * FROM primaryAccount;");
         DataTable dt = sqlFunc.dbActionSet(command,databaseAction.Read);
         Session["tableData"] = dt;
         dgAccountsView.DataSource = dt;
         dgAccountsView.DataBind();
     }
 }
Exemplo n.º 5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         sqlFunction<PrimaryAccountMap> sqlFunc = new sqlFunction<PrimaryAccountMap>();
         SqlCommand command = new SqlCommand(string.Format("SELECT * FROM totalCoins WHERE amount > {0} AND amount < {1} ORDER BY id;", Request.QueryString["min"].ToString(), Request.QueryString["max"].ToString()));
         DataTable dt = sqlFunc.dbActionSet(command, databaseAction.Read);
         Session["tableData"] = dt;
         dgTotalCoins.DataSource = dt;
         dgTotalCoins.DataBind();
     }
 }
Exemplo n.º 6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         sqlFunction <PrimaryAccountMap> sqlFunc = new sqlFunction <PrimaryAccountMap>();
         SqlCommand command = new SqlCommand(string.Format("SELECT * FROM totalCoins WHERE amount > {0} AND amount < {1} ORDER BY id;", Request.QueryString["min"].ToString(), Request.QueryString["max"].ToString()));
         DataTable  dt      = sqlFunc.dbActionSet(command, databaseAction.Read);
         Session["tableData"]    = dt;
         dgTotalCoins.DataSource = dt;
         dgTotalCoins.DataBind();
     }
 }