public void LoadCombox() { _Anphamdefault = UltilFunc.GetColumnValuesOne("T_AnPham", " Ma_AnPham", "Ma_QT=" + _Ma_QTBT); UltilFunc.BindCombox(cbo_Anpham, "Ma_Anpham", "Ten_Anpham", "T_Anpham", " Ma_QT in (select Ma_QTBT from T_NguoidungQTBT where Ma_Nguoidung=" + _user.UserID + ")", (string)HttpContext.GetGlobalResourceObject("cms.language", "lblChonanpham")); if (_Anphamdefault > 0) cbo_Anpham.SelectedValue = _Anphamdefault.ToString(); cbo_chuyenmuc.Items.Clear(); cboSoBao.Items.Clear(); if (cbo_Anpham.SelectedIndex > 0) { UltilFunc.BindComboxSoBao(cboSoBao, int.Parse(cbo_Anpham.SelectedValue.ToString()), 0); UltilFunc.BindCombox_CategoryDequy(cbo_chuyenmuc, "Ma_ChuyenMuc", "Ten_ChuyenMuc", "T_ChuyenMuc", " WHERE Ma_ChuyenMuc in (select Ma_ChuyenMuc from T_Nguoidung_Chuyenmuc where Ma_Nguoidung = " + _user.UserID.ToString() + ") and Ma_AnPham= " + cbo_Anpham.SelectedValue, (string)HttpContext.GetGlobalResourceObject("cms.language", "lblChonchuyenmuc"), "Ma_Chuyenmuc_Cha"); } else { cbo_chuyenmuc.DataSource = null; cbo_chuyenmuc.DataBind(); cboSoBao.DataSource = null; cboSoBao.DataBind(); } bintrang(int.Parse(cbo_Anpham.SelectedValue)); }
protected void Page_Load(object sender, EventArgs e) { _user = _NguoidungDAL.GetUserByUserName(HPCSecurity.CurrentUser.Identity.Name); if (!IsPostBack) { if (Session["MaAnPham"] == null) { Page.Response.Redirect("~/login.aspx", true); } PanelLisTin.Visible = true; PnlDetail.Visible = false; if (Session["MaAnPham"] != null) { UltilFunc.BindCombox(cboAnPham, "Ma_Anpham", "Ten_Anpham", "T_Anpham", "1=1", "---Tất cả---"); cboSoBao.Items.Clear(); bool Flag = bool.Parse(System.Configuration.ConfigurationManager.AppSettings["Flag"].ToString()); if (!Flag) { cboAnPham.SelectedValue = Session["MaAnPham"].ToString(); if (cboAnPham.SelectedIndex > 0) { UltilFunc.BindComboxSoBao(cboSoBao, int.Parse(cboAnPham.SelectedValue.ToString()), 0); bintrang(int.Parse(cboAnPham.SelectedValue)); } else { cboSoBao.DataSource = null; cboSoBao.DataBind(); } } } } }
protected void Page_Load(object sender, EventArgs e) { if (Request["Menu_ID"] != null && Request["Menu_ID"].ToString() != "" && Request["Menu_ID"].ToString() != String.Empty) { if (CommonLib.IsNumeric(Request["Menu_ID"]) == true) { if (!HPCSecurity.IsAccept(Convert.ToInt32(Request["Menu_ID"]))) { Response.Redirect("~/Errors/AccessDenied.aspx"); } _user = _NguoidungDAL.GetUserByUserName(HPCSecurity.CurrentUser.Identity.Name); _Role = _NguoidungDAL.GetRole4UserMenu(_user.UserID, Convert.ToInt32(Request["Menu_ID"])); if (!IsPostBack) { LoadCombox(); cbo_chuyenmuc.Items.Clear(); cboSoBao.Items.Clear(); if (cboAnPham.SelectedIndex > 0) { UltilFunc.BindComboxSoBao(cboSoBao, int.Parse(cboAnPham.SelectedValue.ToString()), 1); UltilFunc.BindCombox_CategoryDequy(cbo_chuyenmuc, "Ma_ChuyenMuc", "Ten_ChuyenMuc", "T_ChuyenMuc", " WHERE Ma_ChuyenMuc in (select Ma_ChuyenMuc from T_Nguoidung_Chuyenmuc where Ma_Nguoidung = " + _user.UserID.ToString() + ") and Ma_AnPham= " + cboAnPham.SelectedValue, CommonLib.ReadXML("lblTatca"), "Ma_Chuyenmuc_Cha"); } else { cbo_chuyenmuc.DataSource = null; cbo_chuyenmuc.DataBind(); cboSoBao.DataSource = null; cboSoBao.DataBind(); } } } } }
protected void cbo_loaibao_SelectedIndexChanged(object sender, EventArgs e) { if (cbo_loaibao.SelectedIndex > 0) { UltilFunc.BindComboxSoBao(cbo_sobao, int.Parse(cbo_loaibao.SelectedValue.ToString()), 0); } else { cbo_sobao.DataSource = null; cbo_sobao.DataBind(); } bintrang(int.Parse(cbo_loaibao.SelectedValue.ToString())); }
protected void cboAnPham_SelectedIndexChanged(object sender, EventArgs e) { cboSoBao.Items.Clear(); if (cboAnPham.SelectedIndex > 0) { UltilFunc.BindComboxSoBao(cboSoBao, int.Parse(cboAnPham.SelectedValue.ToString()), 0); bintrang(int.Parse(cboAnPham.SelectedValue.ToString())); } else { cboSoBao.DataSource = null; cboSoBao.DataBind(); } }
protected void cboAnPham_SelectedIndexChanged(object sender, EventArgs e) { cboSoBao.Items.Clear(); if (cboAnPham.SelectedIndex > 0) { UltilFunc.BindComboxSoBao(cboSoBao, "Ma_Sobao", "Ten_Sobao", "Ten_Sobao", "Ngay_Xuatban", "T_Sobao", "", cboAnPham.SelectedValue.ToString()); cboSoBao.AutoPostBack = true; } else { cboSoBao.DataSource = null; cboSoBao.DataBind(); cboSoBao.AutoPostBack = true; } BindListPageBySobao(0); }
protected void cboAnPham_SelectedIndexChanged(object sender, EventArgs e) { cbo_chuyenmuc.Items.Clear(); cboSoBao.Items.Clear(); if (cboAnPham.SelectedIndex > 0) { UltilFunc.BindComboxSoBao(cboSoBao, int.Parse(cboAnPham.SelectedValue.ToString()), 1); UltilFunc.BindCombox_CategoryDequy(cbo_chuyenmuc, "Ma_ChuyenMuc", "Ten_ChuyenMuc", "T_ChuyenMuc", " WHERE Ma_ChuyenMuc in (select Ma_ChuyenMuc from T_Nguoidung_Chuyenmuc where Ma_Nguoidung = " + _user.UserID.ToString() + ") and Ma_AnPham= " + cboAnPham.SelectedValue, "-Chọn chuyên mục-", "Ma_Chuyenmuc_Cha"); } else { cbo_chuyenmuc.DataSource = null; cbo_chuyenmuc.DataBind(); cboSoBao.DataSource = null; cboSoBao.DataBind(); } }
protected void cboAnPham_SelectedIndexChanged(object sender, EventArgs e) { cbo_chuyenmuc.Items.Clear(); cboSoBao.Items.Clear(); if (cboAnPham.SelectedIndex > 0) { UltilFunc.BindComboxSoBao(cboSoBao, int.Parse(cboAnPham.SelectedValue.ToString()), 0); UltilFunc.BindCombox_CategoryDequy(cbo_chuyenmuc, "Ma_ChuyenMuc", "Ten_ChuyenMuc", "T_ChuyenMuc", " WHERE Ma_ChuyenMuc in (select Ma_ChuyenMuc from T_Nguoidung_Chuyenmuc where Ma_Nguoidung = " + _user.UserID.ToString() + ") and Ma_AnPham= " + cboAnPham.SelectedValue, (string)HttpContext.GetGlobalResourceObject("cms.language", "lblChonchuyenmuc"), "Ma_Chuyenmuc_Cha"); } else { cbo_chuyenmuc.DataSource = null; cbo_chuyenmuc.DataBind(); cboSoBao.DataSource = null; cboSoBao.DataBind(); } bintrang(int.Parse(cboAnPham.SelectedValue.ToString())); }
protected void Page_Load(object sender, EventArgs e) { if (Request["Menu_ID"] != null && Request["Menu_ID"].ToString() != "" && Request["Menu_ID"].ToString() != String.Empty) { if (CommonLib.IsNumeric(Request["Menu_ID"]) == true) { if (!HPCSecurity.IsAccept(Convert.ToInt32(Request["Menu_ID"]))) { Response.Redirect("~/Errors/AccessDenied.aspx"); } _user = _NguoidungDAL.GetUserByUserName(HPCSecurity.CurrentUser.Identity.Name); _Role = _NguoidungDAL.GetRole4UserMenu(_user.UserID, Convert.ToInt32(Request["Menu_ID"])); } if (!IsPostBack) { UltilFunc.BindCombox(cbo_anpham, "Ma_Anpham", "Ten_Anpham", "T_Anpham", " 1=1", "---Chọn ấn phẩm---"); cbo_anpham.SelectedValue = Global.DefaultCombobox; UltilFunc.BindComboxSoBao(cboSoBao, int.Parse(cbo_anpham.SelectedValue.ToString()), 0); bintrang(int.Parse(cbo_anpham.SelectedValue.ToString())); } } }
protected void Page_Load(object sender, EventArgs e) { { if (CommonLib.IsNumeric(Request["Menu_ID"]) == true) { if (!HPCSecurity.IsAccept(Convert.ToInt32(Request["Menu_ID"]))) { Response.Redirect("~/Errors/AccessDenied.aspx"); } _user = _NguoidungDAL.GetUserByUserName(HPCSecurity.CurrentUser.Identity.Name); _Role = _NguoidungDAL.GetRole4UserMenu(_user.UserID, Convert.ToInt32(Request["Menu_ID"])); if (!IsPostBack) { if (_user != null) { LoadCombox(); cbo_Sobao.Items.Clear(); if (cbo_Anpham.SelectedIndex > 0) { UltilFunc.BindComboxSoBao(cbo_Sobao, int.Parse(cbo_Anpham.SelectedValue.ToString()), 0); bintrang(int.Parse(cbo_Anpham.SelectedValue.ToString())); } else { cbo_Sobao.DataSource = null; cbo_Sobao.DataBind(); } } else { Page.Response.Redirect("~/login.aspx", true); } } } } }
protected void Page_Load(object sender, EventArgs e) { if (Request["Menu_ID"] != null && Request["Menu_ID"].ToString() != "" && Request["Menu_ID"].ToString() != String.Empty) { if (CommonLib.IsNumeric(Request["Menu_ID"]) == true) { if (!HPCSecurity.IsAccept(Convert.ToInt32(Request["Menu_ID"]))) { Response.Redirect("~/Errors/AccessDenied.aspx"); } _user = _NguoidungDAL.GetUserByUserName(HPCSecurity.CurrentUser.Identity.Name); _Role = _NguoidungDAL.GetRole4UserMenu(_user.UserID, Convert.ToInt32(Request["Menu_ID"])); this.btn_chamnhuanbut.Attributes.Add("onclick", "return CheckConfirmGuiTinbai('Are you sure you want royalties photo?',ctl00_MainContent_DataGrid_tinbaiAnh_ctl01_chkAll);"); if (!IsPostBack) { LoadCombox(); cbo_chuyenmuc.Items.Clear(); cboSoBao.Items.Clear(); if (cboAnPham.SelectedIndex > 0) { UltilFunc.BindComboxSoBao(cboSoBao, int.Parse(cboAnPham.SelectedValue.ToString()), 1); UltilFunc.BindCombox_CategoryDequy(cbo_chuyenmuc, "Ma_ChuyenMuc", "Ten_ChuyenMuc", "T_ChuyenMuc", " WHERE Ma_ChuyenMuc in (select Ma_ChuyenMuc from T_Nguoidung_Chuyenmuc where Ma_Nguoidung = " + _user.UserID.ToString() + ") and Ma_AnPham= " + cboAnPham.SelectedValue, CommonLib.ReadXML("lblChonchuyenmuc"), "Ma_Chuyenmuc_Cha"); } else { cbo_chuyenmuc.DataSource = null; cbo_chuyenmuc.DataBind(); cboSoBao.DataSource = null; cboSoBao.DataBind(); } LoadData(); } } } }
protected void Page_Load(object sender, EventArgs e) { if (Request["Menu_ID"] != null && Request["Menu_ID"].ToString() != "" && Request["Menu_ID"].ToString() != String.Empty) { if (CommonLib.IsNumeric(Request["Menu_ID"]) == true) { if (!HPCSecurity.IsAccept(Convert.ToInt32(Request["Menu_ID"]))) Response.Redirect("~/Errors/AccessDenied.aspx"); _user = _NguoidungDAL.GetUserByUserName(HPCSecurity.CurrentUser.Identity.Name); _Role = _NguoidungDAL.GetRole4UserMenu(_user.UserID, Convert.ToInt32(Request["Menu_ID"])); _Ma_QTBT = UltilFunc.GetColumnValuesOne("T_NguoidungQTBT", " Ma_QTBT", "Ma_Nguoidung=" + _user.UserID); this.LinkAdd.Visible = _Role.R_Read; this.LinkDelete.Visible = _Role.R_Delete; Pager7.PageIndex = 0; if (!IsPostBack) { if (_user != null) { LoadCombox(); if (Session["LoaibaoE"] != null && Session["SobaoE"] != null) { cbo_Anpham.SelectedValue = Session["LoaibaoE"].ToString(); if (cbo_Anpham.SelectedIndex > 0) { UltilFunc.BindComboxSoBao(cboSoBao, int.Parse(cbo_Anpham.SelectedValue.ToString()), 0); UltilFunc.BindCombox_CategoryDequy(cbo_chuyenmuc, "Ma_ChuyenMuc", "Ten_ChuyenMuc", "T_ChuyenMuc", " WHERE Ma_ChuyenMuc in (select Ma_ChuyenMuc from T_Nguoidung_Chuyenmuc where Ma_Nguoidung = " + _user.UserID.ToString() + ") and Ma_AnPham= " + cbo_Anpham.SelectedValue, (string)HttpContext.GetGlobalResourceObject("cms.language", "lblChonchuyenmuc"), "Ma_Chuyenmuc_Cha"); bintrang(int.Parse(cbo_Anpham.SelectedValue.ToString())); } cboSoBao.SelectedValue = Session["SobaoE"].ToString(); if (Session["TrangE"] != null) cboPage.SelectedValue = Session["TrangE"].ToString(); } int tab_id = 0; if (Session["CurrentPage"] != null) Pager7.PageIndex = int.Parse(Session["CurrentPage"].ToString()); if (Request["Tab"] != null) { tab_id = Convert.ToInt32(Request["Tab"].ToString()); } if (tab_id == -1) { this.TabContainer1.ActiveTabIndex = 0; this.TabContainer1_ActiveTabChanged(sender, e); } else { this.TabContainer1.ActiveTabIndex = tab_id; this.TabContainer1_ActiveTabChanged(sender, e); } GetTotalRecordTinBai(); BindDoiTuongGuiBai(); } else Page.Response.Redirect("~/login.aspx", true); } } } }