コード例 #1
0
ファイル: SPFactory.cs プロジェクト: ahgarcia/spGenerator
        public static BaseSPGenerator GetSpGeneratorObject(string nodeText)
        {
            //Brent... wire in generator types
            BaseSPGenerator spGeneraror = null;

            switch (nodeText)
            {
            case Constants.insertTreeNodeText:
                spGeneraror = new InsertSPGenerator();
                break;

            case Constants.updateTreeNodeText:
                spGeneraror = new UpdateSPGenerator();
                break;

            case Constants.deleteTreeNodeText:
                spGeneraror = new DeleteSPGenerator();
                break;

            case Constants.selectTreeNodeText:
                spGeneraror = new SelectSPGenerator();
                break;
            }
            return(spGeneraror);
        }
コード例 #2
0
 public static BaseSPGenerator GetSpGeneratorObject(string nodeText)
 {
     BaseSPGenerator spGeneraror = null;
     switch (nodeText)
     {
         case Constants.insertTreeNodeText:
             spGeneraror = new InsertSPGenerator();
             break;
         case Constants.updateTreeNodeText:
             spGeneraror = new UpdateSPGenerator();
             break;
         case Constants.deleteTreeNodeText:
             spGeneraror = new DeleteSPGenerator();
             break;
         case Constants.selectTreeNodeText:
             spGeneraror = new SelectSPGenerator();
             break;
         case Constants.selectOneTreeNodeText:
             spGeneraror = new SelectOneSPGenerator();
             break;
     }
     return spGeneraror;
 }