コード例 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Session["user"] != null)
                {
                    profile_lbl.Text = Session["user_name"].ToString();
                }

                bm.user_id = Session["user_id"].ToString();


                return_class rt = new return_class();

                SqlDataReader reader = rt.search_data_for_user(bm);

                if (reader.HasRows)
                {
                    History_Grid.DataSource = reader;
                    History_Grid.DataBind();
                }
                else
                {
                    this.msg_lbl.Text = "No history found";
                }
            }
        }
コード例 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Session["user"] != null)
                {
                    profile_lbl.Text = Session["user_name"].ToString();
                }

                bm.user_id = Session["user_id"].ToString();

                
                return_class rt = new return_class();
                
                SqlDataReader reader = rt.search_data_for_user(bm);

                if (reader.HasRows)
                {
                    History_Grid.DataSource = reader;
                    History_Grid.DataBind();
                }
                else
                {
                    this.msg_lbl.Text = "No history found";
                }


            }
        }
コード例 #3
0
        protected void databinding(string key)
        {
            return_class rt = new return_class();
            SqlDataReader rdr = rt.search_id_info(key);

            SqlDataReader reader = rt.search_borrow_tab(key);


            if (rdr.HasRows)
            {
                while (rdr.Read())
                {
                    this.name_lbl.Text = rdr.GetString(2).ToString();
                    this.ID_lbl.Text = rdr.GetString(1).ToString();
                    this.acc_lbl.Text = rdr.GetString(5).ToString();
                }
            }

            result_grid.DataSource = reader;
            result_grid.DataBind();
        }
コード例 #4
0
        protected void databinding(string key)
        {
            return_class  rt  = new return_class();
            SqlDataReader rdr = rt.search_id_info(key);

            SqlDataReader reader = rt.search_borrow_tab(key);


            if (rdr.HasRows)
            {
                while (rdr.Read())
                {
                    this.name_lbl.Text = rdr.GetString(2).ToString();
                    this.ID_lbl.Text   = rdr.GetString(1).ToString();
                    this.acc_lbl.Text  = rdr.GetString(5).ToString();
                }
            }

            result_grid.DataSource = reader;
            result_grid.DataBind();
        }