Пример #1
0
        protected override void ShowData(int functionalityImageId)
        {
            base.ShowData(functionalityImageId);

            oDetailButtonPanel.SetId = SetId;

            Clear();

            var dataQuery = new FunctionalityImageDataModel();

            dataQuery.FunctionalityImageId = functionalityImageId;

            var entityList = FunctionalityImageDataManager.GetEntityDetails(dataQuery, SessionVariables.RequestProfile);

            if (entityList.Count == 1)
            {
                foreach (var entityItem in entityList)
                {
                    lblFunctionalityImageId.Text = entityItem.FunctionalityImageId.ToString();
                    lblTitle.Text       = entityItem.Title.ToString();
                    lblApplication.Text = entityItem.Application.ToString();
                    imgApplicationUserImage.ImageUrl = "~/ApplicationDevelopment/FunctionalityImage/ShowImage.aspx?imageid=" + entityItem.FunctionalityImageId.ToString();

                    oUpdateInfo.LoadText(entityItem.UpdatedDate, entityItem.UpdatedBy, entityItem.LastAction);

                    oHistoryList.Setup(PrimaryEntity, functionalityImageId, "FunctionalityImage");
                }
            }
        }
Пример #2
0
        public void LoadData(int functionalityImageId, bool showId)
        {
            // clear UI
            Clear();

            // set up parameters
            var data = new FunctionalityImageDataModel();

            data.FunctionalityImageId = functionalityImageId;

            // get data
            var items = FunctionalityImageDataManager.GetEntityDetails(data, SessionVariables.RequestProfile);

            // should only have single match -- should log exception.
            if (items.Count != 1)
            {
                return;
            }

            var item = items[0];

            largeImage = "/MA/ApplicationDevelopment/FunctionalityImage/ShowImage.aspx?imageid=" + Convert.ToString(item.FunctionalityImageId);
            smallImage = "/MA/ApplicationDevelopment/FunctionalityImage/ShowImage.aspx?imageid=" + Convert.ToString(item.FunctionalityImageId);
            imgApplicationUserImage.ImageUrl  = "~/MA/ApplicationDevelopment/FunctionalityImage/ShowImage.aspx?imageid=" + Convert.ToString(item.FunctionalityImageId);
            imgApplicationUserImage1.ImageUrl = "~/MA/ApplicationDevelopment/FunctionalityImage/ShowImage.aspx?imageid=" + Convert.ToString(item.FunctionalityImageId);
            //hrfApplicationUserImage.HRef = "~/ApplicationDevelopment/FunctionalityImage/ShowImage.aspx?imageid=" + Convert.ToString(row[TaskTimeTracker.Components.Module.ApplicationDevelopment.FunctionalityImage.DataColumns.FunctionalityImageId]);
            txtTitle.Text       = Convert.ToString(item.Title);
            txtApplication.Text = Convert.ToString(item.ApplicationId);
            drpApplication.Text = Convert.ToString(item.ApplicationId);
            txtDescription.Text = item.Description;

            if (!showId)
            {
                txtFunctionalityImageId.Text = item.FunctionalityImageId.ToString();
                //PlaceHolderAuditHistory.Visible = true;
                // only show Audit History in case of Update page, not for Clone.
                oHistoryList.Setup(PrimaryEntity, functionalityImageId, PrimaryEntityKey);
            }
            else
            {
                txtFunctionalityImageId.Text = String.Empty;
            }

            oUpdateInfo.LoadText(item.UpdatedDate, item.UpdatedBy, item.LastAction);
        }