Ejemplo n.º 1
0
        private void ShowInfo(int _id)
        {
            BLL.department   bll   = new BLL.department();
            Model.department model = bll.GetModel(_id);

            TreeBind();
            ddlParentId.SelectedValue = model.de_parentid.ToString();
            string _treeText = string.Empty, _treeid = string.Empty;

            bll.getDepartText(_id, out _treeText, out _treeid, out string area);
            labDepartText.Text = _treeText;
            initData();
            ddltype.SelectedValue = model.de_type.ToString();
            txtSortId.Text        = model.de_sort.ToString();
            txtTitle.Text         = model.de_name;
            txtSubTitle.Text      = model.de_subname;
            txtArea.Text          = model.de_area;
            isgroupDiv.Visible    = false;
            if (model.de_isGroup.Value)
            {
                labIsGroup.Text   = "是";
                cbIsGroup.Checked = true;
            }
            else
            {
                labIsGroup.Text   = "否";
                cbIsGroup.Checked = false;
            }
            if (model.de_isUse.Value)
            {
                cbIsUse.Checked = true;
            }
            else
            {
                cbIsUse.Checked = false;
            }
            if (model.de_type == 2 || model.de_type == 3)
            {
                dlsubtitle.Visible = false;
                dlarea.Visible     = false;
                dlgroup.Visible    = false;
            }
            txtSubTitle.Enabled = false;
            txtArea.Enabled     = false;
            ddlParentId.Enabled = false;
            ddltype.Enabled     = false;
        }