コード例 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     con = new SqlConnection("Data Source=.\\sqlexpress;Initial Catalog=mobilebanking;integrated security=sspi");
     if (!IsPostBack)
     {
         con.Open();
         com = new SqlCommand(" select name High_Balance_Customers from tblcurmain  where balance =(select max(balance)from tblcurmain) ", con);
         da  = new SqlDataAdapter(com);
         da.Fill(ds);
         ObjectList1.DataSource = ds;
         ObjectList1.DataBind();
     }
 }
コード例 #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     con = new SqlConnection("Data Source=.\\sqlexpress;Initial Catalog=mobilebanking;integrated security=sspi");
     if (!IsPostBack)
     {
         string ac1 = Request.QueryString["id"].ToString();
         con.Open();
         com = new SqlCommand("select top 5 dat Date, tim Time,trans Account_Id,amount Amount,trandetail Transaction_Type from tblcurtran where  accid='" + ac1.ToString() + "'  order by  dat desc", con);
         da  = new SqlDataAdapter(com);
         da.Fill(ds);
         ObjectList1.DataSource = ds;
         ObjectList1.DataBind();
         con.Close();
     }
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        con = new SqlConnection("Data Source=.\\sqlexpress;Initial Catalog=mobilebanking;integrated security=sspi");
        if (!IsPostBack)
        {
            string ac, da1;

            con.Open();
            com = new SqlCommand("select uname user_name,cloan car_loan,hloan Home_loan,tloan Two_wheeler_loan,eloan education_loan from tblloan ", con);
            da  = new SqlDataAdapter(com);
            da.Fill(ds);
            ObjectList1.DataSource = ds;
            ObjectList1.DataBind();
            con.Close();
        }
    }
コード例 #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     con = new SqlConnection("Data Source=.\\sqlexpress;Initial Catalog=mobilebanking;integrated security=sspi");
     if (!IsPostBack)
     {
         string ac, da1;
         ac  = Session["accid1"].ToString();
         da1 = Session["dat1"].ToString();
         con.Open();
         com = new SqlCommand("select tim Time,trans Account_Id,amount Amount,trandetail Transaction_Type from tblcurtran where dat= '" + da1.ToString() + "'and accid='" + ac.ToString() + "'", con);
         da  = new SqlDataAdapter(com);
         da.Fill(ds);
         ObjectList1.DataSource = ds;
         ObjectList1.DataBind();
         con.Close();
     }
 }