public void Delete(Guid ID) { objComments = new ARTS_CommentRepository(); ARTS_Comment comment = objComments.GetSingle(x => x.CommentID.Equals(ID)); objComments.Delete(comment); }
public void Update(ARTrackingCommentModel entity) { objComments = new ARTS_CommentRepository(); ARTS_Comment comment = objComments.GetSingle(x=>x.CommentID.Equals(entity.CommentID)); comment.CommentType = entity.CommentType; comment.Comment = entity.Comment; comment.CommentDate = DateTime.Now; comment.ModifiedBy = entity.ModifiedBy; comment.ModifiedDate = DateTime.Now; objComments.Update(comment); }
public void Save(ARTrackingCommentModel entity) { objComments = new ARTS_CommentRepository(); ARTS_Comment comment = new ARTS_Comment(); comment.CommentID = entity.CommentID; comment.CustomerID = entity.CustomerID; comment.CommentType = entity.CommentType; comment.Comment = entity.Comment; comment.CommentDate = entity.CommentDate; comment.CreatedBy = entity.CreatedBy; comment.CreatedDate = DateTime.Now; objComments.Add(comment); }
public ARTrackingCommentModel getCommentByCommentID(Guid id) { objComments=new ARTS_CommentRepository(); Mapper.CreateMap<ARTS_Comment, ARTrackingCommentModel>(); var entity = objComments.GetSingle(x => x.CommentID.Equals(id)); ARTrackingCommentModel result = new ARTrackingCommentModel(); result = Mapper.Map(entity, result); return result; }
public IList<ARTrackingCommentModel> getARTrackingCommentListByCustomerIDwithDate(int month, int year, string CustomerID) { objComments = new ARTS_CommentRepository(); Mapper.CreateMap<ARTS_Comment,ARTrackingCommentModel>(); DateTime beginDate= new DateTime(year,month,1); DateTime endDate = new DateTime(year,month,DateTime.DaysInMonth(year,month)).AddDays(1); IList<ARTS_Comment> objEnitity = objComments.GetQuery().Where(x => x.CommentDate >= beginDate).ToList(); objEnitity = objEnitity.Where(x => x.CommentDate < endDate).ToList(); objEnitity = objEnitity.Where(x => x.CustomerID.Equals(CustomerID)).ToList(); //var objEnitity = objComments.GetAll(); IList<ARTrackingCommentModel> result = new List<ARTrackingCommentModel>(); if (objEnitity != null) result = Mapper.Map(objEnitity, result); else result = null; return result; }
public IList<ARTrackingCommentModel> getARTrackingCommentListAllByCustomer(string CustomerID) { objComments = new ARTS_CommentRepository(); Mapper.CreateMap<ARTS_Comment, ARTrackingCommentModel>(); IList<ARTS_Comment> objEnitity = objComments.GetQuery().Where(x => x.CustomerID.Equals(CustomerID)).ToList(); IList<ARTrackingCommentModel> result = new List<ARTrackingCommentModel>(); if (objEnitity != null) result = Mapper.Map(objEnitity, result); else result = null; return result; }