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); } }
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)); } }
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)); } }