Exemple #1
0
        private void BindToolbar()
        {
            MainBlockHeader.Title = CHelper.GetResFileString(MetaDataWrapper.GetMetaClassByName(ClassName).FriendlyName);

            MainBlockHeader.ClearLinks();

            //if (!String.IsNullOrEmpty(this.Page.Request["ViewName"]))
            //    MainBlockHeader.AddLink("Back To List", CHelper.GetLinkMetaViewShow(Request["ViewName"]));

            //SecurityService ss = ((BusinessObject)_bindObject).GetService<SecurityService>();
            //if (!(ss != null && !ss.CheckUserRight("Write")))
            //{
            MainBlockHeader.AddLink(
                "~/Images/IbnFramework/saveitem.gif",
                CHelper.GetResFileString("{IbnFramework.Global:_mc_Save}"),
                Page.ClientScript.GetPostBackClientHyperlink(btnSave, String.Empty, true)
                );

            string backLink;

            if (Back == "view" && ObjectId != PrimaryKeyId.Empty)
            {
                backLink = CHelper.GetLinkEntityView(ClassName, ObjectId.ToString());
            }
            else
            {
                if (ClassName == Mediachase.Ibn.Events.CalendarEventEntity.ClassName)
                {
                    backLink = "~/Apps/Calendar/Pages/Calendar.aspx";
                }
                else
                {
                    backLink = CHelper.GetLinkEntityList(ClassName);
                }
            }
            MainBlockHeader.AddLink(
                "~/Images/IbnFramework/cancel.gif",
                CHelper.GetResFileString("{IbnFramework.Global:_mc_Cancel}"),
                backLink);

//			if (Back
            //}

            //if (Mode.ToLower() == "popup")
            //    MainBlockHeader.AddLink("~/Images/IbnFramework/close.gif", GetGlobalResourceObject("IbnFramework.GlobalMetaInfo", "Close").ToString(), "javascript:window.close();");
        }
Exemple #2
0
        private void BindToolbar()
        {
            if (Request["ObjectId"] != ObjectId.ToString())
            {
                MainBlockHeader.Title = String.Format("{0} - {1}",
                                                      CHelper.GetResFileString(MetaDataWrapper.GetMetaClassByName(CalendarEventEntity.ClassName).FriendlyName),
                                                      GetGlobalResourceObject("IbnFramework.Calendar", "EditSeries").ToString());
            }
            else
            {
                MainBlockHeader.Title = CHelper.GetResFileString(MetaDataWrapper.GetMetaClassByName(CalendarEventEntity.ClassName).FriendlyName);
            }

            MainBlockHeader.ClearLinks();

            MainBlockHeader.AddLink(
                "~/Images/IbnFramework/saveitem.gif",
                CHelper.GetResFileString("{IbnFramework.Global:_mc_Save}"),
                Page.ClientScript.GetPostBackClientHyperlink(btnSave, String.Empty, true)
                );

            string backLink;

            if (Back == "view" && ObjectId != PrimaryKeyId.Empty)
            {
                backLink = CHelper.GetLinkEntityView(CalendarEventEntity.ClassName, Request["ObjectId"]);
            }
            else
            {
                backLink = CHelper.GetLinkEntityList(CalendarEventEntity.ClassName);
            }
            MainBlockHeader.AddLink(
                "~/Images/IbnFramework/cancel.gif",
                CHelper.GetResFileString("{IbnFramework.Global:_mc_Cancel}"),
                backLink);
        }