Пример #1
0
        private void LoadData()
        {
            OperationResult objOperationResult = new OperationResult();

            var dataListComponents = Sigesoft.Server.WebClientAdmin.BLL.Utils.GetComponentsFilter(ref objOperationResult);

            Utils.LoadDropDownList(ddlComponent, "Value1", "Id", dataListComponents, DropDownListAction.Select);

            if (Mode == "New")
            {
            }
            else if (Mode == "Edit")
            {
                ddlComponent.Enabled = false;

                var roleNodeComponentProfile = _nodeBL.GetRoleNodeComponentProfile(ref objOperationResult, RoleNodeComponentId);

                ddlComponent.SelectedValue = roleNodeComponentProfile.v_ComponentId;
                chkRead.Checked            = Convert.ToBoolean(roleNodeComponentProfile.i_Read);
                chkWrite.Checked           = Convert.ToBoolean(roleNodeComponentProfile.i_Write);

                if (roleNodeComponentProfile.i_Dx != -1)
                {
                    chkDx.Checked = Convert.ToBoolean(roleNodeComponentProfile.i_Dx);
                }
                else
                {
                    chkDx.Enabled = false;
                }

                if (roleNodeComponentProfile.i_Approved != -1)
                {
                    chkApproved.Checked = Convert.ToBoolean(roleNodeComponentProfile.i_Approved);
                }
                else
                {
                    chkApproved.Enabled = false;
                }

                Session["sroleNodeComponentProfile"] = roleNodeComponentProfile;
            }
        }