protected void ddlNhomLSP_SelectedIndexChanged(object sender, EventArgs e) { if (ddlNhomLSP.SelectedValue.Length != 0) { ddlLoaiSP.DataSource = ProductTypeBUS.SelectingAllProductTypeByGroup(int.Parse(ddlNhomLSP.SelectedValue)); ddlLoaiSP.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { DropDownList1.DataSource = ProductTypeBUS.SelectingAllProductType(); DropDownList1.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { int isLogIn; int.TryParse(Session["IsLogin"].ToString(), out isLogIn); if (isLogIn == 1) { string typeUser = Session["LoaiUser"].ToString(); if (typeUser == "Manager") { if (!IsPostBack) { //ddlLoaiSP.DataSource = ProductBUS.SelectingAllProduct(); ddlNhomLSP.DataSource = ProductTypeGroupBUS.SelectingAllProductTypeGroup(); ddlNhomLSP.DataBind(); if (ddlNhomLSP.SelectedValue.Length != 0) { ddlLoaiSP.DataSource = ProductTypeBUS.SelectingAllProductTypeByGroup(int.Parse(ddlNhomLSP.SelectedValue)); ddlLoaiSP.DataBind(); } /*ddlLoaiSP.DataSource = ProductTypeBUS.SelectingAllProductType(); * ddlLoaiSP.DataBind();*/ } } else { Response.Redirect("../Shared/Default.aspx"); } } else { Response.Redirect("../Shared/Default.aspx"); } }
public ActionResult Producer() { return(View(ProductTypeBUS.ListProducer())); }
protected void Page_Load(object sender, EventArgs e) { int isLogIn; int.TryParse(Session["IsLogin"].ToString(), out isLogIn); if (isLogIn == 1) { string typeUser = Session["LoaiUser"].ToString(); if (typeUser == "Manager") { #region hiển thị thông tin sản phẩm if (!IsPostBack) { //lấy mã sản phẩm string masp = Request.QueryString["masp"]; if (masp != "") { SAN_PHAM_DTO sp = ProductBUS.LayThongTinSanPhamTheoMaSP(masp); lbMaSP.Text = sp.MaSanPham; //xử lý mã loại sp //lbMaLSP.Text=sp.MaLoaiSanPham.ToString(); LOAISP_DTO lsp = ProductTypeBUS.LayLoaiSanPhamTheoMaLoaiSP(sp.MaLoaiSanPham); lbMaLSP.Text = lsp.TenLoaiSanPham; lbTenSP.Text = sp.TenSanPham; txtareMota.Value = sp.MoTaSanPham; //xử lý hình ảnh ImageSP.ImageUrl = sp.HinhAnh; txtChatLuong.Text = sp.ChatLuong; txtGiaBan.Text = sp.Gia.ToString(); txtSoLuong.Text = sp.SoLuong.ToString(); txtDonVi.Text = sp.DonViTinh; lbSoLuongConLai.Text = sp.SoLuongConLai.ToString(); lbNgayDangSP.Text = sp.NgayDangSanPham.ToString("dd/MM/yyyy"); lbNgaySuaDoi.Text = sp.NgaySuaDoi.ToString("dd/MM/yyyy"); //xử lý tình trạng radiobtnTinhTrang.SelectedValue = sp.TinhTrangSanPham; if (radiobtnTinhTrang.SelectedValue == "0") { radiobtnTinhTrang.Items[0].Enabled = true; } else { radiobtnTinhTrang.Items[1].Enabled = true; } //không hiển thị ngày xóa txtSoNguoiMua.Text = sp.SoNguoiMua.ToString(); } } #endregion } else { Response.Redirect("../Shared/Default.aspx"); } } else { Response.Redirect("../Shared/Default.aspx"); } }