public bool Insert( string CommentStatusName) { CommentStatusDAC commentstatusComponent = new CommentStatusDAC(); int CommentStatusId = 0; return commentstatusComponent.InsertNewCommentStatus( ref CommentStatusId, CommentStatusName); }
public bool Insert(CommentStatus commentstatus) { int autonumber = 0; CommentStatusDAC commentstatusComponent = new CommentStatusDAC(); bool endedSuccessfuly = commentstatusComponent.InsertNewCommentStatus( ref autonumber, commentstatus.CommentStatusName); if(endedSuccessfuly) { commentstatus.CommentStatusId = autonumber; } return endedSuccessfuly; }
public CommentStatus GetByID(int _commentStatusId) { CommentStatusDAC _commentStatusComponent = new CommentStatusDAC(); IDataReader reader = _commentStatusComponent.GetByIDCommentStatus(_commentStatusId); CommentStatus _commentStatus = null; while(reader.Read()) { _commentStatus = new CommentStatus(); if(reader["CommentStatusId"] != DBNull.Value) _commentStatus.CommentStatusId = Convert.ToInt32(reader["CommentStatusId"]); if(reader["CommentStatusName"] != DBNull.Value) _commentStatus.CommentStatusName = Convert.ToString(reader["CommentStatusName"]); _commentStatus.NewRecord = false; } reader.Close(); return _commentStatus; }
public List<CommentStatus> GetAll() { CommentStatusDAC _commentStatusComponent = new CommentStatusDAC(); IDataReader reader = _commentStatusComponent.GetAllCommentStatus().CreateDataReader(); List<CommentStatus> _commentStatusList = new List<CommentStatus>(); while(reader.Read()) { if(_commentStatusList == null) _commentStatusList = new List<CommentStatus>(); CommentStatus _commentStatus = new CommentStatus(); if(reader["CommentStatusId"] != DBNull.Value) _commentStatus.CommentStatusId = Convert.ToInt32(reader["CommentStatusId"]); if(reader["CommentStatusName"] != DBNull.Value) _commentStatus.CommentStatusName = Convert.ToString(reader["CommentStatusName"]); _commentStatus.NewRecord = false; _commentStatusList.Add(_commentStatus); } reader.Close(); return _commentStatusList; }
public bool Update(CommentStatus commentstatus ,int old_commentStatusId) { CommentStatusDAC commentstatusComponent = new CommentStatusDAC(); return commentstatusComponent.UpdateCommentStatus( commentstatus.CommentStatusName, old_commentStatusId); }
public void Delete(int Original_CommentStatusId) { CommentStatusDAC commentstatusComponent = new CommentStatusDAC(); commentstatusComponent.DeleteCommentStatus(Original_CommentStatusId); }
public int UpdateDataset(System.Data.DataSet dataset) { CommentStatusDAC commentstatuscomponent = new CommentStatusDAC(); return commentstatuscomponent.UpdateDataset(dataset); }
public bool Update( string CommentStatusName, int Original_CommentStatusId) { CommentStatusDAC commentstatusComponent = new CommentStatusDAC(); return commentstatusComponent.UpdateCommentStatus( CommentStatusName, Original_CommentStatusId); }