Exemplo n.º 1
0
        public int InsertComment(CommentDTO cm)
        {
            int kq = 0;

            try
            {
                data.sp_ins_com(cm.NOIDUNG1, cm.THOIGIAN1, cm.TKCOMMENT1, cm.MAVOUCHERCOMMENT1);
                data.SubmitChanges();
                kq = 1;
            }
            catch (Exception ex) { }

            return kq;
        }
Exemplo n.º 2
0
        public List<CommentDTO> SelectComment_Voucher(int v)
        {
            List<CommentDTO> listComment = new List<CommentDTO>();

            List<Comment> listcm = data.sp_CommentXemVoucher(v).ToList();
            foreach (Comment cm in listcm)
            {
                CommentDTO cmDto = new CommentDTO(cm);
                listComment.Add(cmDto);
            }

            return listComment;
        }
Exemplo n.º 3
0
        public List<CommentDTO> SelectAllComment()
        {
            List<CommentDTO> listComment = new List<CommentDTO>();

            List<Comment> listcm = data.sp_CommentXem().ToList();
            foreach (Comment cm in listcm)
            {
                CommentDTO cmDto = new CommentDTO(cm);
                listComment.Add(cmDto);
            }

            return listComment;
        }