Beispiel #1
0
        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);
        }
Beispiel #2
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);
        }
Beispiel #3
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);
        }