public bool Insert(PageStatus pagestatus) { int autonumber = 0; PageStatusDAC pagestatusComponent = new PageStatusDAC(); bool endedSuccessfuly = pagestatusComponent.InsertNewPageStatus( ref autonumber, pagestatus.Name, pagestatus.RowGuid, pagestatus.ModifiedDate); if(endedSuccessfuly) { pagestatus.PageStatusId = autonumber; } return endedSuccessfuly; }
public PageStatus GetByID(int _pageStatusId) { PageStatusDAC _pageStatusComponent = new PageStatusDAC(); IDataReader reader = _pageStatusComponent.GetByIDPageStatus(_pageStatusId); PageStatus _pageStatus = null; while(reader.Read()) { _pageStatus = new PageStatus(); if(reader["PageStatusId"] != DBNull.Value) _pageStatus.PageStatusId = Convert.ToInt32(reader["PageStatusId"]); if(reader["Name"] != DBNull.Value) _pageStatus.Name = Convert.ToString(reader["Name"]); if(reader["RowGuid"] != DBNull.Value) _pageStatus.RowGuid = new Guid(reader["RowGuid"].ToString()); if(reader["ModifiedDate"] != DBNull.Value) _pageStatus.ModifiedDate = Convert.ToDateTime(reader["ModifiedDate"]); _pageStatus.NewRecord = false; } reader.Close(); return _pageStatus; }
public List<PageStatus> GetAll() { PageStatusDAC _pageStatusComponent = new PageStatusDAC(); IDataReader reader = _pageStatusComponent.GetAllPageStatus().CreateDataReader(); List<PageStatus> _pageStatusList = new List<PageStatus>(); while(reader.Read()) { if(_pageStatusList == null) _pageStatusList = new List<PageStatus>(); PageStatus _pageStatus = new PageStatus(); if(reader["PageStatusId"] != DBNull.Value) _pageStatus.PageStatusId = Convert.ToInt32(reader["PageStatusId"]); if(reader["Name"] != DBNull.Value) _pageStatus.Name = Convert.ToString(reader["Name"]); if(reader["RowGuid"] != DBNull.Value) _pageStatus.RowGuid = new Guid(reader["RowGuid"].ToString()); if(reader["ModifiedDate"] != DBNull.Value) _pageStatus.ModifiedDate = Convert.ToDateTime(reader["ModifiedDate"]); _pageStatus.NewRecord = false; _pageStatusList.Add(_pageStatus); } reader.Close(); return _pageStatusList; }
public bool Insert( string Name, Guid RowGuid, DateTime ModifiedDate) { PageStatusDAC pagestatusComponent = new PageStatusDAC(); int PageStatusId = 0; return pagestatusComponent.InsertNewPageStatus( ref PageStatusId, Name, RowGuid, ModifiedDate); }
public void Delete(int Original_PageStatusId) { PageStatusDAC pagestatusComponent = new PageStatusDAC(); pagestatusComponent.DeletePageStatus(Original_PageStatusId); }
public int UpdateDataset(System.Data.DataSet dataset) { PageStatusDAC pagestatuscomponent = new PageStatusDAC(); return pagestatuscomponent.UpdateDataset(dataset); }
public bool Update( string Name, Guid RowGuid, DateTime ModifiedDate, int Original_PageStatusId) { PageStatusDAC pagestatusComponent = new PageStatusDAC(); return pagestatusComponent.UpdatePageStatus( Name, RowGuid, ModifiedDate, Original_PageStatusId); }
public bool Update(PageStatus pagestatus ,int old_pageStatusId) { PageStatusDAC pagestatusComponent = new PageStatusDAC(); return pagestatusComponent.UpdatePageStatus( pagestatus.Name, pagestatus.RowGuid, pagestatus.ModifiedDate, old_pageStatusId); }