private void LoadDuLieu()
        {
            TruyVanLayDuLieu dao = new TruyVanLayDuLieu();

            data.DataSource = dao.Laydulieu("DanhMuc_Select");
            data.DataBind();
        }
示例#2
0
        private void LoadDuLieu()
        {
            TruyVanLayDuLieu dao = new TruyVanLayDuLieu();

            data.DataSource = dao.Laydulieu("SanPham_SelectAll");
            data.DataBind();
        }
示例#3
0
        private void LoadDanhMuc()
        {
            TruyVanLayDuLieu dao = new TruyVanLayDuLieu();

            chuyenmuc.DataSource     = dao.Laydulieu("DanhMuc_Select");
            chuyenmuc.DataTextField  = "TenDanhMuc";
            chuyenmuc.DataValueField = "MaDanhMuc";
            chuyenmuc.DataBind();
        }
示例#4
0
        private void LoadDuLieu()
        {
            string           id      = Request.QueryString["id"];
            TruyVanLayDuLieu truyvan = new TruyVanLayDuLieu();
            GridView         gr      = new GridView();

            gr.DataSource = truyvan.LaydulieubyID(id, "DanhMucByID_Select", "MaDanhMuc");
            gr.DataBind();
            if (gr.Rows.Count > 0)
            {
                txtMaDanhMuc.Text  = HttpUtility.HtmlDecode((string)(gr.Rows[0].Cells[0].Text.ToString()));
                txtTenDanhMuc.Text = HttpUtility.HtmlDecode((string)(gr.Rows[0].Cells[1].Text.ToString()));
            }
            else
            {
                Response.Redirect("qlchuyenmuc.aspx");
            }
        }
        private void LoadDuLieu()
        {
            string           id      = Request.QueryString["id"];
            TruyVanLayDuLieu truyvan = new TruyVanLayDuLieu();
            GridView         gr      = new GridView();

            gr.DataSource = truyvan.LaydulieubyID(id, "SanPhamByID_Select", "MaSanPham");
            gr.DataBind();
            if (gr.Rows.Count > 0)
            {
                txtMaSP.Text    = HttpUtility.HtmlDecode((string)(gr.Rows[0].Cells[0].Text.ToString()));
                txtTenSP.Text   = HttpUtility.HtmlDecode((string)(gr.Rows[0].Cells[1].Text.ToString()));
                txtMoTa.Text    = HttpUtility.HtmlDecode((string)(gr.Rows[0].Cells[2].Text.ToString()));
                fileName        = HttpUtility.HtmlDecode((string)(gr.Rows[0].Cells[3].Text.ToString()));
                Image1.ImageUrl = "~/images/" + fileName;
                txtGiaBan.Text  = HttpUtility.HtmlDecode((string)(gr.Rows[0].Cells[4].Text.ToString()));
                txtSLBan.Text   = HttpUtility.HtmlDecode((string)(gr.Rows[0].Cells[5].Text.ToString()));
            }
            else
            {
                Response.Redirect("qlchuyenmuc.aspx");
            }
        }