Esempio n. 1
0
 public void gotokdp(Knowledge model)
 {
     if (model.TypeId == 3)
     {
         new PDF {
             Id = model.Id, TypeId = model.TypeId
         }.Show();
     }
     else
     {
         this.returnsearch = new BACAClient.Model.ReturnSearch();
         if (this.IsReturn)
         {
             SystemEnum.ISRETURN yES = SystemEnum.ISRETURN.YES;
             this.returnsearch.IsReturn = yES.ToString();
         }
         else
         {
             this.returnsearch.IsReturn = SystemEnum.ISRETURN.NO.ToString();
         }
         this.returnsearch.TypeId    = this.TypeId;
         this.returnsearch.PageIndex = this.pageIndex;
         this.returnsearch.SourceId  = 0;
         this.returnsearch.KeyWord   = this.keyword.Text;
         this.returnsearch.Category  = this.GetCategoryID(true);
         this.returnsearch.Pages     = new PageSwitch().TypeRetrieve;
         this.returnsearch.Key       = ((ComboxItem)this.Type.SelectedItem).Text;
         CacheHelper.SetReturnSearch(this.returnsearch);
         CacheHelper.SetCache(new CacheParameterName().HistoryIndex, string.Empty);
         CacheHelper.SetCache(this.cache.Id, model.Id.ToString());
         base.ParentWindow.PageSwitch(new PageSwitch().kdp);
     }
 }
Esempio n. 2
0
 public void gotokdp(BACAClient.Model.Knowledge model)
 {
     if (model.TypeId == 3)
     {
         new PDF {
             Id = model.Id, TypeId = model.TypeId
         }.Show();
     }
     else
     {
         this.returnsearch = new ReturnSearch();
         if (this.IsReturn)
         {
             SystemEnum.ISRETURN yES = SystemEnum.ISRETURN.YES;
             this.returnsearch.IsReturn = yES.ToString();
         }
         else
         {
             this.returnsearch.IsReturn = SystemEnum.ISRETURN.NO.ToString();
         }
         this.returnsearch.TypeId    = 0;
         this.returnsearch.PageIndex = this.pageIndex;
         this.returnsearch.SourceId  = (int)this.SourceID;
         this.returnsearch.KeyWord   = this.keyword.Text;
         this.returnsearch.Pages     = new PageSwitch().RapidRetrieval;
         CacheHelper.SetReturnSearch(this.returnsearch);
         CacheHelper.SetCache(this.cache.HistoryIndex, string.Empty);
         CacheHelper.SetCache(this.cache.Id, model.Id.ToString());
         base.ParentWindow.PageSwitch(new PageSwitch().kdp);
     }
 }
Esempio n. 3
0
        public void PageSwitch(string path)
        {
            System.Type type;
            if (!path.ToLower().Contains("BACAClient.pages.main"))
            {
                this.Initialization();
            }
            this.CloseWindows();
            string str = path.ToLower();

            if (!(str == "BACAClient.pages.type.kdp"))
            {
                if (str == "BACAClient.pages.type.typeretrieve")
                {
                    goto Label_0092;
                }
            }
            else
            {
                SystemEnum.ISRETURN yES = SystemEnum.ISRETURN.YES;
                if (CacheHelper.GetCache(this.cache.IsReturn) == yES.ToString())
                {
                    this.TwoNav2.Visibility = Visibility.Visible;
                }
                goto Label_0092;
            }
            this.TwoNav2.Visibility = Visibility.Hidden;
Label_0092:
            type = System.Type.GetType(path);
            if (type != null)
            {
                System.Windows.Controls.Page page = type.Assembly.CreateInstance(path) as System.Windows.Controls.Page;
                this.Nested.Content = page;
                PropertyInfo[] properties = type.GetProperties();
                foreach (PropertyInfo info in properties)
                {
                    if (info.Name.ToLower() == "parentwindow")
                    {
                        info.SetValue(page, this, null);
                        break;
                    }
                }
            }
        }
Esempio n. 4
0
 public void RadioChecked()
 {
     try
     {
         this.returnsearch = CacheHelper.GetReturnSearchModel();
         if (this.returnsearch != null)
         {
             SystemEnum.ISRETURN yES = SystemEnum.ISRETURN.YES;
             if (this.returnsearch.IsReturn == yES.ToString())
             {
                 this.pageIndex = this.returnsearch.PageIndex;
             }
             this.keyword.Text = this.returnsearch.KeyWord;
             switch (this.returnsearch.SourceId)
             {
             }
         }
     }
     catch
     {
     }
 }