示例#1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            MDBInformation mProfile = DBInformationUtility.DBInformation();

            lblVersion.Text = mProfile.Version;
            NameValuePairUtility.SetDropSelection(dropEnableInheritance, mProfile.EnableInheritance.ToString());
        }
示例#2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string   rowFilter  = "FUNCTION_TYPE_SEQ_ID <> 2 AND FUNCTION_TYPE_SEQ_ID <> 3";
            DataView myDataView = AccountUtility.GetMenu(AccountUtility.CurrentProfile().Account, MenuType.Hierarchical).DefaultView;

            myDataView.Sort             = "Title asc";
            myDataView.RowFilter        = rowFilter;
            dropFavorite.DataSource     = myDataView;
            dropFavorite.DataValueField = "url";
            dropFavorite.DataTextField  = "Title";
            dropFavorite.DataBind();
            txtPreferedRecordsPerPage.Text = ClientChoicesState[MClientChoices.RecordsPerPage].ToString();
            NameValuePairUtility.SetDropSelection(dropFavorite, ClientChoicesState[MClientChoices.Action].ToString());
            int X = 0;

            for (X = 1; X <= 5; X++)
            {
                HtmlInputRadioButton button = (HtmlInputRadioButton)this.FindControl("Radio" + X);
                if (button.Value.Substring(0, ClientChoicesState[MClientChoices.ColorScheme].Length).ToLower(new CultureInfo("en-US", false)) == ClientChoicesState[MClientChoices.ColorScheme].ToLower(new CultureInfo("en-US", false)))
                {
                    button.Checked = true;
                    break; // TODO: might not be correct. Was : Exit For
                }
            }
        }
示例#3
0
 private void populateFunctionTypes()
 {
     dropFunctionType.DataSource     = FunctionTypeUtility.FunctionTypes();
     dropFunctionType.DataTextField  = "NAME";
     dropFunctionType.DataValueField = "FUNCTION_TYPE_SEQ_ID";
     dropFunctionType.DataBind();
     if (m_Profile.Id != -1)
     {
         NameValuePairUtility.SetDropSelection(dropFunctionType, m_Profile.FunctionTypeSeqId.ToString());
     }
 }
示例#4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            MAccountProfile mAccountProfile = AccountUtility.CurrentProfile();
            int             mSecurityId     = int.Parse(ClientChoicesState[MClientChoices.SecurityEntityId]);

            dropSecurityEntities.DataSource     = SecurityEntityUtility.GetValidSecurityEntities(mAccountProfile.Account, mSecurityId, mAccountProfile.IsSystemAdmin);
            dropSecurityEntities.DataValueField = "SE_SEQ_ID";
            dropSecurityEntities.DataTextField  = "NAME";
            dropSecurityEntities.DataBind();
            NameValuePairUtility.SetDropSelection(dropSecurityEntities, mSecurityId.ToString());
        }
示例#5
0
        private void populateLinkBehaviors()
        {
            DataTable mDataTable = new DataTable();
            int       mNavType   = GWWebHelper.LinkBehaviorNameValuePairSequenceId;

            NameValuePairUtility.GetNameValuePairDetails(ref mDataTable, mNavType);
            dropLinkBehavior.DataSource     = mDataTable;
            dropLinkBehavior.DataTextField  = "NVP_DET_TEXT";
            dropLinkBehavior.DataValueField = "NVP_SEQ_DET_ID";
            dropLinkBehavior.DataBind();
            if (m_Profile.Id != -1)
            {
                NameValuePairUtility.SetDropSelection(dropLinkBehavior, m_Profile.LinkBehavior.ToString());
            }
        }
示例#6
0
        private void populateParent()
        {
            //dvFunctions.RowFilter = "PARENT_FUNCTION_SEQ_ID <> " + CurrentProfile.ID;
            var mResult = from mProfile in FunctionUtility.Functions()
                          where mProfile.ParentId != m_Profile.Id
                          select mProfile;

            dropNavParent.DataValueField = "Id";
            dropNavParent.DataTextField  = "Name";
            dropNavParent.DataSource     = mResult;
            dropNavParent.DataBind();
            if (m_Profile.Id != -1)
            {
                NameValuePairUtility.SetDropSelection(dropNavParent, m_Profile.ParentId.ToString());
            }
        }
示例#7
0
 private void populateGeneral()
 {
     txtAccount_seq_id.Value = m_Profile.Id.ToString();
     txtAccount_seq_id.Style.Add("display", "none");
     txtAccount.Text                = m_Profile.Account;
     chkSysAdmin.Checked            = m_Profile.IsSystemAdmin;
     litFailedAttempts.Text         = m_Profile.FailedAttempts.ToString();
     txtFailedAttempts.Text         = m_Profile.FailedAttempts.ToString();
     txtFirstName.Text              = m_Profile.FirstName;
     txtLastName.Text               = m_Profile.LastName;
     txtMiddleName.Text             = m_Profile.MiddleName;
     txtPreferredName.Text          = m_Profile.PreferredName;
     txtEmail.Text                  = m_Profile.Email;
     txtLocation.Text               = m_Profile.Location;
     chkEnableNotifications.Checked = m_Profile.EnableNotifications;
     NameValuePairUtility.SetDropSelection(dropStatus, m_Profile.Status.ToString());
     NameValuePairUtility.SetDropSelection(dropTimezone, m_Profile.TimeZone.ToString());
 }
示例#8
0
 private void populateFucntionDrop()
 {
     if (m_Profile.Id > 0)
     {
         DataView mDataView = FunctionUtility.GetFunctionMenuOrder(m_Profile).DefaultView;
         if (mDataView.Count > 0)
         {
             mDataView.Sort               = "[Name] ASC";
             dropFunctions.DataSource     = mDataView;
             dropFunctions.DataValueField = "FUNCTION_SEQ_ID";
             dropFunctions.DataTextField  = "NAME";
             dropFunctions.DataBind();
             if (m_Profile.Id != -1)
             {
                 NameValuePairUtility.SetDropSelection(dropFunctions, m_Profile.Id.ToString());
             }
         }
     }
 }
示例#9
0
        private void populatePage()
        {
            litSecurityEntity.Text = m_Profile.Name;
            txtSecurityEntity.Text = m_Profile.Name;
            if (m_Profile.Id == -1)
            {
                litSecurityEntity.Visible = false;
                txtSecurityEntity.Style.Add("display", "");
            }
            else
            {
                litSecurityEntity.Visible = true;
                txtSecurityEntity.Style.Add("display", "none");
            }
            txtSeqID.Text       = m_Profile.Id.ToString();
            txtDescription.Text = m_Profile.Description;
            txtURL.Text         = m_Profile.Url;
            try
            {
                txtConnectionstring.Text = CryptoUtility.Decrypt(m_Profile.ConnectionString, SecurityEntityUtility.CurrentProfile().EncryptionType);
            }
            catch (Exception)
            {
                txtConnectionstring.Text = m_Profile.ConnectionString;
            }
            litSecurityEntityTranslation.Text = ConfigSettings.SecurityEntityTranslation;
            txtAssembly_Name.Text             = m_Profile.DataAccessLayerAssemblyName;
            txtName_Space.Text = m_Profile.DataAccessLayerNamespace;
            MDirectoryProfile myDirectoryInfo = new MDirectoryProfile();
            DataView          dvSkin          = new DataView();

            dvSkin                  = FileUtility.GetDirectoryTableData(GWWebHelper.SkinPath, myDirectoryInfo, false).DefaultView;
            dvSkin.RowFilter        = "Type = 'folder'";
            dropSkin.DataSource     = dvSkin;
            dropSkin.DataTextField  = "Name";
            dropSkin.DataValueField = "Name";
            dropSkin.DataBind();

            DataView dvStyles = new DataView();

            dvStyles                  = FileUtility.GetDirectoryTableData(Server.MapPath(@"~\Content\FormStyles"), myDirectoryInfo, true).DefaultView;
            dvStyles.RowFilter        = "[Name] like '%.css'";
            dropStyles.DataSource     = dvStyles;
            dropStyles.DataTextField  = "ShortFileName";
            dropStyles.DataValueField = "ShortFileName";
            dropStyles.DataBind();
            Collection <MSecurityEntityProfile> mProfiles = SecurityEntityUtility.Profiles();

            dropParent.DataSource = mProfiles;
            MSecurityEntityProfile mm = new MSecurityEntityProfile();

            dropParent.DataTextField  = "Name";
            dropParent.DataValueField = "Id";
            dropParent.DataBind();
            ListItem lstItem = new ListItem();

            lstItem.Text  = "None";
            lstItem.Value = "-1";
            dropParent.Items.Add(lstItem);
            NameValuePairUtility.SetDropSelection(dropParent, m_Profile.ParentSeqId.ToString());
            NameValuePairUtility.SetDropSelection(dropSkin, m_Profile.Skin);
            NameValuePairUtility.SetDropSelection(dropStyles, m_Profile.Style);
            NameValuePairUtility.SetDropSelection(dropStatus, m_Profile.StatusSeqId.ToString());
            NameValuePairUtility.SetDropSelection(dropDAL, m_Profile.DataAccessLayer);
            NameValuePairUtility.SetDropSelection(dropEncryptionType, m_Profile.EncryptionType.ToString());
        }