示例#1
0
        private void BindUserType()
        {
            ApplicationResult objResult = new ApplicationResult();

            objResult = new UserBL().User_SelectAll();
            if (objResult != null)
            {
                if (objResult.resultDT.Rows.Count > 0)
                {
                    HelperMethods objControls = new HelperMethods();
                    objControls.BindDropDown_ListBox(objResult.resultDT, ddlUserList, "Name", "ID");
                }
                else
                {
                    ClientScript.RegisterStartupScript(typeof(Page), "MessagePopUp", "<script>return alert('Please Add Users First.');</script>");
                }
                ddlUserList.Items.Insert(0, new ListItem("- Select User Type -", "-1"));
                ddlUserList.SelectedIndex = 1;
            }
        }