Exemplo n.º 1
0
 public static void updateComments(CommentsBO objClass)
 {
     if (objClass.Type == 1)
     {
         StrategyContextComment commentobject = new StrategyContextComment(new StrategyConcretePhotoComment());
         commentobject.updateComments(objClass);
     }
     else if (objClass.Type == 2)
     {
         StrategyContextComment commentobject = new StrategyContextComment(new StrategyConcreteVideoComment());
         commentobject.updateComments(objClass);
     }
     else
     {
         StrategyContextComment commentobject = new StrategyContextComment(new StrategyConcreteOtherComment());
         commentobject.updateComments(objClass);
     }
 }
Exemplo n.º 2
0
 public static List <Comments> getCommentsList(int Type, string AtId)
 {
     if (Type == 1)
     {
         StrategyContextComment commentobject = new StrategyContextComment(new StrategyConcretePhotoComment());
         return(commentobject.getCommentsList(Type, AtId));
     }
     else if (Type == 2)
     {
         StrategyContextComment commentobject = new StrategyContextComment(new StrategyConcreteVideoComment());
         return(commentobject.getCommentsList(Type, AtId));
     }
     else
     {
         StrategyContextComment commentobject = new StrategyContextComment(new StrategyConcreteOtherComment());
         return(commentobject.getCommentsList(Type, AtId));
     }
 }
Exemplo n.º 3
0
 public static string insertComments(CommentsBO objClass)
 {
     if (objClass.Type == 1)
     {
         StrategyContextComment commentobject = new StrategyContextComment(new StrategyConcretePhotoComment());
         return(commentobject.insertComments(objClass));
     }
     else if (objClass.Type == 2)
     {
         StrategyContextComment commentobject = new StrategyContextComment(new StrategyConcreteVideoComment());
         return(commentobject.insertComments(objClass));
     }
     else
     {
         StrategyContextComment commentobject = new StrategyContextComment(new StrategyConcreteOtherComment());
         return(commentobject.insertComments(objClass));
     }
 }