Exemplo n.º 1
0
 private void LoadGridData()
 {
     m_kwlBo = (BOKWList)BOFactory.GetBO(BOIDEnum.KeyWordList);
     List<KWListDetailMD> listObj = m_kwlBo.GetDetialedMD();
     objList.SetObjects(listObj);
     //objList.DataSourceType = typeof(KWListMD);
     //objList.AddEmptyRow();
 }
Exemplo n.º 2
0
 public static BusinessObject GetBO(BOIDEnum boid)
 {
     BusinessObject bo = null;
     switch (boid)
     {
         case BOIDEnum.BOSequence:
             bo = new BOSequence();
             break;
         case BOIDEnum.Country:
             bo = new BOCountry();
             break;
         case BOIDEnum.ProductGroup:
             bo = new BOProductGroup();
             break;
         case BOIDEnum.Market:
             bo = new BOMarket();
             break;
         case BOIDEnum.MarketDetail:
             bo = new BOMarketDetail();
             break;
         case BOIDEnum.SearchPlantf:
             bo = new BOBPSearchPlan();
             break;
         case BOIDEnum.Texture:
             bo = new BOTexture();
             break;
         case BOIDEnum.KeyWord:
             bo = new BOKeyWord();
             break;
         case BOIDEnum.KeyWordList:
             bo = new BOKWList();
             break;
         case BOIDEnum.Product:
             bo = new BOProduct();
             break;
         case BOIDEnum.PSearchPlan:
             bo = new BOProductSearchPlan();
             break;
         case BOIDEnum.PSearchResult:
             bo = new BOBPSearchResult();
             break;
         case BOIDEnum.BP:
             bo = new BOBP();
             break;
         default: break;
     }
     bo.Init();
     return bo;
 }
Exemplo n.º 3
0
        public override bool OnIsValidBatch()
        {
            bool result = true;

            if (base.m_removedDataList != null && base.m_removedDataList.Count > 0)
            {
                BOKWList        kwlBo     = (BOKWList)BOFactory.GetBO(BOIDEnum.KeyWordList);
                List <KWListMD> kwlMdList = kwlBo.GetDataList().Cast <JObject>().Select(x => x.ConvertToTarget <KWListMD>()).ToList();
                foreach (var temp in m_removedDataList)
                {
                    KeyWordMD md    = (KeyWordMD)temp;
                    KWListMD  kwlMd = kwlMdList.Find(x => x.KeyWrodIds.Contains(md.ID));
                    if (kwlMd != null)
                    {
                        result = false;
                        ReportStatusMessage(new SatusMessageInfo(MessageType.Error, MessageCode.RefenenceError, this,
                                                                 "删除失败!关键字 \"" + md.Name + "\" 在关键字列表 \"" + kwlMd.Name + "\" 中被引用!"));
                        break;
                    }
                }
            }
            return(result);
        }