Exemplo n.º 1
0
    private void mInitialBindings()
    {
        BLL.Hardcodes.Tables deafaultView = new BLL.Hardcodes.Tables();
        ddlGalleryTypeSearch.DataSource     = ddlAddEditGalleryType.DataSource = ddlListGalleryType.DataSource = deafaultView.GalleryTypes;
        ddlGalleryTypeSearch.DataTextField  = ddlAddEditGalleryType.DataTextField = ddlListGalleryType.DataTextField = BLL.Hardcodes.Item.FIELD_Title;
        ddlGalleryTypeSearch.DataValueField = ddlAddEditGalleryType.DataValueField = ddlListGalleryType.DataValueField = BLL.Hardcodes.Item.FIELD_ID;
        ddlListGalleryType.DataBind();
        ddlAddEditGalleryType.DataBind();
        ddlGalleryTypeSearch.DataBind();

        ListItem liInitial = new ListItem(Farschidus.Translator.AppTranslate["dropdown.initial.selectText"], "0");

        ddlCategory.Items.Add(liInitial);

        Subjects categories = new Subjects();

        categories.LoadByIDSubjectTypeAndIDLanguage((byte)SubjectTypes.Enum.category, pLanguageID);
        categories.Sort            = Subjects.ColumnNames.Priority;
        ddlCategory.DataSource     = categories.DefaultView;
        ddlCategory.DataTextField  = Subjects.ColumnNames.Title;
        ddlCategory.DataValueField = Subjects.ColumnNames.IDSubject;
        ddlCategory.DataBind();

        mLoadList();
    }
Exemplo n.º 2
0
    private bool mValidateDelete(int iDMedia)
    {
        pMessage.Clear();
        bool          isValid      = true;
        MediaSubjects mediaSubject = new MediaSubjects();

        mediaSubject.LoadByIDMedia(iDMedia);
        mediaSubject.Sort = MediaSubjects.ColumnNames.IDMediaSubjectType;

        if (mediaSubject.RowCount > 0)
        {
            isValid = false;

            pMessage.Add(Farschidus.Translator.AppTranslate["mediaManaging.default.message.subjectMediaRelation"], Farschidus.Web.UI.Message.MessageTypes.Warning);
            Subjects             subject          = new Subjects();
            SubjectTypes         subjectType      = new SubjectTypes();
            MediaSubjectTypes    mediaSubjectType = new MediaSubjectTypes();
            BLL.Hardcodes.Tables hcTables         = new BLL.Hardcodes.Tables();
            string moduleName = string.Empty;
            string usageType  = string.Empty;
            do
            {
                subject.LoadByPrimaryKey(mediaSubject.pIDSubject);
                subjectType.LoadByPrimaryKey(subject.pIDSubjectType);
                mediaSubjectType.LoadByPrimaryKey(mediaSubject.pIDMediaSubjectType);
                moduleName = hcTables.SubjectTypes.Find(item => item.ID.ToString() == ((byte)((SubjectTypes.Enum)Enum.Parse(typeof(SubjectTypes.Enum), subjectType.pTitle, true))).ToString()).Title;
                usageType  = hcTables.MediaSubjectTypes.Find(item => item.ID.ToString() == ((byte)((MediaSubjectTypes.Enum)Enum.Parse(typeof(MediaSubjectTypes.Enum), mediaSubjectType.pTitle, true))).ToString()).Title;
                pMessage.Add(string.Format("{0}, {1}: {2}", moduleName, mediaSubject.Subjects.pTitle, usageType), Farschidus.Web.UI.Message.MessageTypes.Information);
            }while (mediaSubject.MoveNext());
        }
        return(isValid);
    }
Exemplo n.º 3
0
 private void mInitialBindings()
 {
     BLL.Hardcodes.Tables tables = new BLL.Hardcodes.Tables();
     rblTypes.DataSource     = tables.HeaderTypes;
     rblTypes.DataTextField  = BLL.Hardcodes.Item.FIELD_Title;
     rblTypes.DataValueField = BLL.Hardcodes.Item.FIELD_ID;
     rblTypes.DataBind();
 }
Exemplo n.º 4
0
 private void mInitialBindings()
 {
     BLL.Hardcodes.Tables hcTables = new BLL.Hardcodes.Tables();
     ddlProprtyTypes.DataSource     = hcTables.PropertyTypes;
     ddlProprtyTypes.DataTextField  = BLL.Hardcodes.Item.FIELD_Title;
     ddlProprtyTypes.DataValueField = BLL.Hardcodes.Item.FIELD_ID;
     ddlProprtyTypes.DataBind();
     mLoadList();
     ddlProprtyTypes.SelectedIndex = 0;
 }
Exemplo n.º 5
0
    private void mInitialBindings()
    {
        if (User.Identity.IsAuthenticated)
        {
            mFillForm();
        }

        BLL.Hardcodes.Tables hcTables = new BLL.Hardcodes.Tables();
        rblGender.DataSource     = hcTables.Gender;
        rblGender.DataTextField  = BLL.Hardcodes.Item.FIELD_Title;
        rblGender.DataValueField = BLL.Hardcodes.Item.FIELD_ID;
        rblGender.DataBind();
    }
Exemplo n.º 6
0
    private void mModulesBindings()
    {
        ddlModule.Items.Clear();
        Languages lang      = new Languages(pLanguageID);
        ListItem  liInitial = new ListItem(Farschidus.Translator.AppTranslate["menuManager.default.addEdit.ddlNoUrl"], "0");

        ddlModule.Items.Add(liInitial);

        BLL.Hardcodes.Tables tables = new BLL.Hardcodes.Tables();
        ddlModule.DataSource     = tables.SubjectTypes;
        ddlModule.DataTextField  = BLL.Hardcodes.Item.FIELD_Title;
        ddlModule.DataValueField = BLL.Hardcodes.Item.FIELD_ID;
        ddlModule.DataBind();
    }
Exemplo n.º 7
0
    private void mInitialBindings()
    {
        cblUserRoles.DataSource = ddlRoleSearch.DataSource = Roles.GetAllRoles().Where(x => x != Global.Constants.STRING_ROLE_CIEMESUS).ToArray();
        ddlRoleSearch.DataBind();
        cblUserRoles.DataBind();

        BLL.Hardcodes.Tables hcTables = new BLL.Hardcodes.Tables();
        rblGender.DataSource     = hcTables.SexTypes;
        rblGender.DataTextField  = BLL.Hardcodes.Item.FIELD_Title;
        rblGender.DataValueField = BLL.Hardcodes.Item.FIELD_ID;
        rblGender.DataBind();

        mLoadList();
    }
Exemplo n.º 8
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         pShownSearchButton = false;
         Title = Farschidus.Translator.AppTranslate["localization.default.page.title"];
         pShownLoadAllButton = pShownDeleteButton = false;
         ListItem liInitial = new ListItem(Farschidus.Translator.AppTranslate["dropdown.initial.selectText"], "0");
         ddlSection.Items.Add(liInitial);
         ddlModules.Items.Add(liInitial);
         BLL.Hardcodes.Tables tables = new BLL.Hardcodes.Tables();
         ddlSection.DataSource     = tables.TranslatorTypes;
         ddlSection.DataTextField  = BLL.Hardcodes.Item.FIELD_Title;
         ddlSection.DataValueField = BLL.Hardcodes.Item.FIELD_ID;
         ddlSection.DataBind();
     }
 }
Exemplo n.º 9
0
    private void mInitialBindings()
    {
        Languages lang      = new Languages(Farschidus.Translator.PublicDefaultLanguage);
        ListItem  liInitial = new ListItem(Farschidus.Translator.AppTranslate["menuManager.default.addEdit.ddlNoUrl"], "0");

        ddlModule.Items.Add(liInitial);

        BLL.Hardcodes.Tables tables = new BLL.Hardcodes.Tables();
        ddlModule.DataSource     = tables.SubjectTypes;
        ddlModule.DataTextField  = BLL.Hardcodes.Item.FIELD_Title;
        ddlModule.DataValueField = BLL.Hardcodes.Item.FIELD_ID;
        ddlModule.DataBind();

        rblPageListFormat.DataSource     = tables.ListTypePage;
        rblPageListFormat.DataTextField  = BLL.Hardcodes.Item.FIELD_Title;
        rblPageListFormat.DataValueField = BLL.Hardcodes.Item.FIELD_ID;
        rblPageListFormat.DataBind();
        rblPageListFormat.Items[0].Text += "</br>" + Global.Constants.HTML_ICON_GRID;
        rblPageListFormat.Items[1].Text += "</br>" + Global.Constants.HTML_ICON_LIST;

        trUrl.Visible        = true;
        trPage.Visible       = false;
        trListFormat.Visible = false;
    }
Exemplo n.º 10
0
    private void mBindings()
    {
        Subjects.BannerTypes headerTypes = (Subjects.BannerTypes)Enum.Parse(typeof(Subjects.BannerTypes), rblTypes.SelectedValue);
        switch (headerTypes)
        {
        case Subjects.BannerTypes.inActive:
        {
            trInActive.Visible = true;
            trPicture.Visible  = false;
            trGallery.Visible  = false;
            btnSave.Visible    = true;
            break;
        }

        case Subjects.BannerTypes.picture:
        {
            trInActive.Visible = false;
            trPicture.Visible  = true;
            trGallery.Visible  = false;
            btnSave.Visible    = false;
            mLoadMedias();
            mReloadImagePath();
            break;
        }

        case Subjects.BannerTypes.gallery:
        {
            trInActive.Visible = false;
            trPicture.Visible  = false;
            trGallery.Visible  = true;
            btnSave.Visible    = true;

            BLL.Hardcodes.Tables tables = new BLL.Hardcodes.Tables();
            ddlGalleryType.Items.Clear();
            ddlGalleryType.DataSource     = tables.GalleryTypes;
            ddlGalleryType.DataTextField  = BLL.Hardcodes.Item.FIELD_Title;
            ddlGalleryType.DataValueField = BLL.Hardcodes.Item.FIELD_ID;
            ddlGalleryType.DataBind();
            mDDLGalleryBinding(null);

            Plugins plugins = new Plugins();
            plugins.LoadAll();
            ddlPlugins.DataSource     = plugins.DefaultView;
            ddlPlugins.DataTextField  = Plugins.ColumnNames.Name;
            ddlPlugins.DataValueField = Plugins.ColumnNames.IDPlugin;
            ddlPlugins.DataBind();
            if (plugins.RowCount > 0)
            {
                GalleryPlugins galleryPlugin = new GalleryPlugins();
                galleryPlugin.LoadByIDSubject(pSubjectID);
                if (galleryPlugin.RowCount > 0)
                {
                    ddlPlugins.SelectedValue = galleryPlugin.pIDPlugin.ToString();
                    mFillPluginFields(galleryPlugin.pIDPlugin);
                }
                else
                {
                    mFillPluginFields(plugins.pIDPlugin);
                }
            }
            break;
        }
        }
    }
Exemplo n.º 11
0
    //private void ReOrder(Properties unorderedSubjects, string draggedPriority, string targetPriority, bool direction)
    //{
    //    string initFilter = "";
    //    if (!string.IsNullOrEmpty(unorderedSubjects.Filter))
    //    {
    //        initFilter = unorderedSubjects.Filter + " AND ";
    //    }
    //    unorderedSubjects.Filter = initFilter + string.Format("{0}={1}", Subjects.ColumnNames.Priority, draggedPriority);
    //    unorderedSubjects.pPriority = -1;

    //    if (direction)
    //    {
    //        unorderedSubjects.Filter = initFilter + string.Format("{0}>={1} AND {0} < {2}", Subjects.ColumnNames.Priority, targetPriority, draggedPriority);
    //        if (unorderedSubjects.RowCount > 0)
    //        {
    //            do
    //            {
    //                unorderedSubjects.pPriority += 1;
    //            } while (unorderedSubjects.MoveNext());
    //        }
    //    }
    //    else
    //    {
    //        unorderedSubjects.Filter = initFilter + string.Format("{0}>{1} AND {0} <= {2}", Subjects.ColumnNames.Priority, draggedPriority, targetPriority);
    //        if (unorderedSubjects.RowCount > 0)
    //        {
    //            do
    //            {
    //                unorderedSubjects.pPriority -= 1;
    //            } while (unorderedSubjects.MoveNext());
    //        }
    //    }
    //    unorderedSubjects.Filter = initFilter + string.Format("{0}={1}", Subjects.ColumnNames.Priority, "-1");
    //    unorderedSubjects.pPriority = Convert.ToInt32(targetPriority);

    //    pSubjects = unorderedSubjects;
    //    Subjects subjects = new Subjects();
    //    subjects = pSubjects;
    //    subjects.Save();

    //    mLoadAll();

    //    pMessage.Add(Farschidus.Translator.AppTranslate["general.message.reordered"], Farschidus.Web.UI.Message.MessageTypes.Success);
    //    mShowMessage(pMessage);
    //}

    #endregion

    #region "Public Methodes"

    public string mGetPropertyTypeName(object IDType)
    {
        BLL.Hardcodes.Tables htTables = new BLL.Hardcodes.Tables();
        return(htTables.PropertyTypes.Find(x => x.ID.ToString() == IDType.ToString()).Title);
    }