예제 #1
0
        public void DeleteComment(int id, int commentid)
        {
            Core_AgentTeleLogComments result = ent.Core_AgentTeleLogComments.Where(x => x.AgentTeleLogId == id && x.AgentTeleLogCommentId == commentid).FirstOrDefault();
            var comment = result.Comment;

            result.isDelete = true;

            ent.ApplyCurrentValues(result.EntityKey.EntitySetName, result);
            ent.SaveChanges();
        }
예제 #2
0
        public void CommentsAdd(AgentTeleLogsModel modelToSave)
        {
            Core_AgentTeleLogComments datamodel = new Core_AgentTeleLogComments
            {
                AgentTeleLogId = modelToSave.AgentTeleLogId,
                Comment        = modelToSave.Comment,
                isDelete       = modelToSave.isDelete,
                CreatedBy      = modelToSave.CreatedBy,
                CreatedDate    = DateTime.Now
            };

            ent.AddToCore_AgentTeleLogComments(datamodel);
            ent.SaveChanges();
        }