public bool Delete(CatalogConstruction detail) { int res = 0; if (detail == null) { return(false); } using (GlobalInfo.SystemDB.GetConnection()) { res = CatalogConstructionTable.Records.Delete(x => x.CatalogId == detail.CatalogId); } return(res > 0); }
public bool Update(CatalogConstruction detail) { int res = 0; if (detail == null) { return(false); } using (GlobalInfo.SystemDB.GetConnection()) { res = CatalogConstructionTable.Records.Update((x => x.CatalogId == detail.CatalogId), p => new CatalogConstructionTable { CatalogName = detail.CatalogName, CatalogParentId = detail.CatalogParentId, CatalogCreateDate = detail.CatalogCreateDate, }); } return(res >= 0); }
public bool InsertLable(CatalogConstruction detail) { int res = 0; if (detail == null) { return(false); } using (GlobalInfo.SystemDB.GetConnection()) { res = new CatalogConstructionTable() { CatalogId = detail.CatalogId, CatalogName = detail.CatalogName, CatalogParentId = detail.CatalogParentId, CatalogCreateDate = detail.CatalogCreateDate, }.Insert(); } return(res > 0); }