Exemple #1
0
        public void HienThiDropbox()
        {
            string UserID     = Session["UserID"].ToString();
            string CongTY     = "LTY";
            string themjsysid = (string)Session["themjsysid"];

            if (themjsysid != null)
            {
                DataTable dt1 = dal.HienThiDuLieuLeDropBoxThem(UserID, CongTY, themjsysid);
                if (dt1.Rows.Count > 0)
                {
                    DropDownSystem.DataSource     = dt1;
                    DropDownSystem.DataValueField = "jsysid";
                    DropDownSystem.DataTextField  = "SystemName";
                    DropDownSystem.DataBind();
                }
            }
            else
            {
                DataTable dt = dal.HienThiDuLieuLeDropBox(UserID, CongTY);
                if (dt.Rows.Count > 0)
                {
                    DropDownSystem.DataSource     = dt;
                    DropDownSystem.DataValueField = "jsysid";
                    DropDownSystem.DataTextField  = "SystemName";
                    DropDownSystem.DataBind();
                }
            }
        }
        public void HienThiDropSystem()
        {
            string    UserID = Session["UserID"].ToString();
            string    GSBH   = conty;
            DataTable dt     = dalSystem.HienThiDropBoxSystem(UserID, GSBH);

            if (dt.Rows.Count > 0)
            {
                DropDownSystem.DataSource     = dt;
                DropDownSystem.DataValueField = "jsysid";
                DropDownSystem.DataTextField  = "SystemName";
                DropDownSystem.DataBind();
            }
            else
            {
                DropDownSystem.Items.Clear();
            }
        }
        public void HienThiDropDowSystem()
        {
            string    UserID = (string)Session["UserID"];
            string    GSBH   = (string)Session["congty"];
            DataTable dt     = dal.HienThiDropDowSystemTheoUserID(GSBH, UserID);

            if (dt.Rows.Count > 0)
            {
                DropDownSystem.DataSource     = dt;
                DropDownSystem.DataValueField = "jsysid";
                DropDownSystem.DataTextField  = "SysTemName";
                DropDownSystem.DataBind();
            }
            else
            {
                DropDownSystem.DataSource = dt;

                DropDownSystem.DataBind();
            }
        }