Esempio n. 1
0
        //internal static void ShowReport(List<DP_DataRepository> resultDataItems, bool v)
        //{

        //}

        //public void LoadTemplate(ViewEntityAreaInitializer initParam)
        //{
        //    ViewInitializer = initParam;

        //    //SearchView = AgentUICoreMediator.UIManager.GenerateViewOfSearchEntityArea(UISettingHelper.DefaultPackageAreaSetting);



        //    //SearchViewArea.AddSearchView(SearchView);
        //    //SearchViewArea.AddViewView(ViewView);


        //    //هنوز مشخص نیست که چه موقع استفاده میشود TemporarySearchView.که یک ویو ساده از نمایش تلفیق دو ویو اول است SearchViewArea و ViewView و SearchView.داریم View چهار تا


        //    //////TemporarySearchView = AgentUICoreMediator.UIManager.GenerateTemporaryLinkUI(TemporaryLinkType.SerachView);
        //    //////TemporarySearchView.TemporaryDisplayViewRequested += TemporarySearchView_TemporaryDisplayViewRequested;


        //    //CreateDefaultData();

        //}

        //void ViewView_CommandExecuted(object sender, Arg_CommandExecuted e)
        //{
        //    (e.Command as I_ViewAreaCommand).Execute(this);
        //}

        //void SearchView_CommandExecuted(object sender, Arg_CommandExecuted e)
        //{
        //    (e.Command as I_SearchAreaCommand).Execute(this);
        //}

        //void ViewView_DataSelected(object sender, DataSelectedEventArg e)
        //{
        //    ViewInitializer.SourceEditArea.DataSelected(e.DataItem, this);
        //    AgentUICoreMediator.GetAgentUICoreMediator.UIManager.CloseDialog(ViewView);
        //}
        //public void CreateDefaultData()
        //{

        //    //bool creatDefault = false;
        //    //if (AreaInitializer.SourceRelationColumnControl == null && AgentHelper.GetDataEntryMode(AreaInitializer. == DataMode.One)
        //    //    creatDefault = true;
        //    //if (AreaInitializer.SourceRelationColumnControl != null && AgentHelper.GetDataEntryMode(AreaInitializer.SourceRelationColumnControl.SourceEditArea.AreaInitializer. != DataMode.Multiple)
        //    //    creatDefault = true;
        //    //if (force || creatDefault)
        //    //{


        //    DP_DataRepository newData = AgentHelper.CreateAreaInitializerNewData(ViewInitializer, true);
        //    if (newData != null)
        //    {
        //        //ViewInitializer.SearchData = newData;
        //    }


        //    //}

        //}

        //private void ManageTemporaryView()
        //{

        //}

        //////public void TemporarySearchView_TemporaryDisplayViewRequested(object sender, Arg_TemporaryDisplayViewRequested e)
        //////{
        //////    ShowTemporarySearchView(null, null);
        //////}
        //public void ShowTemporarySearchView()
        //{
        //    AgentUICoreMediator.UIManager.GetDialogWindow().ShowDialog(SearchViewArea, ViewInitializer.SearchEntity.Alias);
        //}

        public void SetAreaInitializer(ViewEntityAreaInitializer initParam)
        {
            ViewInitializer = initParam;
            //if (initParam.TempEntity != null)
            //    _FullEntity = initParam.TempEntity;

            GenerateView();
        }
        private ViewEntityArea GenereateViewArea()
        {
            var viewEntityArea      = new ViewEntityArea();
            var viewAreaInitializer = new ViewEntityAreaInitializer();

            viewAreaInitializer.EntityID   = AreaInitializer.EntityID;
            viewAreaInitializer.TempEntity = AreaInitializer.TempEntity;

            viewAreaInitializer.MultipleSelection = AreaInitializer.MultipleSelection;
            viewEntityArea.SetAreaInitializer(viewAreaInitializer);
            //viewEntityArea.GenerateView();
            return(viewEntityArea);
        }