示例#1
0
        protected void ShowLinkButtonControls(Control control)
        {
            List <LinkButton> listLinkButton = BaseHelper.GetAllControlsRecusrvive <LinkButton>(control).ToList();

            //listLinkButton.ForEach(s => s.Visible = false);
            //listLinkButton.Where(s => s.ID != null && !s.ID.Contains("lbtnOpenDirectory")).ToList().ForEach(s => s.Visible = false);

            listLinkButton.Where(s => s.ID == null).ToList().ForEach(s => s.Enabled = true);
            listLinkButton.Where(s => s.ID != null).ToList().ForEach(s => s.Visible = true);
            listLinkButton.Where(s => s.ID != null && s.ID.Contains("lbtnOpenDirectory")).ToList().ForEach(s => s.Visible = true);
        }
示例#2
0
        protected void HideButtonControls(Control control, List <string> listExceptionIDs)
        {
            List <Button> listButton = BaseHelper.GetAllControlsRecusrvive <Button>(control).ToList();

            if (listExceptionIDs != null)
            {
                listButton.Where(w => w.ID == null ||
                                 (w.ID != null && !listExceptionIDs.Contains(w.ID))).ToList().ForEach(s => s.Visible = false);
            }
            else
            {
                listButton.ForEach(s => s.Visible = false);
            }
        }
示例#3
0
        protected void EnableDropDownListControls(Control control)
        {
            List <DropDownList> list = BaseHelper.GetAllControlsRecusrvive <DropDownList>(control).ToList();

            list.ForEach(s => s.Enabled = true);
        }
示例#4
0
        protected void EnableTextBoxControls(Control control)
        {
            List <TextBox> listTextBox = BaseHelper.GetAllControlsRecusrvive <TextBox>(control).ToList();

            listTextBox.ForEach(s => s.Enabled = true);
        }
示例#5
0
        protected void ShowButtonControls(Control control)
        {
            List <Button> listButton = BaseHelper.GetAllControlsRecusrvive <Button>(control).ToList();

            listButton.ForEach(s => s.Visible = true);
        }